timeline_area.js
1.75 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
"use strict";
/**
* 各区域时间线
*/
module.exports = function (sequelize, DataTypes) {
const
AbstractPO = require('kml-po-abstract'),
_ = require('lodash');
let option = AbstractPO.BaseOption({
tableName: 'tb_mf_timeline_area'
});
let entity = _.merge({
"id": {
"type": DataTypes.STRING(40),
"comment": "id",
"field": "id",
"allowNull": false,
"primaryKey": true
}
}, AbstractPO.DefaultEntity(sequelize, DataTypes), {
"province_name": {
"type": DataTypes.STRING(40),
"comment": "省",
"field": "province_name",
"allowNull": false
},
"province_short_name": {
"type": DataTypes.STRING(40),
"comment": "简称",
"field": "province_short_name"
},
"confirmed_count": {
"type": DataTypes.BIGINT,
"comment": "确认人数",
"field": "confirmed_count"
},
"suspected_count": {
"type": DataTypes.BIGINT,
"comment": "疑似人数",
"field": "suspected_count"
},
"cured_count": {
"type": DataTypes.BIGINT,
"comment": "治愈人数",
"field": "cured_count"
},
"dead_count": {
"type": DataTypes.BIGINT,
"comment": "死亡人数",
"field": "dead_count"
},
"comment": {
"type": DataTypes.STRING(200),
"comment": "注释",
"field": "comment"
},
"cities": {
"type": DataTypes.JSONB,
"comment": "城市",
"field": "cities"
},
"update_time": {
"type": DataTypes.DATE,
"comment": "更新时间",
"field": "update_time"
},
"country": {
"type": DataTypes.STRING(40),
"comment": "国家",
"field": "country"
}
});
return sequelize.define('timeline_area', entity, option);
};