players.ts
3.2 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
module.exports = function(sequelize:any, DataTypes:any) {
return sequelize.define('players', {
id: {
type: DataTypes.INTEGER,
allowNull: false,
primaryKey: true,
comment: "球员ID"
},
coach_id: {
type: DataTypes.INTEGER,
allowNull: true,
comment: "教练ID (球员转为教练后的对应ID)"
},
country_id: {
type: DataTypes.INTEGER,
allowNull: true,
comment: "国家ID"
},
logo: {
type: DataTypes.STRING(255),
allowNull: true,
comment: "球员Logo"
},
market_value: {
type: DataTypes.INTEGER,
allowNull: true,
comment: "市值"
},
market_value_currency: {
type: DataTypes.STRING(255),
allowNull: true,
comment: "市值单位"
},
ability: {
type: DataTypes.JSON,
allowNull: true,
comment: "能力评分"
},
name_en: {
type: DataTypes.STRING(255),
allowNull: true,
comment: "英文名称"
},
name_zh: {
type: DataTypes.STRING(255),
allowNull: true,
comment: "中文名称"
},
name_zht: {
type: DataTypes.STRING(255),
allowNull: true,
comment: "粤语名称"
},
national_logo: {
type: DataTypes.STRING(255),
allowNull: true,
comment: "球员Logo (国家队,可判断球队是国家队时使用)"
},
nationality: {
type: DataTypes.STRING(255),
allowNull: true,
comment: "国籍"
},
position: {
type: DataTypes.STRING(10),
allowNull: true,
comment: "擅长位置,F-前锋、M-中场、D-后卫、G-守门员、其他为未知"
},
preferred_foot: {
type: DataTypes.INTEGER,
allowNull: true,
comment: "惯用脚,0-未知、1-左脚、2-右脚、3-左右脚"
},
short_name_en: {
type: DataTypes.STRING(255),
allowNull: true,
comment: "英文简称"
},
short_name_zh: {
type: DataTypes.STRING(255),
allowNull: true,
comment: "中文简称"
},
short_name_zht: {
type: DataTypes.STRING(255),
allowNull: true,
comment: "粤语简称"
},
suffix: {
type: DataTypes.STRING(255),
allowNull: true,
comment: "球员u系列"
},
age: {
type: DataTypes.INTEGER,
allowNull: true,
comment: "年龄"
},
birthday: {
type: DataTypes.INTEGER,
allowNull: true,
comment: "生日 (0-未知)"
},
characteristics: {
type: DataTypes.JSON,
allowNull: true,
comment: "技术特点"
},
contract_until: {
type: DataTypes.INTEGER,
allowNull: true,
comment: "合同截止时间"
},
height: {
type: DataTypes.INTEGER,
allowNull: true,
comment: "身高"
},
positions: {
type: DataTypes.JSON,
allowNull: true,
comment: "详细位置"
},
weight: {
type: DataTypes.INTEGER,
allowNull: true,
comment: "体重"
},
updated_at: {
type: DataTypes.BIGINT,
allowNull: true,
get(){
return moment(this.getDataValue('updated_at')).format('YYYY-MM-DD HH:mm:ss');
}
},
created_at: {
type: DataTypes.DATE,
allowNull: true
}
});
};