Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mancheng
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
mancheng
Commits
ba3bb3b7
Commit
ba3bb3b7
authored
Jan 04, 2023
by
dong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix20230104
parent
d7ac019a
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
13 deletions
+28
-13
apps/manage/view_auth.py
+0
-0
apps/manage/view_org.py
+0
-0
apps/manage/view_user.py
+0
-0
apps/models.py
+28
-13
No files found.
apps/manage/view_auth.py
View file @
ba3bb3b7
This diff is collapsed.
Click to expand it.
apps/manage/view_org.py
View file @
ba3bb3b7
This diff is collapsed.
Click to expand it.
apps/manage/view_user.py
View file @
ba3bb3b7
This diff is collapsed.
Click to expand it.
apps/models.py
View file @
ba3bb3b7
...
...
@@ -920,7 +920,6 @@ class User(BaseModel, db.Model):
# 基本信息
id
=
db
.
Column
(
db
.
Integer
,
primary_key
=
True
,
autoincrement
=
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
=
'加密的密码'
)
real_name
=
db
.
Column
(
db
.
String
(
32
),
comment
=
'姓名'
)
mobile
=
db
.
Column
(
db
.
String
(
11
),
unique
=
True
,
comment
=
'手机号'
)
...
...
@@ -938,6 +937,10 @@ class User(BaseModel, db.Model):
# 角色(职级配置)
# role_id = db.Column(db.Integer, db.ForeignKey("role.id"), comment='角色id')
# 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'
))
# 用户关注太原企业
...
...
@@ -1089,18 +1092,30 @@ class Section(db.Model):
# 政府组(政府1-N部门1-N组)
# class Group(db.Model):
# __tablename__ = "group"
# # 基本信息
# id = db.Column(db.Integer, primary_key=True, autoincrement=True)
# pnums = db.Column(db.Integer) # 人数
# charge = db.Column(db.String(255)) # 组负责人
# charge_phone = db.Column(db.String(255)) # 负责人电话
# function = db.Column(db.Text) # 部门职能
# name = db.Column(db.String(255), nullable=False) # 政府机构部门下组的名称
# # sid = db.Column(db.Integer) # 部门id
# section_id = db.Column(db.Integer, db.ForeignKey("section.id"))
# section = db.relationship('Section', backref=db.backref('groups')) # 部门1-N组
class
Group
(
db
.
Model
):
__tablename__
=
"group"
# 基本信息
id
=
db
.
Column
(
db
.
Integer
,
primary_key
=
True
,
autoincrement
=
True
)
pnums
=
db
.
Column
(
db
.
Integer
)
# 人数
charge
=
db
.
Column
(
db
.
String
(
255
))
# 组负责人
charge_phone
=
db
.
Column
(
db
.
String
(
255
))
# 负责人电话
function
=
db
.
Column
(
db
.
Text
)
# 部门职能
name
=
db
.
Column
(
db
.
String
(
255
),
nullable
=
False
)
# 政府机构部门下组的名称
# sid = db.Column(db.Integer) # 部门id
section_id
=
db
.
Column
(
db
.
Integer
,
db
.
ForeignKey
(
"section.id"
))
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列表'
)
"""招商资源管理"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment