volleyballsimtypes 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +5 -5
- package/src/data/index.ts +0 -2
- package/src/data/models/block.ts +0 -159
- package/src/data/models/coach.ts +0 -94
- package/src/data/models/country.ts +0 -105
- package/src/data/models/event.ts +0 -83
- package/src/data/models/index.ts +0 -22
- package/src/data/models/league.ts +0 -90
- package/src/data/models/libero-replacement.ts +0 -104
- package/src/data/models/match-set-stats.ts +0 -204
- package/src/data/models/match-set.ts +0 -152
- package/src/data/models/match.ts +0 -106
- package/src/data/models/performance-stats.ts +0 -136
- package/src/data/models/player.ts +0 -370
- package/src/data/models/rally-position.ts +0 -79
- package/src/data/models/rally.ts +0 -229
- package/src/data/models/reception.ts +0 -113
- package/src/data/models/score.ts +0 -99
- package/src/data/models/season-teams.ts +0 -67
- package/src/data/models/season.ts +0 -103
- package/src/data/models/serve.ts +0 -113
- package/src/data/models/set.ts +0 -113
- package/src/data/models/spike.ts +0 -113
- package/src/data/models/substitution.ts +0 -98
- package/src/data/models/team.ts +0 -193
- package/src/data/transformers/block.ts +0 -117
- package/src/data/transformers/coach.ts +0 -33
- package/src/data/transformers/country.ts +0 -23
- package/src/data/transformers/court-position.ts +0 -43
- package/src/data/transformers/court-target.ts +0 -58
- package/src/data/transformers/event-type.ts +0 -35
- package/src/data/transformers/formation.ts +0 -16
- package/src/data/transformers/index.ts +0 -27
- package/src/data/transformers/league.ts +0 -26
- package/src/data/transformers/libero-replacement.ts +0 -62
- package/src/data/transformers/match-set-stats.ts +0 -101
- package/src/data/transformers/match-set.ts +0 -59
- package/src/data/transformers/match.ts +0 -48
- package/src/data/transformers/performance-stats.ts +0 -40
- package/src/data/transformers/player.ts +0 -109
- package/src/data/transformers/rally-position.ts +0 -24
- package/src/data/transformers/rally.ts +0 -139
- package/src/data/transformers/reception.ts +0 -98
- package/src/data/transformers/role.ts +0 -31
- package/src/data/transformers/score.ts +0 -43
- package/src/data/transformers/season.ts +0 -42
- package/src/data/transformers/serve.ts +0 -100
- package/src/data/transformers/set.ts +0 -98
- package/src/data/transformers/spike.ts +0 -102
- package/src/data/transformers/substitution.ts +0 -42
- package/src/data/transformers/team.ts +0 -45
- package/src/data/transformers/trait.ts +0 -37
- package/src/index.ts +0 -7
- package/src/routing/events.ts +0 -60
- package/src/routing/index.ts +0 -5
- package/src/routing/league.ts +0 -15
- package/src/routing/match.ts +0 -52
- package/src/routing/player.ts +0 -24
- package/src/routing/team.ts +0 -14
- package/src/service/coach/__stubs__/index.ts +0 -46
- package/src/service/coach/coach.test.ts +0 -10
- package/src/service/coach/coach.ts +0 -30
- package/src/service/coach/formation.test.ts +0 -10
- package/src/service/coach/formation.ts +0 -160
- package/src/service/coach/index.ts +0 -2
- package/src/service/country/__stubs__/index.ts +0 -13
- package/src/service/country/country.test.ts +0 -10
- package/src/service/country/country.ts +0 -23
- package/src/service/country/index.ts +0 -1
- package/src/service/event/__stubs__/index.ts +0 -25
- package/src/service/event/block.test.ts +0 -100
- package/src/service/event/block.ts +0 -69
- package/src/service/event/in-play-event.ts +0 -37
- package/src/service/event/libero-replacement.test.ts +0 -37
- package/src/service/event/libero-replacement.ts +0 -25
- package/src/service/event/rally-event.ts +0 -33
- package/src/service/event/reception.test.ts +0 -50
- package/src/service/event/reception.ts +0 -38
- package/src/service/event/score.test.ts +0 -29
- package/src/service/event/score.ts +0 -22
- package/src/service/event/serve.test.ts +0 -50
- package/src/service/event/serve.ts +0 -39
- package/src/service/event/set.test.ts +0 -50
- package/src/service/event/set.ts +0 -38
- package/src/service/event/spike.test.ts +0 -64
- package/src/service/event/spike.ts +0 -46
- package/src/service/event/substitution.ts +0 -16
- package/src/service/index.ts +0 -17
- package/src/service/league/index.ts +0 -3
- package/src/service/league/league.ts +0 -112
- package/src/service/league/season.ts +0 -41
- package/src/service/league/standing.ts +0 -82
- package/src/service/main.ts +0 -52
- package/src/service/match/__stubs__/index.ts +0 -119
- package/src/service/match/court-position.test.ts +0 -73
- package/src/service/match/court-position.ts +0 -46
- package/src/service/match/court-target.test.ts +0 -39
- package/src/service/match/court-target.ts +0 -30
- package/src/service/match/index.ts +0 -6
- package/src/service/match/match-set.test.ts +0 -174
- package/src/service/match/match-set.ts +0 -140
- package/src/service/match/match-team.test.ts +0 -16
- package/src/service/match/match-team.ts +0 -13
- package/src/service/match/match.test.ts +0 -80
- package/src/service/match/match.ts +0 -63
- package/src/service/match/rally.test.ts +0 -94
- package/src/service/match/rally.ts +0 -79
- package/src/service/player/__stubs__/index.ts +0 -1433
- package/src/service/player/index.ts +0 -5
- package/src/service/player/performance-stats.test.ts +0 -24
- package/src/service/player/performance-stats.ts +0 -47
- package/src/service/player/player.test.ts +0 -51
- package/src/service/player/player.ts +0 -101
- package/src/service/player/role.test.ts +0 -29
- package/src/service/player/role.ts +0 -33
- package/src/service/player/stats.test.ts +0 -23
- package/src/service/player/stats.ts +0 -29
- package/src/service/player/trait.test.ts +0 -10
- package/src/service/player/trait.ts +0 -124
- package/src/service/team/__stubs__/index.ts +0 -290
- package/src/service/team/index.ts +0 -1
- package/src/service/team/team.test.ts +0 -30
- package/src/service/team/team.ts +0 -45
- package/src/service/utils/enum-utils.test.ts +0 -10
- package/src/service/utils/enum-utils.ts +0 -6
- package/src/service/utils/index.ts +0 -4
- package/src/service/utils/object-utils.ts +0 -1
- package/src/service/utils/rng-utils.test.ts +0 -32
- package/src/service/utils/rng-utils.ts +0 -41
- package/src/service/utils/string-utils.test.ts +0 -28
- package/src/service/utils/string-utils.ts +0 -13
- package/src/service/utils/testing-utils.ts +0 -2
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
import * as Sequelize from 'sequelize'
|
|
2
|
-
import { DataTypes, Model, Optional } from 'sequelize'
|
|
3
|
-
import type { MatchSetId, MatchSetModel } from './match-set'
|
|
4
|
-
import type { PlayerId, PlayerModel } from './player'
|
|
5
|
-
|
|
6
|
-
export interface MatchSetStatsAttributes {
|
|
7
|
-
player_id: string
|
|
8
|
-
match_set_id: string
|
|
9
|
-
aces: number
|
|
10
|
-
attempts: number
|
|
11
|
-
contacts: number
|
|
12
|
-
rallies_played: number
|
|
13
|
-
serve_success: number
|
|
14
|
-
serve_error: number
|
|
15
|
-
reception_success: number
|
|
16
|
-
reception_error: number
|
|
17
|
-
set_success: number
|
|
18
|
-
set_error: number
|
|
19
|
-
attack_success: number
|
|
20
|
-
attack_error: number
|
|
21
|
-
block_success: number
|
|
22
|
-
block_error: number
|
|
23
|
-
kills: number
|
|
24
|
-
kill_blocks: number
|
|
25
|
-
assists: number
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export type MatchSetStatsPk = 'player_id' | 'match_set_id'
|
|
29
|
-
export type MatchSetStatsId = MatchSetStatsModel[MatchSetStatsPk]
|
|
30
|
-
export type MatchSetStatsOptionalAttributes =
|
|
31
|
-
'aces'
|
|
32
|
-
| 'attempts'
|
|
33
|
-
| 'contacts'
|
|
34
|
-
| 'rallies_played'
|
|
35
|
-
| 'serve_success'
|
|
36
|
-
| 'serve_error'
|
|
37
|
-
| 'reception_success'
|
|
38
|
-
| 'reception_error'
|
|
39
|
-
| 'set_success'
|
|
40
|
-
| 'set_error'
|
|
41
|
-
| 'attack_success'
|
|
42
|
-
| 'attack_error'
|
|
43
|
-
| 'block_success'
|
|
44
|
-
| 'block_error'
|
|
45
|
-
| 'kills'
|
|
46
|
-
| 'kill_blocks'
|
|
47
|
-
| 'assists'
|
|
48
|
-
export type MatchSetStatsCreationAttributes = Optional<MatchSetStatsAttributes, MatchSetStatsOptionalAttributes>
|
|
49
|
-
|
|
50
|
-
export class MatchSetStatsModel extends Model<MatchSetStatsAttributes, MatchSetStatsCreationAttributes> implements MatchSetStatsAttributes {
|
|
51
|
-
player_id!: string
|
|
52
|
-
match_set_id!: string
|
|
53
|
-
aces!: number
|
|
54
|
-
attempts!: number
|
|
55
|
-
contacts!: number
|
|
56
|
-
rallies_played!: number
|
|
57
|
-
serve_success!: number
|
|
58
|
-
serve_error!: number
|
|
59
|
-
reception_success!: number
|
|
60
|
-
reception_error!: number
|
|
61
|
-
set_success!: number
|
|
62
|
-
set_error!: number
|
|
63
|
-
attack_success!: number
|
|
64
|
-
attack_error!: number
|
|
65
|
-
block_success!: number
|
|
66
|
-
block_error!: number
|
|
67
|
-
kills!: number
|
|
68
|
-
kill_blocks!: number
|
|
69
|
-
assists!: number
|
|
70
|
-
|
|
71
|
-
// MatchSetStats belongsTo MatchSet via match_set_id
|
|
72
|
-
match_set!: MatchSetModel
|
|
73
|
-
getMatch_set!: Sequelize.BelongsToGetAssociationMixin<MatchSetModel>
|
|
74
|
-
setMatch_set!: Sequelize.BelongsToSetAssociationMixin<MatchSetModel, MatchSetId>
|
|
75
|
-
createMatch_set!: Sequelize.BelongsToCreateAssociationMixin<MatchSetModel>
|
|
76
|
-
// MatchSetStats belongsTo Player via player_id
|
|
77
|
-
player!: PlayerModel
|
|
78
|
-
getPlayer!: Sequelize.BelongsToGetAssociationMixin<PlayerModel>
|
|
79
|
-
setPlayer!: Sequelize.BelongsToSetAssociationMixin<PlayerModel, PlayerId>
|
|
80
|
-
createPlayer!: Sequelize.BelongsToCreateAssociationMixin<PlayerModel>
|
|
81
|
-
|
|
82
|
-
static initModel (sequelize: Sequelize.Sequelize): typeof MatchSetStatsModel {
|
|
83
|
-
return MatchSetStatsModel.init({
|
|
84
|
-
player_id: {
|
|
85
|
-
type: DataTypes.UUID,
|
|
86
|
-
allowNull: false,
|
|
87
|
-
primaryKey: true,
|
|
88
|
-
references: {
|
|
89
|
-
model: 'Player',
|
|
90
|
-
key: 'player_id'
|
|
91
|
-
}
|
|
92
|
-
},
|
|
93
|
-
match_set_id: {
|
|
94
|
-
type: DataTypes.UUID,
|
|
95
|
-
allowNull: false,
|
|
96
|
-
primaryKey: true,
|
|
97
|
-
references: {
|
|
98
|
-
model: 'MatchSet',
|
|
99
|
-
key: 'match_set_id'
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
aces: {
|
|
103
|
-
type: DataTypes.INTEGER,
|
|
104
|
-
allowNull: false,
|
|
105
|
-
defaultValue: 0
|
|
106
|
-
},
|
|
107
|
-
attempts: {
|
|
108
|
-
type: DataTypes.INTEGER,
|
|
109
|
-
allowNull: false,
|
|
110
|
-
defaultValue: 0
|
|
111
|
-
},
|
|
112
|
-
contacts: {
|
|
113
|
-
type: DataTypes.INTEGER,
|
|
114
|
-
allowNull: false,
|
|
115
|
-
defaultValue: 0
|
|
116
|
-
},
|
|
117
|
-
rallies_played: {
|
|
118
|
-
type: DataTypes.INTEGER,
|
|
119
|
-
allowNull: false,
|
|
120
|
-
defaultValue: 0
|
|
121
|
-
},
|
|
122
|
-
serve_success: {
|
|
123
|
-
type: DataTypes.INTEGER,
|
|
124
|
-
allowNull: false,
|
|
125
|
-
defaultValue: 0
|
|
126
|
-
},
|
|
127
|
-
serve_error: {
|
|
128
|
-
type: DataTypes.INTEGER,
|
|
129
|
-
allowNull: false,
|
|
130
|
-
defaultValue: 0
|
|
131
|
-
},
|
|
132
|
-
reception_success: {
|
|
133
|
-
type: DataTypes.INTEGER,
|
|
134
|
-
allowNull: false,
|
|
135
|
-
defaultValue: 0
|
|
136
|
-
},
|
|
137
|
-
reception_error: {
|
|
138
|
-
type: DataTypes.INTEGER,
|
|
139
|
-
allowNull: false,
|
|
140
|
-
defaultValue: 0
|
|
141
|
-
},
|
|
142
|
-
set_success: {
|
|
143
|
-
type: DataTypes.INTEGER,
|
|
144
|
-
allowNull: false,
|
|
145
|
-
defaultValue: 0
|
|
146
|
-
},
|
|
147
|
-
set_error: {
|
|
148
|
-
type: DataTypes.INTEGER,
|
|
149
|
-
allowNull: false,
|
|
150
|
-
defaultValue: 0
|
|
151
|
-
},
|
|
152
|
-
attack_success: {
|
|
153
|
-
type: DataTypes.INTEGER,
|
|
154
|
-
allowNull: false,
|
|
155
|
-
defaultValue: 0
|
|
156
|
-
},
|
|
157
|
-
attack_error: {
|
|
158
|
-
type: DataTypes.INTEGER,
|
|
159
|
-
allowNull: false,
|
|
160
|
-
defaultValue: 0
|
|
161
|
-
},
|
|
162
|
-
block_success: {
|
|
163
|
-
type: DataTypes.INTEGER,
|
|
164
|
-
allowNull: false,
|
|
165
|
-
defaultValue: 0
|
|
166
|
-
},
|
|
167
|
-
block_error: {
|
|
168
|
-
type: DataTypes.INTEGER,
|
|
169
|
-
allowNull: false,
|
|
170
|
-
defaultValue: 0
|
|
171
|
-
},
|
|
172
|
-
kills: {
|
|
173
|
-
type: DataTypes.INTEGER,
|
|
174
|
-
allowNull: false,
|
|
175
|
-
defaultValue: 0
|
|
176
|
-
},
|
|
177
|
-
kill_blocks: {
|
|
178
|
-
type: DataTypes.INTEGER,
|
|
179
|
-
allowNull: false,
|
|
180
|
-
defaultValue: 0
|
|
181
|
-
},
|
|
182
|
-
assists: {
|
|
183
|
-
type: DataTypes.INTEGER,
|
|
184
|
-
allowNull: false,
|
|
185
|
-
defaultValue: 0
|
|
186
|
-
}
|
|
187
|
-
}, {
|
|
188
|
-
sequelize,
|
|
189
|
-
tableName: 'MatchSetStats',
|
|
190
|
-
schema: 'public',
|
|
191
|
-
timestamps: false,
|
|
192
|
-
indexes: [
|
|
193
|
-
{
|
|
194
|
-
name: 'MatchSetStats_pk',
|
|
195
|
-
unique: true,
|
|
196
|
-
fields: [
|
|
197
|
-
{ name: 'player_id' },
|
|
198
|
-
{ name: 'match_set_id' }
|
|
199
|
-
]
|
|
200
|
-
}
|
|
201
|
-
]
|
|
202
|
-
})
|
|
203
|
-
}
|
|
204
|
-
}
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
import * as Sequelize from 'sequelize'
|
|
2
|
-
import { DataTypes, Model, Optional } from 'sequelize'
|
|
3
|
-
import type { MatchId, MatchModel } from './match'
|
|
4
|
-
import type { MatchSetStatsAttributes, MatchSetStatsId, MatchSetStatsModel } from './match-set-stats'
|
|
5
|
-
import type { PlayerId, PlayerModel } from './player'
|
|
6
|
-
import type { RallyAttributes, RallyId, RallyModel } from './rally'
|
|
7
|
-
|
|
8
|
-
export interface MatchSetAttributes {
|
|
9
|
-
match_set_id: string
|
|
10
|
-
match_id: string
|
|
11
|
-
is_tie_break: boolean
|
|
12
|
-
order: number
|
|
13
|
-
home_score: number
|
|
14
|
-
away_score: number
|
|
15
|
-
home_libero?: string
|
|
16
|
-
away_libero?: string
|
|
17
|
-
Rallies?: RallyAttributes[]
|
|
18
|
-
MatchSetStats?: MatchSetStatsAttributes[]
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export type MatchSetPk = 'match_set_id'
|
|
22
|
-
export type MatchSetId = MatchSetModel[MatchSetPk]
|
|
23
|
-
export type MatchSetOptionalAttributes = 'home_libero' | 'away_libero'
|
|
24
|
-
export type MatchSetCreationAttributes = Optional<MatchSetAttributes, MatchSetOptionalAttributes>
|
|
25
|
-
|
|
26
|
-
export class MatchSetModel extends Model<MatchSetAttributes, MatchSetCreationAttributes> implements MatchSetAttributes {
|
|
27
|
-
match_set_id!: string
|
|
28
|
-
match_id!: string
|
|
29
|
-
is_tie_break!: boolean
|
|
30
|
-
home_libero?: string
|
|
31
|
-
away_libero?: string
|
|
32
|
-
order!: number
|
|
33
|
-
home_score!: number
|
|
34
|
-
away_score!: number
|
|
35
|
-
|
|
36
|
-
// MatchSet belongsTo Match via match_id
|
|
37
|
-
match!: MatchModel
|
|
38
|
-
getMatch!: Sequelize.BelongsToGetAssociationMixin<MatchModel>
|
|
39
|
-
setMatch!: Sequelize.BelongsToSetAssociationMixin<MatchModel, MatchId>
|
|
40
|
-
createMatch!: Sequelize.BelongsToCreateAssociationMixin<MatchModel>
|
|
41
|
-
// MatchSet hasMany MatchSetStats via match_set_id
|
|
42
|
-
MatchSetStats!: MatchSetStatsModel[]
|
|
43
|
-
getMatchSetStats!: Sequelize.HasManyGetAssociationsMixin<MatchSetStatsModel>
|
|
44
|
-
setMatchSetStats!: Sequelize.HasManySetAssociationsMixin<MatchSetStatsModel, MatchSetStatsId>
|
|
45
|
-
addMatchSetStat!: Sequelize.HasManyAddAssociationMixin<MatchSetStatsModel, MatchSetStatsId>
|
|
46
|
-
addMatchSetStats!: Sequelize.HasManyAddAssociationsMixin<MatchSetStatsModel, MatchSetStatsId>
|
|
47
|
-
createMatchSetStat!: Sequelize.HasManyCreateAssociationMixin<MatchSetStatsModel>
|
|
48
|
-
removeMatchSetStat!: Sequelize.HasManyRemoveAssociationMixin<MatchSetStatsModel, MatchSetStatsId>
|
|
49
|
-
removeMatchSetStats!: Sequelize.HasManyRemoveAssociationsMixin<MatchSetStatsModel, MatchSetStatsId>
|
|
50
|
-
hasMatchSetStat!: Sequelize.HasManyHasAssociationMixin<MatchSetStatsModel, MatchSetStatsId>
|
|
51
|
-
hasMatchSetStats!: Sequelize.HasManyHasAssociationsMixin<MatchSetStatsModel, MatchSetStatsId>
|
|
52
|
-
countMatchSetStats!: Sequelize.HasManyCountAssociationsMixin
|
|
53
|
-
// MatchSet belongsToMany Player via match_set_id and player_id
|
|
54
|
-
player_id_Players!: PlayerModel[]
|
|
55
|
-
getPlayer_id_Players!: Sequelize.BelongsToManyGetAssociationsMixin<PlayerModel>
|
|
56
|
-
setPlayer_id_Players!: Sequelize.BelongsToManySetAssociationsMixin<PlayerModel, PlayerId>
|
|
57
|
-
addPlayer_id_Player!: Sequelize.BelongsToManyAddAssociationMixin<PlayerModel, PlayerId>
|
|
58
|
-
addPlayer_id_Players!: Sequelize.BelongsToManyAddAssociationsMixin<PlayerModel, PlayerId>
|
|
59
|
-
createPlayer_id_Player!: Sequelize.BelongsToManyCreateAssociationMixin<PlayerModel>
|
|
60
|
-
removePlayer_id_Player!: Sequelize.BelongsToManyRemoveAssociationMixin<PlayerModel, PlayerId>
|
|
61
|
-
removePlayer_id_Players!: Sequelize.BelongsToManyRemoveAssociationsMixin<PlayerModel, PlayerId>
|
|
62
|
-
hasPlayer_id_Player!: Sequelize.BelongsToManyHasAssociationMixin<PlayerModel, PlayerId>
|
|
63
|
-
hasPlayer_id_Players!: Sequelize.BelongsToManyHasAssociationsMixin<PlayerModel, PlayerId>
|
|
64
|
-
countPlayer_id_Players!: Sequelize.BelongsToManyCountAssociationsMixin
|
|
65
|
-
// MatchSet hasMany Rally via match_set_id
|
|
66
|
-
Rallies!: RallyModel[]
|
|
67
|
-
getRallies!: Sequelize.HasManyGetAssociationsMixin<RallyModel>
|
|
68
|
-
setRallies!: Sequelize.HasManySetAssociationsMixin<RallyModel, RallyId>
|
|
69
|
-
addRally!: Sequelize.HasManyAddAssociationMixin<RallyModel, RallyId>
|
|
70
|
-
addRallies!: Sequelize.HasManyAddAssociationsMixin<RallyModel, RallyId>
|
|
71
|
-
createRally!: Sequelize.HasManyCreateAssociationMixin<RallyModel>
|
|
72
|
-
removeRally!: Sequelize.HasManyRemoveAssociationMixin<RallyModel, RallyId>
|
|
73
|
-
removeRallies!: Sequelize.HasManyRemoveAssociationsMixin<RallyModel, RallyId>
|
|
74
|
-
hasRally!: Sequelize.HasManyHasAssociationMixin<RallyModel, RallyId>
|
|
75
|
-
hasRallies!: Sequelize.HasManyHasAssociationsMixin<RallyModel, RallyId>
|
|
76
|
-
countRallies!: Sequelize.HasManyCountAssociationsMixin
|
|
77
|
-
// MatchSet belongsTo Player via away_libero
|
|
78
|
-
away_libero_Player!: PlayerModel
|
|
79
|
-
getAway_libero_Player!: Sequelize.BelongsToGetAssociationMixin<PlayerModel>
|
|
80
|
-
setAway_libero_Player!: Sequelize.BelongsToSetAssociationMixin<PlayerModel, PlayerId>
|
|
81
|
-
createAway_libero_Player!: Sequelize.BelongsToCreateAssociationMixin<PlayerModel>
|
|
82
|
-
// MatchSet belongsTo Player via home_libero
|
|
83
|
-
home_libero_Player!: PlayerModel
|
|
84
|
-
getHome_libero_Player!: Sequelize.BelongsToGetAssociationMixin<PlayerModel>
|
|
85
|
-
setHome_libero_Player!: Sequelize.BelongsToSetAssociationMixin<PlayerModel, PlayerId>
|
|
86
|
-
createHome_libero_Player!: Sequelize.BelongsToCreateAssociationMixin<PlayerModel>
|
|
87
|
-
|
|
88
|
-
static initModel (sequelize: Sequelize.Sequelize): typeof MatchSetModel {
|
|
89
|
-
return MatchSetModel.init({
|
|
90
|
-
match_set_id: {
|
|
91
|
-
type: DataTypes.UUID,
|
|
92
|
-
allowNull: false,
|
|
93
|
-
primaryKey: true
|
|
94
|
-
},
|
|
95
|
-
match_id: {
|
|
96
|
-
type: DataTypes.UUID,
|
|
97
|
-
allowNull: false,
|
|
98
|
-
references: {
|
|
99
|
-
model: 'Match',
|
|
100
|
-
key: 'match_id'
|
|
101
|
-
}
|
|
102
|
-
},
|
|
103
|
-
is_tie_break: {
|
|
104
|
-
type: DataTypes.BOOLEAN,
|
|
105
|
-
allowNull: false,
|
|
106
|
-
defaultValue: false
|
|
107
|
-
},
|
|
108
|
-
home_libero: {
|
|
109
|
-
type: DataTypes.UUID,
|
|
110
|
-
allowNull: true,
|
|
111
|
-
references: {
|
|
112
|
-
model: 'Player',
|
|
113
|
-
key: 'player_id'
|
|
114
|
-
}
|
|
115
|
-
},
|
|
116
|
-
away_libero: {
|
|
117
|
-
type: DataTypes.UUID,
|
|
118
|
-
allowNull: true,
|
|
119
|
-
references: {
|
|
120
|
-
model: 'Player',
|
|
121
|
-
key: 'player_id'
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
order: {
|
|
125
|
-
type: DataTypes.INTEGER,
|
|
126
|
-
allowNull: false
|
|
127
|
-
},
|
|
128
|
-
home_score: {
|
|
129
|
-
type: DataTypes.INTEGER,
|
|
130
|
-
allowNull: false
|
|
131
|
-
},
|
|
132
|
-
away_score: {
|
|
133
|
-
type: DataTypes.INTEGER,
|
|
134
|
-
allowNull: false
|
|
135
|
-
}
|
|
136
|
-
}, {
|
|
137
|
-
sequelize,
|
|
138
|
-
tableName: 'MatchSet',
|
|
139
|
-
schema: 'public',
|
|
140
|
-
timestamps: false,
|
|
141
|
-
indexes: [
|
|
142
|
-
{
|
|
143
|
-
name: 'MatchSet_pk',
|
|
144
|
-
unique: true,
|
|
145
|
-
fields: [
|
|
146
|
-
{ name: 'match_set_id' }
|
|
147
|
-
]
|
|
148
|
-
}
|
|
149
|
-
]
|
|
150
|
-
})
|
|
151
|
-
}
|
|
152
|
-
}
|
package/src/data/models/match.ts
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import * as Sequelize from 'sequelize'
|
|
2
|
-
import { DataTypes, Model } from 'sequelize'
|
|
3
|
-
import type { MatchSetAttributes, MatchSetId, MatchSetModel } from './match-set'
|
|
4
|
-
import type { SeasonId, SeasonModel } from './season'
|
|
5
|
-
import type { TeamId, TeamModel } from './team'
|
|
6
|
-
|
|
7
|
-
export interface MatchAttributes {
|
|
8
|
-
match_id: string
|
|
9
|
-
home_team: string
|
|
10
|
-
away_team: string
|
|
11
|
-
scheduled_date: string
|
|
12
|
-
season_id: string
|
|
13
|
-
MatchSets?: MatchSetAttributes[]
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export type MatchPk = 'match_id'
|
|
17
|
-
export type MatchId = MatchModel[MatchPk]
|
|
18
|
-
export type MatchCreationAttributes = MatchAttributes
|
|
19
|
-
|
|
20
|
-
export class MatchModel extends Model<MatchAttributes, MatchCreationAttributes> implements MatchAttributes {
|
|
21
|
-
match_id!: string
|
|
22
|
-
home_team!: string
|
|
23
|
-
away_team!: string
|
|
24
|
-
scheduled_date!: string
|
|
25
|
-
season_id!: string
|
|
26
|
-
|
|
27
|
-
// Match hasMany MatchSet via match_id
|
|
28
|
-
MatchSets!: MatchSetModel[]
|
|
29
|
-
getMatchSets!: Sequelize.HasManyGetAssociationsMixin<MatchSetModel>
|
|
30
|
-
setMatchSets!: Sequelize.HasManySetAssociationsMixin<MatchSetModel, MatchSetId>
|
|
31
|
-
addMatchSet!: Sequelize.HasManyAddAssociationMixin<MatchSetModel, MatchSetId>
|
|
32
|
-
addMatchSets!: Sequelize.HasManyAddAssociationsMixin<MatchSetModel, MatchSetId>
|
|
33
|
-
createMatchSet!: Sequelize.HasManyCreateAssociationMixin<MatchSetModel>
|
|
34
|
-
removeMatchSet!: Sequelize.HasManyRemoveAssociationMixin<MatchSetModel, MatchSetId>
|
|
35
|
-
removeMatchSets!: Sequelize.HasManyRemoveAssociationsMixin<MatchSetModel, MatchSetId>
|
|
36
|
-
hasMatchSet!: Sequelize.HasManyHasAssociationMixin<MatchSetModel, MatchSetId>
|
|
37
|
-
hasMatchSets!: Sequelize.HasManyHasAssociationsMixin<MatchSetModel, MatchSetId>
|
|
38
|
-
countMatchSets!: Sequelize.HasManyCountAssociationsMixin
|
|
39
|
-
// Match belongsTo Season via season_id
|
|
40
|
-
season!: SeasonModel
|
|
41
|
-
getSeason!: Sequelize.BelongsToGetAssociationMixin<SeasonModel>
|
|
42
|
-
setSeason!: Sequelize.BelongsToSetAssociationMixin<SeasonModel, SeasonId>
|
|
43
|
-
createSeason!: Sequelize.BelongsToCreateAssociationMixin<SeasonModel>
|
|
44
|
-
// Match belongsTo Team via home_team
|
|
45
|
-
homeTeam!: TeamModel
|
|
46
|
-
getHomeTeam!: Sequelize.BelongsToGetAssociationMixin<TeamModel>
|
|
47
|
-
setHomeTeam!: Sequelize.BelongsToSetAssociationMixin<TeamModel, TeamId>
|
|
48
|
-
createHomeTeam!: Sequelize.BelongsToCreateAssociationMixin<TeamModel>
|
|
49
|
-
// Match belongsTo Team via away_team
|
|
50
|
-
awayTeam!: TeamModel
|
|
51
|
-
getAwayTeam!: Sequelize.BelongsToGetAssociationMixin<TeamModel>
|
|
52
|
-
setAwayTeam!: Sequelize.BelongsToSetAssociationMixin<TeamModel, TeamId>
|
|
53
|
-
createAwayTeam!: Sequelize.BelongsToCreateAssociationMixin<TeamModel>
|
|
54
|
-
|
|
55
|
-
static initModel (sequelize: Sequelize.Sequelize): typeof MatchModel {
|
|
56
|
-
return MatchModel.init({
|
|
57
|
-
match_id: {
|
|
58
|
-
type: DataTypes.UUID,
|
|
59
|
-
allowNull: false,
|
|
60
|
-
primaryKey: true
|
|
61
|
-
},
|
|
62
|
-
home_team: {
|
|
63
|
-
type: DataTypes.UUID,
|
|
64
|
-
allowNull: false,
|
|
65
|
-
references: {
|
|
66
|
-
model: 'Team',
|
|
67
|
-
key: 'team_id'
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
away_team: {
|
|
71
|
-
type: DataTypes.UUID,
|
|
72
|
-
allowNull: false,
|
|
73
|
-
references: {
|
|
74
|
-
model: 'Team',
|
|
75
|
-
key: 'team_id'
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
scheduled_date: {
|
|
79
|
-
type: DataTypes.DATEONLY,
|
|
80
|
-
allowNull: false
|
|
81
|
-
},
|
|
82
|
-
season_id: {
|
|
83
|
-
type: DataTypes.UUID,
|
|
84
|
-
allowNull: false,
|
|
85
|
-
references: {
|
|
86
|
-
model: 'Season',
|
|
87
|
-
key: 'season_id'
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}, {
|
|
91
|
-
sequelize,
|
|
92
|
-
tableName: 'Match',
|
|
93
|
-
schema: 'public',
|
|
94
|
-
timestamps: false,
|
|
95
|
-
indexes: [
|
|
96
|
-
{
|
|
97
|
-
name: 'Match_pk',
|
|
98
|
-
unique: true,
|
|
99
|
-
fields: [
|
|
100
|
-
{ name: 'match_id' }
|
|
101
|
-
]
|
|
102
|
-
}
|
|
103
|
-
]
|
|
104
|
-
})
|
|
105
|
-
}
|
|
106
|
-
}
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
import * as Sequelize from 'sequelize'
|
|
2
|
-
import { DataTypes, Model, Optional } from 'sequelize'
|
|
3
|
-
import type { PlayerId, PlayerModel } from './player'
|
|
4
|
-
|
|
5
|
-
export interface PerformanceStatsAttributes {
|
|
6
|
-
player_id: string
|
|
7
|
-
setting: number
|
|
8
|
-
pass: number
|
|
9
|
-
reception: number
|
|
10
|
-
spike: number
|
|
11
|
-
back_attack: number
|
|
12
|
-
jump: number
|
|
13
|
-
block: number
|
|
14
|
-
awareness: number
|
|
15
|
-
serve: number
|
|
16
|
-
stamina: number
|
|
17
|
-
defense: number
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export type PerformanceStatsPk = 'player_id'
|
|
21
|
-
export type PerformanceStatsId = PerformanceStatsModel[PerformanceStatsPk]
|
|
22
|
-
export type PerformanceStatsOptionalAttributes =
|
|
23
|
-
'setting'
|
|
24
|
-
| 'pass'
|
|
25
|
-
| 'reception'
|
|
26
|
-
| 'spike'
|
|
27
|
-
| 'back_attack'
|
|
28
|
-
| 'jump'
|
|
29
|
-
| 'awareness'
|
|
30
|
-
| 'serve'
|
|
31
|
-
| 'stamina'
|
|
32
|
-
| 'defense'
|
|
33
|
-
export type PerformanceStatsCreationAttributes = Optional<PerformanceStatsAttributes, PerformanceStatsOptionalAttributes>
|
|
34
|
-
|
|
35
|
-
export class PerformanceStatsModel extends Model<PerformanceStatsAttributes, PerformanceStatsCreationAttributes> implements PerformanceStatsAttributes {
|
|
36
|
-
player_id!: string
|
|
37
|
-
setting!: number
|
|
38
|
-
pass!: number
|
|
39
|
-
reception!: number
|
|
40
|
-
spike!: number
|
|
41
|
-
back_attack!: number
|
|
42
|
-
jump!: number
|
|
43
|
-
block!: number
|
|
44
|
-
awareness!: number
|
|
45
|
-
serve!: number
|
|
46
|
-
stamina!: number
|
|
47
|
-
defense!: number
|
|
48
|
-
|
|
49
|
-
// PerformanceStats belongsTo Player via player_id
|
|
50
|
-
player!: PlayerModel
|
|
51
|
-
getPlayer!: Sequelize.BelongsToGetAssociationMixin<PlayerModel>
|
|
52
|
-
setPlayer!: Sequelize.BelongsToSetAssociationMixin<PlayerModel, PlayerId>
|
|
53
|
-
createPlayer!: Sequelize.BelongsToCreateAssociationMixin<PlayerModel>
|
|
54
|
-
|
|
55
|
-
static initModel (sequelize: Sequelize.Sequelize): typeof PerformanceStatsModel {
|
|
56
|
-
return PerformanceStatsModel.init({
|
|
57
|
-
player_id: {
|
|
58
|
-
type: DataTypes.UUID,
|
|
59
|
-
allowNull: false,
|
|
60
|
-
primaryKey: true,
|
|
61
|
-
references: {
|
|
62
|
-
model: 'Player',
|
|
63
|
-
key: 'player_id'
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
setting: {
|
|
67
|
-
type: DataTypes.INTEGER,
|
|
68
|
-
allowNull: false,
|
|
69
|
-
defaultValue: 0
|
|
70
|
-
},
|
|
71
|
-
pass: {
|
|
72
|
-
type: DataTypes.INTEGER,
|
|
73
|
-
allowNull: false,
|
|
74
|
-
defaultValue: 0
|
|
75
|
-
},
|
|
76
|
-
reception: {
|
|
77
|
-
type: DataTypes.INTEGER,
|
|
78
|
-
allowNull: false,
|
|
79
|
-
defaultValue: 0
|
|
80
|
-
},
|
|
81
|
-
spike: {
|
|
82
|
-
type: DataTypes.INTEGER,
|
|
83
|
-
allowNull: false,
|
|
84
|
-
defaultValue: 0
|
|
85
|
-
},
|
|
86
|
-
back_attack: {
|
|
87
|
-
type: DataTypes.INTEGER,
|
|
88
|
-
allowNull: false,
|
|
89
|
-
defaultValue: 0
|
|
90
|
-
},
|
|
91
|
-
jump: {
|
|
92
|
-
type: DataTypes.INTEGER,
|
|
93
|
-
allowNull: false,
|
|
94
|
-
defaultValue: 0
|
|
95
|
-
},
|
|
96
|
-
block: {
|
|
97
|
-
type: DataTypes.INTEGER,
|
|
98
|
-
allowNull: false
|
|
99
|
-
},
|
|
100
|
-
awareness: {
|
|
101
|
-
type: DataTypes.INTEGER,
|
|
102
|
-
allowNull: false,
|
|
103
|
-
defaultValue: 0
|
|
104
|
-
},
|
|
105
|
-
serve: {
|
|
106
|
-
type: DataTypes.INTEGER,
|
|
107
|
-
allowNull: false,
|
|
108
|
-
defaultValue: 0
|
|
109
|
-
},
|
|
110
|
-
stamina: {
|
|
111
|
-
type: DataTypes.INTEGER,
|
|
112
|
-
allowNull: false,
|
|
113
|
-
defaultValue: 0
|
|
114
|
-
},
|
|
115
|
-
defense: {
|
|
116
|
-
type: DataTypes.INTEGER,
|
|
117
|
-
allowNull: false,
|
|
118
|
-
defaultValue: 0
|
|
119
|
-
}
|
|
120
|
-
}, {
|
|
121
|
-
sequelize,
|
|
122
|
-
tableName: 'PerformanceStats',
|
|
123
|
-
schema: 'public',
|
|
124
|
-
timestamps: false,
|
|
125
|
-
indexes: [
|
|
126
|
-
{
|
|
127
|
-
name: 'PerformanceStats_pk',
|
|
128
|
-
unique: true,
|
|
129
|
-
fields: [
|
|
130
|
-
{ name: 'player_id' }
|
|
131
|
-
]
|
|
132
|
-
}
|
|
133
|
-
]
|
|
134
|
-
})
|
|
135
|
-
}
|
|
136
|
-
}
|