Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yafangsuo_dataServer
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
node_server
yafangsuo_dataServer
Commits
4236aaf6
Commit
4236aaf6
authored
Aug 28, 2023
by
chenjinjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
3ac74012
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
98 additions
and
87 deletions
+98
-87
mysqlTableConfig.ts
src/config/mysqlTableConfig.ts
+98
-87
No files found.
src/config/mysqlTableConfig.ts
View file @
4236aaf6
...
...
@@ -16,13 +16,9 @@ export const TablesConfig = [
branchName
:
{
type
:
Sequelize
.
STRING
(
100
),
allowNull
:
false
},
//支部名称
},
association
:
[{}]
}
];
{
""
:{
tableName
:
'branch'
,
},
"后台用户表"
:{
{
tableNameCn
:
'后台用户表'
,
tableName
:
'adminUser'
,
schema
:{
uId
:{
...
...
@@ -38,7 +34,68 @@ export const TablesConfig = [
},
association
:
[{}]
},
"党员基础信息表"
:{
{
tableNameCn
:
'行政职务表'
,
tableName
:
'administrativePosition'
,
schema
:{
apId
:{
type
:
Sequelize
.
INTEGER
(
20
),
//表示属性的数据类型
allowNull
:
false
,
//表示当前列是否允许为空, false表示该列不能为空
primaryKey
:
true
,
//表示主键
autoIncrement
:
true
,
//允许自增
unique
:
true
//表示该列的值必须唯一
},
administrativePositionName
:
{
type
:
Sequelize
.
STRING
(
100
),
allowNull
:
false
}
},
association
:
[{}]
},
{
tableNameCn
:
'党内职务表'
,
tableName
:
'partyPositions'
,
schema
:{
ppId
:
{
type
:
Sequelize
.
INTEGER
(
20
),
//表示属性的数据类型
allowNull
:
false
,
//表示当前列是否允许为空, false表示该列不能为空
primaryKey
:
true
,
//表示主键
autoIncrement
:
true
,
//允许自增
unique
:
true
//表示该列的值必须唯一
},
partyPositionsName
:
{
type
:
Sequelize
.
STRING
(
100
),
allowNull
:
false
}
},
association
:
[{}]
},
{
tableNameCn
:
'所属科室表'
,
tableName
:
'department'
,
schema
:{
dId
:
{
type
:
Sequelize
.
INTEGER
(
20
),
//表示属性的数据类型
allowNull
:
false
,
//表示当前列是否允许为空, false表示该列不能为空
primaryKey
:
true
,
//表示主键
autoIncrement
:
true
,
//允许自增
unique
:
true
//表示该列的值必须唯一
},
departmentName
:
{
type
:
Sequelize
.
STRING
(
100
),
allowNull
:
false
}
},
association
:
[{}]
},
{
tableNameCn
:
'课程类型'
,
tableName
:
'courseType'
,
schema
:{
ctId
:
{
type
:
Sequelize
.
INTEGER
(
20
),
//表示属性的数据类型
allowNull
:
false
,
//表示当前列是否允许为空, false表示该列不能为空
primaryKey
:
true
,
//表示主键
autoIncrement
:
true
,
//允许自增
unique
:
true
//表示该列的值必须唯一
},
courseTypeName
:
{
type
:
Sequelize
.
STRING
(
100
),
allowNull
:
false
}
},
association
:
[{}]
},
{
tableNameCn
:
'党员基础信息表'
,
tableName
:
'partyMember'
,
schema
:{
pmId
:
{
...
...
@@ -79,49 +136,8 @@ export const TablesConfig = [
{
type
:
"hasMany"
,
check
:
"department"
},
]
},
"行政职务表"
:{
tableName
:
'administrativePosition'
,
schema
:{
apId
:{
type
:
Sequelize
.
INTEGER
(
20
),
//表示属性的数据类型
allowNull
:
false
,
//表示当前列是否允许为空, false表示该列不能为空
primaryKey
:
true
,
//表示主键
autoIncrement
:
true
,
//允许自增
unique
:
true
//表示该列的值必须唯一
},
administrativePositionName
:
{
type
:
Sequelize
.
STRING
(
100
),
allowNull
:
false
}
},
association
:
[{}]
},
"党内职务表"
:{
tableName
:
'partyPositions'
,
schema
:{
ppId
:
{
type
:
Sequelize
.
INTEGER
(
20
),
//表示属性的数据类型
allowNull
:
false
,
//表示当前列是否允许为空, false表示该列不能为空
primaryKey
:
true
,
//表示主键
autoIncrement
:
true
,
//允许自增
unique
:
true
//表示该列的值必须唯一
},
partyPositionsName
:
{
type
:
Sequelize
.
STRING
(
100
),
allowNull
:
false
}
},
association
:
[{}]
},
"所属科室表"
:{
tableName
:
'department'
,
schema
:{
dId
:
{
type
:
Sequelize
.
INTEGER
(
20
),
//表示属性的数据类型
allowNull
:
false
,
//表示当前列是否允许为空, false表示该列不能为空
primaryKey
:
true
,
//表示主键
autoIncrement
:
true
,
//允许自增
unique
:
true
//表示该列的值必须唯一
},
departmentName
:
{
type
:
Sequelize
.
STRING
(
100
),
allowNull
:
false
}
},
association
:
[{}]
},
"支部制度表"
:{
{
tableNameCn
:
'支部制度表'
,
tableName
:
'branchSystem'
,
schema
:{
bsId
:
{
//自增的支部制度id
...
...
@@ -141,10 +157,11 @@ export const TablesConfig = [
uploadTime
:
{
type
:
Sequelize
.
DATE
,
allowNull
:
false
,
defaultValue
:
Sequelize
.
NOW
},
//上传时间
},
association
:
[
{
type
:
"hasMany"
,
table1
:
"branch"
,
table2
:
"branchSystem
"
}
{
type
:
"hasMany"
,
check
:
"branch
"
}
]
},
"组织生活表"
:{
{
tableNameCn
:
'组织生活表'
,
tableName
:
'organizationalLife'
,
schema
:{
oId
:
{
//自增的组织生活id
...
...
@@ -163,10 +180,11 @@ export const TablesConfig = [
uploadTime
:
{
type
:
Sequelize
.
DATE
,
allowNull
:
false
,
defaultValue
:
Sequelize
.
NOW
},
//上传时间
},
association
:
[
{
type
:
"hasMany"
,
table1
:
"branch"
,
table2
:
"organizationalLife
"
}
{
type
:
"hasMany"
,
check
:
"branch
"
}
]
},
"专题活动表"
:{
{
tableNameCn
:
'专题活动表'
,
tableName
:
'thematicActivities'
,
schema
:{
taId
:
{
//自增的专题活动id
...
...
@@ -184,10 +202,11 @@ export const TablesConfig = [
uploadTime
:
{
type
:
Sequelize
.
DATE
,
allowNull
:
false
,
defaultValue
:
Sequelize
.
NOW
},
//上传时间
},
association
:
[
{
type
:
"hasMany"
,
table1
:
"branch"
,
table2
:
"thematicActivities
"
}
{
type
:
"hasMany"
,
check
:
"branch
"
}
]
},
"党建动态表"
:{
{
tableNameCn
:
'党建动态表'
,
tableName
:
'partyBuildingDynamic'
,
schema
:{
pbId
:
{
//自增的党建动态id
...
...
@@ -205,10 +224,11 @@ export const TablesConfig = [
uploadTime
:
{
type
:
Sequelize
.
DATE
,
allowNull
:
false
,
defaultValue
:
Sequelize
.
NOW
},
//上传时间
},
association
:
[
{
type
:
"hasMany"
,
table1
:
"branch"
,
table2
:
"partyBuildingDynamic
"
}
{
type
:
"hasMany"
,
check
:
"branch
"
}
]
},
"党费管理表"
:{
{
tableNameCn
:
'党费管理表'
,
tableName
:
'partyExpenses'
,
schema
:{
peId
:
{
//自增的党费id
...
...
@@ -226,11 +246,12 @@ export const TablesConfig = [
payAmount
:
{
type
:
Sequelize
.
INTEGER
,
allowNull
:
false
},
//缴费金额(元)
},
association
:
[
{
type
:
"hasMany"
,
table1
:
"partyMember"
,
table2
:
"partyExpenses
"
},
{
type
:
"hasMany"
,
table1
:
"branch"
,
table2
:
"partyExpenses
"
}
{
type
:
"hasMany"
,
check
:
"partyMember
"
},
{
type
:
"hasMany"
,
check
:
"branch
"
}
]
},
"党建先锋表"
:{
{
tableNameCn
:
'党建先锋表'
,
tableName
:
'partyVanguard'
,
schema
:{
pvId
:
{
//自增的党建先锋id
...
...
@@ -249,24 +270,11 @@ export const TablesConfig = [
isUse
:
{
type
:
Sequelize
.
BOOLEAN
,
allowNull
:
false
,
defaultValue
:
true
},
//是否使用
},
association
:
[
{
type
:
"hasMany"
,
table1
:
"branch"
,
table2
:
"partyVanguard
"
}
{
type
:
"hasMany"
,
check
:
"branch
"
}
]
},
"课程类型"
:{
tableName
:
'courseType'
,
schema
:{
ctId
:
{
type
:
Sequelize
.
INTEGER
(
20
),
//表示属性的数据类型
allowNull
:
false
,
//表示当前列是否允许为空, false表示该列不能为空
primaryKey
:
true
,
//表示主键
autoIncrement
:
true
,
//允许自增
unique
:
true
//表示该列的值必须唯一
},
courseTypeName
:
{
type
:
Sequelize
.
STRING
(
100
),
allowNull
:
false
}
},
association
:
[{}]
},
"党员学习表"
:{
{
tableNameCn
:
'党员学习表'
,
tableName
:
'memberLearning'
,
schema
:{
mlId
:
{
//自增的党员学习id
...
...
@@ -286,10 +294,11 @@ export const TablesConfig = [
uploadTime
:
{
type
:
Sequelize
.
DATE
,
allowNull
:
false
,
defaultValue
:
Sequelize
.
NOW
},
//上传时间
},
association
:
[
{
type
:
"hasOne"
,
table1
:
"courseType"
,
table2
:
"memberLearning
"
}
{
type
:
"hasOne"
,
check
:
"courseType
"
}
]
},
"学习进度表"
:{
{
tableNameCn
:
'学习进度表'
,
tableName
:
'rateLearning'
,
schema
:{
rlId
:
{
...
...
@@ -305,11 +314,12 @@ export const TablesConfig = [
learningCompleted
:
{
type
:
Sequelize
.
INTEGER
,
allowNull
:
false
,
defaultValue
:
1
}
//是否已完成 1:正在进行、2:阅读完成
},
association
:
[
{
type
:
"hasOne"
,
table1
:
"partyMember"
,
table2
:
"rateLearning
"
},
{
type
:
"hasOne"
,
table1
:
"memberLearning"
,
table2
:
"rate
Learning"
}
{
type
:
"hasOne"
,
check
:
"partyMember
"
},
{
type
:
"hasOne"
,
check
:
"member
Learning"
}
]
},
"学习强国"
:{
{
tableNameCn
:
'学习强国'
,
tableName
:
'learningPower'
,
schema
:{
lpId
:
{
//自增的党员学习id
...
...
@@ -328,10 +338,11 @@ export const TablesConfig = [
uploadTime
:
{
type
:
Sequelize
.
DATE
,
allowNull
:
false
,
defaultValue
:
Sequelize
.
NOW
},
//上传时间
},
association
:
[
{
type
:
"hasMany"
,
table1
:
"branch"
,
table2
:
"learningPower
"
}
{
type
:
"hasMany"
,
check
:
"branch
"
}
]
},
"党建质量"
:{
{
tableNameCn
:
'党建质量'
,
tableName
:
'partyQuality'
,
schema
:{
pqId
:
{
//自增的党建质量id
...
...
@@ -351,7 +362,7 @@ export const TablesConfig = [
completionProgress
:
{
type
:
Sequelize
.
STRING
(
100
),
allowNull
:
false
}
//完成进度
},
association
:
[
{
type
:
"hasMany"
,
table1
:
"branch"
,
table2
:
"partyQuality
"
}
{
type
:
"hasMany"
,
check
:
"branch
"
}
]
},
}
\ No newline at end of file
];
\ No newline at end of file
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