product.py 705 B

123456789101112131415161718
  1. # -*- coding: utf-8 -*-
  2. """
  3. demeter database
  4. name:product.py
  5. author:rabin
  6. """
  7. from .__load__ import *
  8. class Product(Model):
  9. __table__ = 'product'
  10. __comment__ = '商品表'
  11. id = Fields(type='int', primaryKey=True, autoIncrement=True, comment='商品ID')
  12. name = Fields(type='varchar(200)', comment='商品名')
  13. link = Fields(type='varchar(500)', comment='商品链接')
  14. site_id = Fields(type='int', comment='所属站点')
  15. state = Fields(type='boolean', default='True', comment='数据存在状态')
  16. status = Fields(type='int', default='1', comment='抢购状态1待机2入队3抢购中4抢购完成')
  17. cdate = Fields(type='int', default='time', comment='创建时间')