明树Git Lab
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
J
jt_backend
Project
Project
Details
Activity
Releases
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
zengfanpei
jt_backend
Commits
2250a8ff
Commit
2250a8ff
authored
Jan 27, 2026
by
zfp1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
6ee74393
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
107 additions
and
16 deletions
+107
-16
rcTwhgl.js
db/model/jt/rcTwhgl.js
+106
-0
rcXxbs.js
db/model/jt/rcXxbs.js
+1
-16
No files found.
db/model/jt/rcTwhgl.js
0 → 100644
View file @
2250a8ff
const
{
DataTypes
}
=
require
(
'sequelize'
);
const
sequelize
=
require
(
'../index'
);
const
moment
=
require
(
'moment'
);
//投中管理- 建设期投资检查
const
RcTwhgl
=
sequelize
.
define
(
'RcTwhgl'
,
{
id
:
{
type
:
DataTypes
.
INTEGER
,
primaryKey
:
true
,
autoIncrement
:
true
},
meetingCode
:
{
type
:
DataTypes
.
STRING
(
50
),
allowNull
:
false
,
unique
:
true
,
comment
:
'会议编号'
},
meetingName
:
{
type
:
DataTypes
.
STRING
(
200
),
allowNull
:
false
,
comment
:
'会议名称'
},
meetingDate
:
{
type
:
DataTypes
.
DATE
,
allowNull
:
false
,
comment
:
'会议时间'
},
meetingLocation
:
{
type
:
DataTypes
.
STRING
(
200
),
allowNull
:
true
,
comment
:
'会议地点'
},
meetingLevel
:
{
type
:
DataTypes
.
ENUM
(
'company'
,
'department'
,
'project'
),
allowNull
:
false
,
defaultValue
:
'company'
,
comment
:
'会议层级:company-公司级,department-部门级,project-项目级'
},
attendingLeaders
:
{
type
:
DataTypes
.
STRING
(
500
),
allowNull
:
true
,
comment
:
'参会领导'
},
attendingDepartments
:
{
type
:
DataTypes
.
STRING
(
500
),
allowNull
:
true
,
comment
:
'参会部门'
},
meetingMinutesAttachment
:
{
type
:
DataTypes
.
JSON
,
allowNull
:
true
,
comment
:
'会议纪要附件路径'
},
// sourceId: {
// type: DataTypes.INTEGER,
// comment: "所属主表id"
// },
projectId
:
{
type
:
DataTypes
.
INTEGER
,
comment
:
"所属项目ID"
,
},
del
:
{
type
:
DataTypes
.
INTEGER
,
defaultValue
:
0
,
comment
:
"0 正常 1 删除"
},
creator
:
{
type
:
DataTypes
.
INTEGER
,
comment
:
"创建人"
},
createdAt
:
{
type
:
DataTypes
.
DATE
,
defaultValue
:
new
Date
(),
get
()
{
const
rawValue
=
this
.
getDataValue
(
'createdAt'
);
return
rawValue
?
moment
(
rawValue
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
''
;
}
},
updatedAt
:
{
// 同样处理 updatedAt
type
:
DataTypes
.
DATE
,
defaultValue
:
new
Date
(),
get
()
{
const
rawValue
=
this
.
getDataValue
(
'updatedAt'
);
return
rawValue
?
moment
(
rawValue
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
''
;
}
}
},
{
tableName
:
'jt_rc_twhgl'
,
// 指定表名(如果与模型名不同)
timestamps
:
true
,
// 是否自动添加 createdAt 和 updatedAt 字段(覆盖全局设置)
});
// 同步模型到数据库(创建表)
RcTwhgl
.
sync
({
// force: false,
// force: true ,//会删除已存在表并重新创建
alter
:
true
})
.
then
(()
=>
{
console
.
log
(
'RcTwhgl 表同步成功'
);
});
module
.
exports
=
RcTwhgl
;
\ No newline at end of file
db/model/jt/rcXxbs.js
View file @
2250a8ff
...
...
@@ -9,22 +9,7 @@ const RcXxbs = sequelize.define('RcXxbs', {
primaryKey
:
true
,
autoIncrement
:
true
},
ztmc
:
{
type
:
DataTypes
.
STRING
,
comment
:
"主体名称"
},
wjlx
:
{
type
:
DataTypes
.
STRING
,
comment
:
"文件类型"
},
wj
:
{
type
:
DataTypes
.
JSON
,
comment
:
"文件上传"
},
jyz
:
{
type
:
DataTypes
.
STRING
,
comment
:
"建议值"
},
...
...
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