from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import Column, Integer, String, TIMESTAMP, text

from ....common.sqlSession import to_dict

Base = declarative_base()
Base.to_dict = to_dict


class CreateGroupUser(Base):
    __tablename__ = 'create_group_user'
    id = Column(Integer, primary_key=True, comment='用户的id')
    email = Column(String(100), unique=True, comment='邮箱')
    team_name = Column(String(100), unique=True, comment='组名')
    name = Column(String(100), unique=True, comment='用户名称')
    del_flag = Column(Integer, unique=True, comment='0：未删除；1：已删除')

    def __repr__(self):
        return '<id %r>' % self.id
