class Comment(Model): __table__ = 'comment' id = StringField(primary_key=True, default=next_id, ddl='varchar(50)') user_id = StringField(ddl='varchar(50)') blog_id = StringField(ddl='varchar(50)') user_name = StringField(ddl='varchar(50)') user_image = StringField(ddl='varchar(500)') content = TextField() created_at = FloatField(default=time.time)
class User(Model): __table__ = 'user' id = StringField(primary_key=True, default=next_id, ddl='varchar(50)') email = StringField(ddl='varchar(50)') password = StringField(ddl='varchar(50)') admim = BooleanField() name = StringField(ddl='varchar(50)') image = StringField(ddl='varchar(500)') created_at = FloatField(default=time.time)
class User(Model): # 定义表名,要和数据库表名一致 __table__ = 's_user' # 设置字段对应的类型,字段名和类型需要和数据库中数据类型一致 id = IntegerField(primary_key=True, default=None) s_username = StringField() s_pwd = StringField() s_gender = IntegerField() s_age = IntegerField()
class User(Model): __table__ = 'users' id = StringField(primary_key=True,default=nextId(),ddl='varchar(50)') name = StringField(ddl='varchar(50)') password = StringField(ddl='varchar(50)') admin = IntegerField(default=0) #是否为管理员0-普通,1-admin email = StringField(ddl="varchar(50)") image = StringField(ddl="varchar(500)") created_at =FloatField(default=time.time)#创建时间
class User(Model): __table__ = 'users' id = StringField(dll='varchar(50)', primary_key=True, default=next_id) email = StringField(dll='varchar(50)') passwd = StringField(dll='varchar(50)') admin = BooleanField() name = StringField(dll='varchar(50)') image = StringField(dll='varchar(500)') created_at = FloatField(default=time.time())
class Comment(Model): __table__ = "comments" id = StringField(primary_key=True, default=next_id, ddl='varchar(50)') blog_id = StringField(ddl='varchar(50)') user_id = StringField(ddl='varchar(50)') user_name = StringField(ddl='varchar(50)') user_image = StringField(ddl='varchar(500)') content = TextField() created_at = FloatField(default=time.time) def __init__(self, **kw): super(Comment, self).__init__(**kw)
class User(Model): __table__ = 'users' # id is primary_key # default is used to save ids, next_id will be called if call insert id = StringField(primary_key=True, default=next_id, ddl='varchar(50)') email = StringField(ddl='varchar(50)') passwd = StringField(ddl='varchar(50)') admin = BooleanField() # default value is false name = StringField(ddl='varchar(50)') image = StringField(ddl='varchar(500)') created_at = FloatField(default=time.time) def __init__(self, **kw): super(User, self).__init__(**kw)
class User(Model): __table__ = 'users' id = IntegetField(primary_key=True) name = StringField() user = yield from User.find('123')
class Sale(Model): __table__ = 'sale' id = StringField(primary_key=True) no = StringField() customer_no = StringField() customer_name = StringField() goods_no = StringField() goods_name = StringField() goods_guige = StringField() goods_unit = StringField() quantity = FloatField() price = FloatField() money = FloatField() aprice_before = FloatField() aprice_after = FloatField() creater = StringField() creater_name = StringField() createtime = IntegerField()
class Comment(Model): __table__ = 'comments' id = IntegerField(primary_key=True, default=None) user_id = IntegerField() content = StringField() create_time = FloatField(default=time.time()) #!/usr/bin/env python3 # -*- coding: utf-8 -*-
class Blog(Model): __table__ = 'blogs' id = StringField(primary_key=True, default=nextId(), ddl='varchar(50)') user_id = StringField(ddl='varchar(50)') user_name = StringField(ddl='varchar(50)') user_image = StringField(ddl="varchar(500)") content = StringField(ddl="varchar(700)") name = StringField(ddl="varchar(200)") summary = StringField(ddl="varchar(200)") #小结 created_at = FloatField(default=time.time) # 创建时间
class Blog(Model): __table__ = 'blog' id = StringField(primary_key=True, default=next_id, ddl='varchar(50)') user_id = StringField(ddl='varchar(50)') user_name = StringField(ddl='varchar(50)') user_image = StringField(ddl='varchar(500)') title = StringField(ddl='varchar(50)') summary = StringField(ddl='varchar(200)') content = TextField() created_at = FloatField(default=time.time)
class Goods(Model): __table__ = 'goods' id = StringField(primary_key=True) no = StringField() name = StringField() guige = StringField() unit = StringField() conversion = StringField() quantity = FloatField() aprice = FloatField() money = FloatField()
class Taizhang(Model): __table__ = 'taizhang' id = StringField(primary_key=True) no = StringField() time = StringField() deal_no = StringField() goods_no = StringField() goods_name = StringField() goods_guige = StringField() buy_quantity = FloatField() buy_price = FloatField() buy_money = FloatField() sale_quantity = FloatField() sale_price = FloatField() sale_money = FloatField() store_quantity = FloatField() store_money = FloatField() store_aprice = FloatField() comment = StringField()
class Blog(Model): __table__ = 'blogs' id = StringField(primary_key=True, default=next_id, ddl='varchar(50)') user_id = StringField(ddl='varchar(50)') user_name = StringField(ddl='varchar(50)') user_image = StringField(ddl='varchar(500)') name = StringField(ddl='varchar(50)') summary = StringField(ddl='varchar(200)') content = TextField() created_at = FloatField(default=time.time) def __init__(self, **kw): super(Blog, self).__init__(**kw)
class User(Model): __table__ = 'user' id = IntegerField(primary_key=True) name = StringField() cnname = StringField() password = StringField(ddl='varchar(50)')
class Customer(Model): __table__ = 'customer' id = StringField(primary_key=True) no = StringField() name = StringField() code = StringField() shuiwu = StringField() person = StringField() phone = StringField() mobile = StringField() address = StringField() email = StringField() bank = StringField() bank_no = StringField() postcode = StringField() fax = StringField() comment = StringField() creater = StringField() createtime = IntegerField()
class User(Model): __table__ = 'user' id = IntegerField(primary_key=True) name = StringField()