Commit ba3bb3b7 by dong

fix20230104

parent d7ac019a
...@@ -920,7 +920,6 @@ class User(BaseModel, db.Model): ...@@ -920,7 +920,6 @@ class User(BaseModel, db.Model):
# 基本信息 # 基本信息
id = db.Column(db.Integer, primary_key=True, autoincrement=True, comment='用户编号') id = db.Column(db.Integer, primary_key=True, autoincrement=True, comment='用户编号')
name = db.Column(db.String(32), unique=True, comment='用户名') name = db.Column(db.String(32), unique=True, comment='用户名')
role_id = db.Column(db.Integer, comment='角色id ')
password_hash = db.Column(db.String(128), comment='加密的密码') password_hash = db.Column(db.String(128), comment='加密的密码')
real_name = db.Column(db.String(32), comment='姓名') real_name = db.Column(db.String(32), comment='姓名')
mobile = db.Column(db.String(11), unique=True, comment='手机号') mobile = db.Column(db.String(11), unique=True, comment='手机号')
...@@ -938,6 +937,10 @@ class User(BaseModel, db.Model): ...@@ -938,6 +937,10 @@ class User(BaseModel, db.Model):
# 角色(职级配置) # 角色(职级配置)
# role_id = db.Column(db.Integer, db.ForeignKey("role.id"), comment='角色id') # role_id = db.Column(db.Integer, db.ForeignKey("role.id"), comment='角色id')
# role = db.relationship("Role", backref=db.backref("users")) # role = db.relationship("Role", backref=db.backref("users"))
org_id = db.Column(db.Integer, db.ForeignKey("organization_chart.id"))
org = db.relationship("OrganizationChart", backref=db.backref("users"))
# 用户关注行业(图谱) # 用户关注行业(图谱)
industry = db.relationship("Industry", secondary="user_industry", backref=db.backref('bindustry')) industry = db.relationship("Industry", secondary="user_industry", backref=db.backref('bindustry'))
# 用户关注太原企业 # 用户关注太原企业
...@@ -1089,18 +1092,30 @@ class Section(db.Model): ...@@ -1089,18 +1092,30 @@ class Section(db.Model):
# 政府组(政府1-N部门1-N组) # 政府组(政府1-N部门1-N组)
# class Group(db.Model): class Group(db.Model):
# __tablename__ = "group" __tablename__ = "group"
# # 基本信息 # 基本信息
# id = db.Column(db.Integer, primary_key=True, autoincrement=True) id = db.Column(db.Integer, primary_key=True, autoincrement=True)
# pnums = db.Column(db.Integer) # 人数 pnums = db.Column(db.Integer) # 人数
# charge = db.Column(db.String(255)) # 组负责人 charge = db.Column(db.String(255)) # 组负责人
# charge_phone = db.Column(db.String(255)) # 负责人电话 charge_phone = db.Column(db.String(255)) # 负责人电话
# function = db.Column(db.Text) # 部门职能 function = db.Column(db.Text) # 部门职能
# name = db.Column(db.String(255), nullable=False) # 政府机构部门下组的名称 name = db.Column(db.String(255), nullable=False) # 政府机构部门下组的名称
# # sid = db.Column(db.Integer) # 部门id # sid = db.Column(db.Integer) # 部门id
# section_id = db.Column(db.Integer, db.ForeignKey("section.id")) section_id = db.Column(db.Integer, db.ForeignKey("section.id"))
# section = db.relationship('Section', backref=db.backref('groups')) # 部门1-N组 section = db.relationship('Section', backref=db.backref('groups')) # 部门1-N组
# 组织结构
class OrganizationChart(db.Model):
__tablename__ = "organization_chart"
__table_args__ = ({'comment': '后台管理系统---组织结构表'}) # 添加表注释
id = db.Column(db.Integer, primary_key=True, autoincrement=True, comment='主键id')
one_org = db.Column(db.String(30), comment='一级组织机构')
two_department = db.Column(db.String(30), comment='二级部门')
three_role = db.Column(db.String(30), comment='三级角色')
page_permission_id = db.Column(db.String(255), comment='页面权限id列表')
fun_permission_id = db.Column(db.String(255), comment='功能权限id列表')
"""招商资源管理""" """招商资源管理"""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment