#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
    demeter database
    name:farm_user.py
    author:rabin
"""
from __load__ import *

class Farm_user_wechat(Model):
	__table__ = 'farm_user_wechat'
	__comment__ = '园区用户微信绑定表'
	id = Fields(type='uuid', primaryKey=True, comment='园区用户微信绑定表ID', uuid='farm_id')
	farm_id = Fields(type='int', default='setting.farm', comment='园区ID', match='not')
	nickname = Fields(type='varchar(150)', comment='微信昵称')
	uid = Fields(type='uuid', comment='用户id')
	openid = Fields(type='varchar(50)', comment='wx openid')
	session_key = Fields(type='varchar(50)', comment='session_key')
	status = Fields(type='boolean', default='False', comment='封禁状态true为封禁false为非封禁')
	state = Fields(type='boolean', default='True', comment='数据存在状态')
	cdate = Fields(type='int', default='time', comment='创建时间')