rabin %!s(int64=7) %!d(string=hai) anos
pai
achega
0ef484a1d1

+ 1 - 0
demeter/admin/model/__init__.py

@@ -0,0 +1 @@
+# -*- coding: utf-8 -*-

+ 18 - 0
demeter/admin/model/manage_admin.py

@@ -0,0 +1,18 @@
+# -*- coding: utf-8 -*-
+"""
+    demeter database
+    name:manage_admin.py
+    author:rabin
+"""
+from __load__ import *
+
+class Manage_admin(Model):
+	__table__ = 'manage_admin'
+	__comment__ = '超级管理员'
+	id = Fields(type='int', primaryKey=True, autoIncrement=True, comment='管理员ID')
+	role_id = Fields(type='int', comment='角色ID')
+	username = Fields(type='varchar(50)', comment='管理员账号')
+	mobile = Fields(type='bigint', comment='园区管理员手机号', unique=True)
+	password = Fields(type='varchar(38)', comment='安全密码', md5=True)
+	state = Fields(type='boolean', default='True', comment='数据存在状态')
+	cdate = Fields(type='int', default='time', comment='创建时间')

+ 17 - 0
demeter/admin/model/manage_log.py

@@ -0,0 +1,17 @@
+# -*- coding: utf-8 -*-
+"""
+    demeter database
+    name:manage_log.py
+"""
+from __load__ import *
+
+class Manage_log(Model):
+	__table__ = 'manage_log'
+	__comment__ = '后台日志表'
+	id = Fields(type='int', primaryKey=True, autoIncrement=True, comment='日志ID')
+	admin_id = Fields(type='int', comment='管理员ID')
+	model = Fields(type='varchar(50)', comment='操作的表')
+	method = Fields(type='varchar(50)', comment='操作的方法')
+	data = Fields(type='text', comment='数据记录')
+	state = Fields(type='boolean', default='True', comment='数据存在状态')
+	cdate = Fields(type='int', default='time', comment='创建时间')

+ 17 - 0
demeter/admin/model/manage_role.py

@@ -0,0 +1,17 @@
+# -*- coding: utf-8 -*-
+"""
+    demeter database
+    name:manage_role.py
+"""
+from __load__ import *
+
+class Manage_role(Model):
+	__table__ = 'manage_role'
+	__comment__ = '角色表'
+	id = Fields(type='int', primaryKey=True, autoIncrement=True, comment='角色ID')
+	name = Fields(type='varchar(50)', comment='角色名称')
+	auth = Fields(type='varchar(600)', comment='左侧菜单权限')
+	top = Fields(type='varchar(500)', comment='头部菜单权限')
+	oper = Fields(type='varchar(100)', comment='操作权限增删改查搜等')
+	state = Fields(type='boolean', default='True', comment='数据存在状态')
+	cdate = Fields(type='int', default='time', comment='创建时间')

+ 8 - 0
demos/helloworld/README.rst

@@ -0,0 +1,8 @@
+# 测试app
+
+安装
+
+python install.py
+
+前台:python front.py
+后台:python admin.py

+ 1 - 1
demos/helloworld/model/manage_admin.py

@@ -4,7 +4,7 @@
     name:manage_admin.py
     author:rabin
 """
-from .__load__ import *
+from __load__ import *
 
 class Manage_admin(Model):
 	__table__ = 'manage_admin'

+ 1 - 1
demos/helloworld/model/manage_log.py

@@ -3,7 +3,7 @@
     demeter database
     name:manage_log.py
 """
-from .__load__ import *
+from __load__ import *
 
 class Manage_log(Model):
 	__table__ = 'manage_log'

+ 1 - 1
demos/helloworld/model/manage_role.py

@@ -3,7 +3,7 @@
     demeter database
     name:manage_role.py
 """
-from .__load__ import *
+from __load__ import *
 
 class Manage_role(Model):
 	__table__ = 'manage_role'

+ 1 - 1
demos/helloworld/model/order.py

@@ -3,7 +3,7 @@
     demeter database
     name:order.py
 """
-from .__load__ import *
+from __load__ import *
 
 class Order(Model):
 	__table__ = 'order'

+ 1 - 1
demos/helloworld/model/product.py

@@ -3,7 +3,7 @@
     demeter database
     name:product.py
 """
-from .__load__ import *
+from __load__ import *
 
 class Product(Model):
 	__table__ = 'product'

+ 1 - 1
demos/helloworld/model/site.py

@@ -3,7 +3,7 @@
     demeter database
     name:site.py
 """
-from .__load__ import *
+from __load__ import *
 
 class Site(Model):
 	__table__ = 'site'