target.js
1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-02-22 20:32:08
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2023-05-11 13:52:58
* @FilePath: \achievements-system\app\public\project.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
"use strict";
module.exports = (app) => {
const { STRING, INTEGER, DATE, NOW } = app.Sequelize;
const Target = app.model.define(
"target",
{
id: {
type: INTEGER,
primaryKey: true,
autoIncrement: true,
},
name: STRING,
illustrate: STRING,
module: STRING,
weight: STRING,
height: INTEGER,
order: INTEGER,
type: INTEGER,
createDate: {
type: DATE,
defaultValue: NOW,
},
updateDate: {
type: DATE,
defaultValue: NOW,
},
},
{
timestamps: true,
createdAt: "createDate",
updatedAt: "updateDate",
}
);
return Target;
};