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
73a52edf
Commit
73a52edf
authored
Aug 28, 2023
by
chenjinjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
1825e86e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
71 deletions
+7
-71
mysqlTableConfig.ts
src/config/mysqlTableConfig.ts
+7
-71
No files found.
src/config/mysqlTableConfig.ts
View file @
73a52edf
...
@@ -35,66 +35,6 @@ export const TablesConfig = [
...
@@ -35,66 +35,6 @@ export const TablesConfig = [
association
:
[]
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
:
'党员基础信息表'
,
tableNameCn
:
'党员基础信息表'
,
tableName
:
'partyMember'
,
tableName
:
'partyMember'
,
schema
:{
schema
:{
...
@@ -112,9 +52,9 @@ export const TablesConfig = [
...
@@ -112,9 +52,9 @@ export const TablesConfig = [
levelOfEducation
:
{
type
:
Sequelize
.
INTEGER
,
allowNull
:
false
},
//文化程度
levelOfEducation
:
{
type
:
Sequelize
.
INTEGER
,
allowNull
:
false
},
//文化程度
bId
:
{
type
:
Sequelize
.
INTEGER
(
20
),
allowNull
:
false
},
//支部表id 外键
bId
:
{
type
:
Sequelize
.
INTEGER
(
20
),
allowNull
:
false
},
//支部表id 外键
partyJoiningTime
:
{
type
:
Sequelize
.
DATE
,
allowNull
:
false
},
//入党时间 --正式党员录入
partyJoiningTime
:
{
type
:
Sequelize
.
DATE
,
allowNull
:
false
},
//入党时间 --正式党员录入
apId
:
{
type
:
Sequelize
.
INTEGER
,
allowNull
:
false
,
defaultValue
:
1
},
//行政职务表id
外键
默认1:普通职员
apId
:
{
type
:
Sequelize
.
INTEGER
,
allowNull
:
false
,
defaultValue
:
1
},
//行政职务表id
枚举
默认1:普通职员
ppId
:
{
type
:
Sequelize
.
STRING
(
100
),
allowNull
:
false
,
defaultValue
:
'[]'
},
//党内职务表id
外键
--正式党员录入 [1,2] --多选
ppId
:
{
type
:
Sequelize
.
STRING
(
100
),
allowNull
:
false
,
defaultValue
:
'[]'
},
//党内职务表id
枚举
--正式党员录入 [1,2] --多选
dId
:
{
type
:
Sequelize
.
STRING
(
100
),
allowNull
:
false
,
defaultValue
:
'[]'
},
//所属科室表id
外键
[1,2] --多选
dId
:
{
type
:
Sequelize
.
STRING
(
100
),
allowNull
:
false
,
defaultValue
:
'[]'
},
//所属科室表id
枚举
[1,2] --多选
askForTime
:
{
type
:
Sequelize
.
DATE
,
allowNull
:
false
},
//申请入党时间 --入党积极分子录入、入党申请录入
askForTime
:
{
type
:
Sequelize
.
DATE
,
allowNull
:
false
},
//申请入党时间 --入党积极分子录入、入党申请录入
listedAsActivistsTime
:
{
type
:
Sequelize
.
DATE
,
allowNull
:
false
},
//列为积极分子时间 --入党积极分子录入
listedAsActivistsTime
:
{
type
:
Sequelize
.
DATE
,
allowNull
:
false
},
//列为积极分子时间 --入党积极分子录入
liaison
:
{
type
:
Sequelize
.
STRING
(
100
),
allowNull
:
false
,
defaultValue
:
'[]'
},
//联系人 --入党积极分子录入 ["",""] --多选
liaison
:
{
type
:
Sequelize
.
STRING
(
100
),
allowNull
:
false
,
defaultValue
:
'[]'
},
//联系人 --入党积极分子录入 ["",""] --多选
...
@@ -131,9 +71,6 @@ export const TablesConfig = [
...
@@ -131,9 +71,6 @@ export const TablesConfig = [
},
},
association
:
[
association
:
[
{
type
:
"hasOne"
,
check
:
"branch"
},
{
type
:
"hasOne"
,
check
:
"branch"
},
{
type
:
"hasOne"
,
check
:
"administrativePosition"
},
{
type
:
"hasMany"
,
check
:
"partyPositions"
},
{
type
:
"hasMany"
,
check
:
"department"
},
]
]
},
},
{
{
...
@@ -285,7 +222,7 @@ export const TablesConfig = [
...
@@ -285,7 +222,7 @@ export const TablesConfig = [
unique
:
true
//表示该列的值必须唯一
unique
:
true
//表示该列的值必须唯一
},
},
contentTitle
:
{
type
:
Sequelize
.
STRING
(
100
),
allowNull
:
false
},
//内容标题
contentTitle
:
{
type
:
Sequelize
.
STRING
(
100
),
allowNull
:
false
},
//内容标题
ctId
:
{
type
:
Sequelize
.
INTEGER
,
allowNull
:
false
},
//课程类型表id
外键
ctId
:
{
type
:
Sequelize
.
INTEGER
,
allowNull
:
false
},
//课程类型表id
枚举
courseEntryType
:
{
type
:
Sequelize
.
INTEGER
,
allowNull
:
false
},
//课程录入类型 1:视频课程、2:文字课程
courseEntryType
:
{
type
:
Sequelize
.
INTEGER
,
allowNull
:
false
},
//课程录入类型 1:视频课程、2:文字课程
hits
:
{
type
:
Sequelize
.
INTEGER
,
allowNull
:
false
},
//点击量
hits
:
{
type
:
Sequelize
.
INTEGER
,
allowNull
:
false
},
//点击量
isUse
:
{
type
:
Sequelize
.
BOOLEAN
,
allowNull
:
false
,
defaultValue
:
true
},
//是否使用
isUse
:
{
type
:
Sequelize
.
BOOLEAN
,
allowNull
:
false
,
defaultValue
:
true
},
//是否使用
...
@@ -293,9 +230,7 @@ export const TablesConfig = [
...
@@ -293,9 +230,7 @@ export const TablesConfig = [
fileType
:
{
type
:
Sequelize
.
INTEGER
,
allowNull
:
false
},
//文件类型
fileType
:
{
type
:
Sequelize
.
INTEGER
,
allowNull
:
false
},
//文件类型
uploadTime
:
{
type
:
Sequelize
.
DATE
,
allowNull
:
false
,
defaultValue
:
Sequelize
.
NOW
},
//上传时间
uploadTime
:
{
type
:
Sequelize
.
DATE
,
allowNull
:
false
,
defaultValue
:
Sequelize
.
NOW
},
//上传时间
},
},
association
:
[
association
:
[]
{
type
:
"hasOne"
,
check
:
"courseType"
}
]
},
},
{
{
tableNameCn
:
'学习进度表'
,
tableNameCn
:
'学习进度表'
,
...
@@ -329,9 +264,10 @@ export const TablesConfig = [
...
@@ -329,9 +264,10 @@ export const TablesConfig = [
autoIncrement
:
true
,
//允许自增
autoIncrement
:
true
,
//允许自增
unique
:
true
//表示该列的值必须唯一
unique
:
true
//表示该列的值必须唯一
},
},
pmId
:
{
type
:
Sequelize
.
STRING
(
100
),
allowNull
:
false
},
//党员id 外键
partyMemberName
:
{
type
:
Sequelize
.
STRING
(
100
),
allowNull
:
false
},
//党员姓名
partyMemberName
:
{
type
:
Sequelize
.
STRING
(
100
),
allowNull
:
false
},
//党员姓名
bId
:
{
type
:
Sequelize
.
STRING
(
100
),
allowNull
:
false
,
defaultValue
:
'[]'
},
//支部表id 外键 [1,2] --多选
bId
:
{
type
:
Sequelize
.
STRING
(
100
),
allowNull
:
false
,
defaultValue
:
'[]'
},
//支部表id 外键 [1,2] --多选
monthIntegral
:
{
type
:
Sequelize
.
INTEGER
,
allowNull
:
false
},
//本月积分
monthIntegral
:
{
type
:
Sequelize
.
INTEGER
,
allowNull
:
false
},
//本月积分
totalIntegral
:
{
type
:
Sequelize
.
INTEGER
,
allowNull
:
false
},
//总积分
totalIntegral
:
{
type
:
Sequelize
.
INTEGER
,
allowNull
:
false
},
//总积分
fileName
:
{
type
:
Sequelize
.
STRING
(
100
),
allowNull
:
false
,
defaultValue
:
'[]'
},
//文件名称 ["",""] --多选
fileName
:
{
type
:
Sequelize
.
STRING
(
100
),
allowNull
:
false
,
defaultValue
:
'[]'
},
//文件名称 ["",""] --多选
fileType
:
{
type
:
Sequelize
.
INTEGER
,
allowNull
:
false
},
//文件类型
fileType
:
{
type
:
Sequelize
.
INTEGER
,
allowNull
:
false
},
//文件类型
...
...
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