|
@@ -0,0 +1,63 @@
|
|
|
+# -*- coding: utf-8 -*-
|
|
|
+from sqlalchemy import String, Column, Integer,DateTime,Text,BigInteger,Boolean,PrimaryKeyConstraint,Index,UniqueConstraint,CHAR,LargeBinary,TIMESTAMP
|
|
|
+from sqlalchemy.dialects.mysql import TINYINT
|
|
|
+from sqlalchemy.sql import func
|
|
|
+from database import Base
|
|
|
+from datetime import datetime
|
|
|
+
|
|
|
+'''用户信息标签表(临时)'''
|
|
|
+class SysUserTag(Base):
|
|
|
+ __tablename__ = 'sys_user_tag'
|
|
|
+ __table_args__ = (PrimaryKeyConstraint('user_id', 'tag_id'),)
|
|
|
+ user_id = Column(BigInteger,nullable=False,comment="用户ID")
|
|
|
+ tag_id = Column(BigInteger,nullable=False,comment="标签ID")
|
|
|
+ class Config:
|
|
|
+ orm_mode = True
|
|
|
+
|
|
|
+class SysTag(Base):
|
|
|
+ __tablename__ = 'sys_tag'
|
|
|
+ __table_args__ = (PrimaryKeyConstraint('tag_id','parent_id', 'tag_name'),)
|
|
|
+ tag_id = Column(BigInteger, nullable=False, comment="标签ID")
|
|
|
+ parent_id = Column(BigInteger, nullable=False, comment="父级标签ID")
|
|
|
+ tag_name = Column(String(255), nullable=False, comment="标签名字")
|
|
|
+
|
|
|
+'''部门信息标签表(临时)'''
|
|
|
+
|
|
|
+class SysDeptTag(Base):
|
|
|
+ __tablename__ = 'sys_dept_tag'
|
|
|
+ __table_args__ = (PrimaryKeyConstraint('dept_id', 'tag_id'),)
|
|
|
+ dept_id = Column(BigInteger, nullable=False, comment="部门ID")
|
|
|
+ tag_id = Column(BigInteger, nullable=False, comment="标签ID")
|
|
|
+
|
|
|
+ class Config:
|
|
|
+ orm_mode = True
|
|
|
+
|
|
|
+class DeptTag(Base):
|
|
|
+ __tablename__ = 'dept_tag'
|
|
|
+ __table_args__ = (PrimaryKeyConstraint('tag_id', 'tag_name'),)
|
|
|
+ tag_id = Column(BigInteger, nullable=False, comment="标签ID")
|
|
|
+ tag_name = Column(String(255), nullable=False, comment="标签名字")
|
|
|
+
|
|
|
+
|
|
|
+ class Config:
|
|
|
+ orm_mode = True
|
|
|
+
|
|
|
+
|
|
|
+'''用户常用名单标签表'''
|
|
|
+class Sys_Common_List_Tags(Base):
|
|
|
+ __tablename__ = 'sys_common_list_tag'
|
|
|
+ __table_args__ = (PrimaryKeyConstraint('user_id', 'tag_id'),)
|
|
|
+ user_id = Column(BigInteger, nullable=False, comment="部门ID")
|
|
|
+ tag_id = Column(BigInteger, nullable=False, comment="标签ID")
|
|
|
+
|
|
|
+ class Config:
|
|
|
+ orm_mode = True
|
|
|
+
|
|
|
+class Common_List_Tags(Base):
|
|
|
+ __tablename__ = 'common_list_tag'
|
|
|
+ __table_args__ = (PrimaryKeyConstraint('tag_id', 'tag_name'),)
|
|
|
+ tag_id = Column(BigInteger, nullable=False,autoincrement=True, comment="标签ID")
|
|
|
+ tag_name = Column(String(255), nullable=False, comment="标签名字")
|
|
|
+
|
|
|
+ class Config:
|
|
|
+ orm_mode = True
|