#!/usr/bin/env python # -*- coding: utf-8 -*- """ demeter database name:farm_user.py author:rabin """ from __load__ import * class Farm_user(Base): __table__ = 'farm_user' __comment__ = '园区用户表' id = Fields(type='uuid', primaryKey=True, comment='园区用户ID', uuid='farm_id') farm_id = Fields(type='int', default='setting.farm', comment='园区ID', match='not') 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='创建时间')