1234567891011121314151617181920212223 |
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- """
- demeter database
- name:farm_work.py
- author:rabin
- """
- from __load__ import *
- class Farm_work(Model):
- __table__ = 'farm_work'
- __comment__ = '园区农事表'
- id = Fields(type='uuid', primaryKey=True, comment='农事ID', uuid='farm_id')
- farm_id = Fields(type='int', default='setting.farm', comment='园区ID', match='not')
- amount = Fields(type='varchar(150)', comment='劳作用量')
- content = Fields(type='varchar(250)', comment='劳作内容')
- category_id = Fields(type='int', comment='劳作分类id')
- land_id = Fields(type='uuid', comment='地块id')
- pic = Fields(type='text', comment='图像记录')
- workdate = Fields(type='int', comment='劳作时间')
- state = Fields(type='boolean', default='True', comment='数据存在状态')
- cdate = Fields(type='int', default='time', comment='创建时间')
- #ALTER TABLE demeter_farm_work ALTER pic TYPE text;
|