volleyballsimtypes 0.0.6 → 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.
Files changed (133) hide show
  1. package/dist/src/service/event/in-play-event.js.map +1 -1
  2. package/package.json +5 -5
  3. package/src/data/index.ts +0 -2
  4. package/src/data/models/block.ts +0 -159
  5. package/src/data/models/coach.ts +0 -94
  6. package/src/data/models/country.ts +0 -105
  7. package/src/data/models/event.ts +0 -83
  8. package/src/data/models/index.ts +0 -22
  9. package/src/data/models/league.ts +0 -90
  10. package/src/data/models/libero-replacement.ts +0 -104
  11. package/src/data/models/match-set-stats.ts +0 -204
  12. package/src/data/models/match-set.ts +0 -152
  13. package/src/data/models/match.ts +0 -106
  14. package/src/data/models/performance-stats.ts +0 -136
  15. package/src/data/models/player.ts +0 -370
  16. package/src/data/models/rally-position.ts +0 -79
  17. package/src/data/models/rally.ts +0 -229
  18. package/src/data/models/reception.ts +0 -113
  19. package/src/data/models/score.ts +0 -99
  20. package/src/data/models/season-teams.ts +0 -67
  21. package/src/data/models/season.ts +0 -103
  22. package/src/data/models/serve.ts +0 -113
  23. package/src/data/models/set.ts +0 -113
  24. package/src/data/models/spike.ts +0 -113
  25. package/src/data/models/substitution.ts +0 -98
  26. package/src/data/models/team.ts +0 -193
  27. package/src/data/transformers/block.ts +0 -117
  28. package/src/data/transformers/coach.ts +0 -33
  29. package/src/data/transformers/country.ts +0 -23
  30. package/src/data/transformers/court-position.ts +0 -43
  31. package/src/data/transformers/court-target.ts +0 -58
  32. package/src/data/transformers/event-type.ts +0 -35
  33. package/src/data/transformers/formation.ts +0 -16
  34. package/src/data/transformers/index.ts +0 -27
  35. package/src/data/transformers/league.ts +0 -26
  36. package/src/data/transformers/libero-replacement.ts +0 -62
  37. package/src/data/transformers/match-set-stats.ts +0 -101
  38. package/src/data/transformers/match-set.ts +0 -59
  39. package/src/data/transformers/match.ts +0 -48
  40. package/src/data/transformers/performance-stats.ts +0 -40
  41. package/src/data/transformers/player.ts +0 -109
  42. package/src/data/transformers/rally-position.ts +0 -24
  43. package/src/data/transformers/rally.ts +0 -139
  44. package/src/data/transformers/reception.ts +0 -98
  45. package/src/data/transformers/role.ts +0 -31
  46. package/src/data/transformers/score.ts +0 -43
  47. package/src/data/transformers/season.ts +0 -42
  48. package/src/data/transformers/serve.ts +0 -100
  49. package/src/data/transformers/set.ts +0 -98
  50. package/src/data/transformers/spike.ts +0 -102
  51. package/src/data/transformers/substitution.ts +0 -42
  52. package/src/data/transformers/team.ts +0 -45
  53. package/src/data/transformers/trait.ts +0 -37
  54. package/src/index.ts +0 -7
  55. package/src/routing/events.ts +0 -60
  56. package/src/routing/index.ts +0 -5
  57. package/src/routing/league.ts +0 -15
  58. package/src/routing/match.ts +0 -52
  59. package/src/routing/player.ts +0 -24
  60. package/src/routing/team.ts +0 -14
  61. package/src/service/coach/__stubs__/index.ts +0 -46
  62. package/src/service/coach/coach.test.ts +0 -10
  63. package/src/service/coach/coach.ts +0 -30
  64. package/src/service/coach/formation.test.ts +0 -10
  65. package/src/service/coach/formation.ts +0 -160
  66. package/src/service/coach/index.ts +0 -2
  67. package/src/service/country/__stubs__/index.ts +0 -13
  68. package/src/service/country/country.test.ts +0 -10
  69. package/src/service/country/country.ts +0 -23
  70. package/src/service/country/index.ts +0 -1
  71. package/src/service/event/__stubs__/index.ts +0 -25
  72. package/src/service/event/block.test.ts +0 -100
  73. package/src/service/event/block.ts +0 -69
  74. package/src/service/event/in-play-event.ts +0 -37
  75. package/src/service/event/libero-replacement.test.ts +0 -37
  76. package/src/service/event/libero-replacement.ts +0 -25
  77. package/src/service/event/rally-event.ts +0 -33
  78. package/src/service/event/reception.test.ts +0 -50
  79. package/src/service/event/reception.ts +0 -38
  80. package/src/service/event/score.test.ts +0 -29
  81. package/src/service/event/score.ts +0 -22
  82. package/src/service/event/serve.test.ts +0 -50
  83. package/src/service/event/serve.ts +0 -39
  84. package/src/service/event/set.test.ts +0 -50
  85. package/src/service/event/set.ts +0 -38
  86. package/src/service/event/spike.test.ts +0 -64
  87. package/src/service/event/spike.ts +0 -46
  88. package/src/service/event/substitution.ts +0 -16
  89. package/src/service/index.ts +0 -17
  90. package/src/service/league/index.ts +0 -3
  91. package/src/service/league/league.ts +0 -112
  92. package/src/service/league/season.ts +0 -41
  93. package/src/service/league/standing.ts +0 -82
  94. package/src/service/main.ts +0 -52
  95. package/src/service/match/__stubs__/index.ts +0 -119
  96. package/src/service/match/court-position.test.ts +0 -73
  97. package/src/service/match/court-position.ts +0 -46
  98. package/src/service/match/court-target.test.ts +0 -39
  99. package/src/service/match/court-target.ts +0 -30
  100. package/src/service/match/index.ts +0 -6
  101. package/src/service/match/match-set.test.ts +0 -174
  102. package/src/service/match/match-set.ts +0 -140
  103. package/src/service/match/match-team.test.ts +0 -16
  104. package/src/service/match/match-team.ts +0 -13
  105. package/src/service/match/match.test.ts +0 -80
  106. package/src/service/match/match.ts +0 -63
  107. package/src/service/match/rally.test.ts +0 -94
  108. package/src/service/match/rally.ts +0 -79
  109. package/src/service/player/__stubs__/index.ts +0 -1433
  110. package/src/service/player/index.ts +0 -5
  111. package/src/service/player/performance-stats.test.ts +0 -24
  112. package/src/service/player/performance-stats.ts +0 -47
  113. package/src/service/player/player.test.ts +0 -51
  114. package/src/service/player/player.ts +0 -101
  115. package/src/service/player/role.test.ts +0 -29
  116. package/src/service/player/role.ts +0 -33
  117. package/src/service/player/stats.test.ts +0 -23
  118. package/src/service/player/stats.ts +0 -29
  119. package/src/service/player/trait.test.ts +0 -10
  120. package/src/service/player/trait.ts +0 -124
  121. package/src/service/team/__stubs__/index.ts +0 -290
  122. package/src/service/team/index.ts +0 -1
  123. package/src/service/team/team.test.ts +0 -30
  124. package/src/service/team/team.ts +0 -45
  125. package/src/service/utils/enum-utils.test.ts +0 -10
  126. package/src/service/utils/enum-utils.ts +0 -6
  127. package/src/service/utils/index.ts +0 -4
  128. package/src/service/utils/object-utils.ts +0 -1
  129. package/src/service/utils/rng-utils.test.ts +0 -32
  130. package/src/service/utils/rng-utils.ts +0 -41
  131. package/src/service/utils/string-utils.test.ts +0 -28
  132. package/src/service/utils/string-utils.ts +0 -13
  133. package/src/service/utils/testing-utils.ts +0 -2
@@ -1,229 +0,0 @@
1
- import * as Sequelize from 'sequelize'
2
- import { DataTypes, Model } from 'sequelize'
3
- import type { BlockAttributes, BlockId, BlockModel } from './block'
4
- import type { EventId, EventModel } from './event'
5
- import type { LiberoReplacementAttributes, LiberoReplacementId, LiberoReplacementModel } from './libero-replacement'
6
- import type { MatchSetId, MatchSetModel } from './match-set'
7
- import type { PlayerId, PlayerModel } from './player'
8
- import type { RallyPositionAttributes, RallyPositionId, RallyPositionModel } from './rally-position'
9
- import type { ReceptionAttributes, ReceptionId, ReceptionModel } from './reception'
10
- import type { ScoreAttributes, ScoreId, ScoreModel } from './score'
11
- import type { ServeAttributes, ServeId, ServeModel } from './serve'
12
- import type { SetAttributes, SetId, SetModel } from './set'
13
- import type { SpikeAttributes, SpikeId, SpikeModel } from './spike'
14
- import type { SubstitutionAttributes, SubstitutionId, SubstitutionModel } from './substitution'
15
- import type { TeamId, TeamModel } from './team'
16
-
17
- export interface RallyAttributes {
18
- rally_id: string
19
- match_set_id: string
20
- serving_team: string
21
- order: number
22
- RallyPositions?: RallyPositionAttributes[]
23
- Serves?: ServeAttributes[]
24
- Receptions?: ReceptionAttributes[]
25
- Sets?: SetAttributes[]
26
- Spikes?: SpikeAttributes[]
27
- Blocks?: BlockAttributes[]
28
- Substitutions?: SubstitutionAttributes[]
29
- LiberoReplacements?: LiberoReplacementAttributes[]
30
- Scores?: ScoreAttributes[]
31
- }
32
-
33
- export type RallyPk = 'rally_id'
34
- export type RallyId = RallyModel[RallyPk]
35
- export type RallyCreationAttributes = RallyAttributes
36
-
37
- export class RallyModel extends Model<RallyAttributes, RallyCreationAttributes> implements RallyAttributes {
38
- rally_id!: string
39
- match_set_id!: string
40
- serving_team!: string
41
- order!: number
42
-
43
- // Rally belongsTo MatchSet via match_set_id
44
- match_set!: MatchSetModel
45
- getMatch_set!: Sequelize.BelongsToGetAssociationMixin<MatchSetModel>
46
- setMatch_set!: Sequelize.BelongsToSetAssociationMixin<MatchSetModel, MatchSetId>
47
- createMatch_set!: Sequelize.BelongsToCreateAssociationMixin<MatchSetModel>
48
- // Rally hasMany Block via rally_id
49
- Blocks!: BlockModel[]
50
- getBlocks!: Sequelize.HasManyGetAssociationsMixin<BlockModel>
51
- setBlocks!: Sequelize.HasManySetAssociationsMixin<BlockModel, BlockId>
52
- addBlock!: Sequelize.HasManyAddAssociationMixin<BlockModel, BlockId>
53
- addBlocks!: Sequelize.HasManyAddAssociationsMixin<BlockModel, BlockId>
54
- createBlock!: Sequelize.HasManyCreateAssociationMixin<BlockModel>
55
- removeBlock!: Sequelize.HasManyRemoveAssociationMixin<BlockModel, BlockId>
56
- removeBlocks!: Sequelize.HasManyRemoveAssociationsMixin<BlockModel, BlockId>
57
- hasBlock!: Sequelize.HasManyHasAssociationMixin<BlockModel, BlockId>
58
- hasBlocks!: Sequelize.HasManyHasAssociationsMixin<BlockModel, BlockId>
59
- countBlocks!: Sequelize.HasManyCountAssociationsMixin
60
- // Rally hasMany Event via rally_id
61
- Events!: EventModel[]
62
- getEvents!: Sequelize.HasManyGetAssociationsMixin<EventModel>
63
- setEvents!: Sequelize.HasManySetAssociationsMixin<EventModel, EventId>
64
- addEvent!: Sequelize.HasManyAddAssociationMixin<EventModel, EventId>
65
- addEvents!: Sequelize.HasManyAddAssociationsMixin<EventModel, EventId>
66
- createEvent!: Sequelize.HasManyCreateAssociationMixin<EventModel>
67
- removeEvent!: Sequelize.HasManyRemoveAssociationMixin<EventModel, EventId>
68
- removeEvents!: Sequelize.HasManyRemoveAssociationsMixin<EventModel, EventId>
69
- hasEvent!: Sequelize.HasManyHasAssociationMixin<EventModel, EventId>
70
- hasEvents!: Sequelize.HasManyHasAssociationsMixin<EventModel, EventId>
71
- countEvents!: Sequelize.HasManyCountAssociationsMixin
72
- // Rally hasMany LiberoReplacement via rally_id
73
- LiberoReplacements!: LiberoReplacementModel[]
74
- getLiberoReplacements!: Sequelize.HasManyGetAssociationsMixin<LiberoReplacementModel>
75
- setLiberoReplacements!: Sequelize.HasManySetAssociationsMixin<LiberoReplacementModel, LiberoReplacementId>
76
- addLiberoReplacement!: Sequelize.HasManyAddAssociationMixin<LiberoReplacementModel, LiberoReplacementId>
77
- addLiberoReplacements!: Sequelize.HasManyAddAssociationsMixin<LiberoReplacementModel, LiberoReplacementId>
78
- createLiberoReplacement!: Sequelize.HasManyCreateAssociationMixin<LiberoReplacementModel>
79
- removeLiberoReplacement!: Sequelize.HasManyRemoveAssociationMixin<LiberoReplacementModel, LiberoReplacementId>
80
- removeLiberoReplacements!: Sequelize.HasManyRemoveAssociationsMixin<LiberoReplacementModel, LiberoReplacementId>
81
- hasLiberoReplacement!: Sequelize.HasManyHasAssociationMixin<LiberoReplacementModel, LiberoReplacementId>
82
- hasLiberoReplacements!: Sequelize.HasManyHasAssociationsMixin<LiberoReplacementModel, LiberoReplacementId>
83
- countLiberoReplacements!: Sequelize.HasManyCountAssociationsMixin
84
- // Rally belongsToMany Player via rally_id and player_id
85
- player_id_Player_RallyPositions!: PlayerModel[]
86
- getPlayer_id_Player_RallyPositions!: Sequelize.BelongsToManyGetAssociationsMixin<PlayerModel>
87
- setPlayer_id_Player_RallyPositions!: Sequelize.BelongsToManySetAssociationsMixin<PlayerModel, PlayerId>
88
- addPlayer_id_Player_RallyPosition!: Sequelize.BelongsToManyAddAssociationMixin<PlayerModel, PlayerId>
89
- addPlayer_id_Player_RallyPositions!: Sequelize.BelongsToManyAddAssociationsMixin<PlayerModel, PlayerId>
90
- createPlayer_id_Player_RallyPosition!: Sequelize.BelongsToManyCreateAssociationMixin<PlayerModel>
91
- removePlayer_id_Player_RallyPosition!: Sequelize.BelongsToManyRemoveAssociationMixin<PlayerModel, PlayerId>
92
- removePlayer_id_Player_RallyPositions!: Sequelize.BelongsToManyRemoveAssociationsMixin<PlayerModel, PlayerId>
93
- hasPlayer_id_Player_RallyPosition!: Sequelize.BelongsToManyHasAssociationMixin<PlayerModel, PlayerId>
94
- hasPlayer_id_Player_RallyPositions!: Sequelize.BelongsToManyHasAssociationsMixin<PlayerModel, PlayerId>
95
- countPlayer_id_Player_RallyPositions!: Sequelize.BelongsToManyCountAssociationsMixin
96
- // Rally hasMany RallyPosition via rally_id
97
- RallyPositions!: RallyPositionModel[]
98
- getRallyPositions!: Sequelize.HasManyGetAssociationsMixin<RallyPositionModel>
99
- setRallyPositions!: Sequelize.HasManySetAssociationsMixin<RallyPositionModel, RallyPositionId>
100
- addRallyPosition!: Sequelize.HasManyAddAssociationMixin<RallyPositionModel, RallyPositionId>
101
- addRallyPositions!: Sequelize.HasManyAddAssociationsMixin<RallyPositionModel, RallyPositionId>
102
- createRallyPosition!: Sequelize.HasManyCreateAssociationMixin<RallyPositionModel>
103
- removeRallyPosition!: Sequelize.HasManyRemoveAssociationMixin<RallyPositionModel, RallyPositionId>
104
- removeRallyPositions!: Sequelize.HasManyRemoveAssociationsMixin<RallyPositionModel, RallyPositionId>
105
- hasRallyPosition!: Sequelize.HasManyHasAssociationMixin<RallyPositionModel, RallyPositionId>
106
- hasRallyPositions!: Sequelize.HasManyHasAssociationsMixin<RallyPositionModel, RallyPositionId>
107
- countRallyPositions!: Sequelize.HasManyCountAssociationsMixin
108
- // Rally hasMany Reception via rally_id
109
- Receptions!: ReceptionModel[]
110
- getReceptions!: Sequelize.HasManyGetAssociationsMixin<ReceptionModel>
111
- setReceptions!: Sequelize.HasManySetAssociationsMixin<ReceptionModel, ReceptionId>
112
- addReception!: Sequelize.HasManyAddAssociationMixin<ReceptionModel, ReceptionId>
113
- addReceptions!: Sequelize.HasManyAddAssociationsMixin<ReceptionModel, ReceptionId>
114
- createReception!: Sequelize.HasManyCreateAssociationMixin<ReceptionModel>
115
- removeReception!: Sequelize.HasManyRemoveAssociationMixin<ReceptionModel, ReceptionId>
116
- removeReceptions!: Sequelize.HasManyRemoveAssociationsMixin<ReceptionModel, ReceptionId>
117
- hasReception!: Sequelize.HasManyHasAssociationMixin<ReceptionModel, ReceptionId>
118
- hasReceptions!: Sequelize.HasManyHasAssociationsMixin<ReceptionModel, ReceptionId>
119
- countReceptions!: Sequelize.HasManyCountAssociationsMixin
120
- // Rally hasMany Score via rally_id
121
- Scores!: ScoreModel[]
122
- getScores!: Sequelize.HasManyGetAssociationsMixin<ScoreModel>
123
- setScores!: Sequelize.HasManySetAssociationsMixin<ScoreModel, ScoreId>
124
- addScore!: Sequelize.HasManyAddAssociationMixin<ScoreModel, ScoreId>
125
- addScores!: Sequelize.HasManyAddAssociationsMixin<ScoreModel, ScoreId>
126
- createScore!: Sequelize.HasManyCreateAssociationMixin<ScoreModel>
127
- removeScore!: Sequelize.HasManyRemoveAssociationMixin<ScoreModel, ScoreId>
128
- removeScores!: Sequelize.HasManyRemoveAssociationsMixin<ScoreModel, ScoreId>
129
- hasScore!: Sequelize.HasManyHasAssociationMixin<ScoreModel, ScoreId>
130
- hasScores!: Sequelize.HasManyHasAssociationsMixin<ScoreModel, ScoreId>
131
- countScores!: Sequelize.HasManyCountAssociationsMixin
132
- // Rally hasMany Serve via rally_id
133
- Serves!: ServeModel[]
134
- getServes!: Sequelize.HasManyGetAssociationsMixin<ServeModel>
135
- setServes!: Sequelize.HasManySetAssociationsMixin<ServeModel, ServeId>
136
- addSerf!: Sequelize.HasManyAddAssociationMixin<ServeModel, ServeId>
137
- addServes!: Sequelize.HasManyAddAssociationsMixin<ServeModel, ServeId>
138
- createSerf!: Sequelize.HasManyCreateAssociationMixin<ServeModel>
139
- removeSerf!: Sequelize.HasManyRemoveAssociationMixin<ServeModel, ServeId>
140
- removeServes!: Sequelize.HasManyRemoveAssociationsMixin<ServeModel, ServeId>
141
- hasSerf!: Sequelize.HasManyHasAssociationMixin<ServeModel, ServeId>
142
- hasServes!: Sequelize.HasManyHasAssociationsMixin<ServeModel, ServeId>
143
- countServes!: Sequelize.HasManyCountAssociationsMixin
144
- // Rally hasMany Set via rally_id
145
- Sets!: SetModel[]
146
- getSets!: Sequelize.HasManyGetAssociationsMixin<SetModel>
147
- setSets!: Sequelize.HasManySetAssociationsMixin<SetModel, SetId>
148
- addSet!: Sequelize.HasManyAddAssociationMixin<SetModel, SetId>
149
- addSets!: Sequelize.HasManyAddAssociationsMixin<SetModel, SetId>
150
- createSet!: Sequelize.HasManyCreateAssociationMixin<SetModel>
151
- removeSet!: Sequelize.HasManyRemoveAssociationMixin<SetModel, SetId>
152
- removeSets!: Sequelize.HasManyRemoveAssociationsMixin<SetModel, SetId>
153
- hasSet!: Sequelize.HasManyHasAssociationMixin<SetModel, SetId>
154
- hasSets!: Sequelize.HasManyHasAssociationsMixin<SetModel, SetId>
155
- countSets!: Sequelize.HasManyCountAssociationsMixin
156
- // Rally hasMany Spike via rally_id
157
- Spikes!: SpikeModel[]
158
- getSpikes!: Sequelize.HasManyGetAssociationsMixin<SpikeModel>
159
- setSpikes!: Sequelize.HasManySetAssociationsMixin<SpikeModel, SpikeId>
160
- addSpike!: Sequelize.HasManyAddAssociationMixin<SpikeModel, SpikeId>
161
- addSpikes!: Sequelize.HasManyAddAssociationsMixin<SpikeModel, SpikeId>
162
- createSpike!: Sequelize.HasManyCreateAssociationMixin<SpikeModel>
163
- removeSpike!: Sequelize.HasManyRemoveAssociationMixin<SpikeModel, SpikeId>
164
- removeSpikes!: Sequelize.HasManyRemoveAssociationsMixin<SpikeModel, SpikeId>
165
- hasSpike!: Sequelize.HasManyHasAssociationMixin<SpikeModel, SpikeId>
166
- hasSpikes!: Sequelize.HasManyHasAssociationsMixin<SpikeModel, SpikeId>
167
- countSpikes!: Sequelize.HasManyCountAssociationsMixin
168
- // Rally hasMany Substitution via rally_id
169
- Substitutions!: SubstitutionModel[]
170
- getSubstitutions!: Sequelize.HasManyGetAssociationsMixin<SubstitutionModel>
171
- setSubstitutions!: Sequelize.HasManySetAssociationsMixin<SubstitutionModel, SubstitutionId>
172
- addSubstitution!: Sequelize.HasManyAddAssociationMixin<SubstitutionModel, SubstitutionId>
173
- addSubstitutions!: Sequelize.HasManyAddAssociationsMixin<SubstitutionModel, SubstitutionId>
174
- createSubstitution!: Sequelize.HasManyCreateAssociationMixin<SubstitutionModel>
175
- removeSubstitution!: Sequelize.HasManyRemoveAssociationMixin<SubstitutionModel, SubstitutionId>
176
- removeSubstitutions!: Sequelize.HasManyRemoveAssociationsMixin<SubstitutionModel, SubstitutionId>
177
- hasSubstitution!: Sequelize.HasManyHasAssociationMixin<SubstitutionModel, SubstitutionId>
178
- hasSubstitutions!: Sequelize.HasManyHasAssociationsMixin<SubstitutionModel, SubstitutionId>
179
- countSubstitutions!: Sequelize.HasManyCountAssociationsMixin
180
- // Rally belongsTo Team via serving_team
181
- serving_team_Team!: TeamModel
182
- getServing_team_Team!: Sequelize.BelongsToGetAssociationMixin<TeamModel>
183
- setServing_team_Team!: Sequelize.BelongsToSetAssociationMixin<TeamModel, TeamId>
184
- createServing_team_Team!: Sequelize.BelongsToCreateAssociationMixin<TeamModel>
185
-
186
- static initModel (sequelize: Sequelize.Sequelize): typeof RallyModel {
187
- return RallyModel.init({
188
- rally_id: {
189
- type: DataTypes.UUID,
190
- allowNull: false,
191
- primaryKey: true
192
- },
193
- match_set_id: {
194
- type: DataTypes.UUID,
195
- allowNull: false,
196
- references: {
197
- model: 'MatchSet',
198
- key: 'match_set_id'
199
- }
200
- },
201
- serving_team: {
202
- type: DataTypes.UUID,
203
- allowNull: false,
204
- references: {
205
- model: 'Team',
206
- key: 'team_id'
207
- }
208
- },
209
- order: {
210
- type: DataTypes.INTEGER,
211
- allowNull: false
212
- }
213
- }, {
214
- sequelize,
215
- tableName: 'Rally',
216
- schema: 'public',
217
- timestamps: false,
218
- indexes: [
219
- {
220
- name: 'Rally_pk',
221
- unique: true,
222
- fields: [
223
- { name: 'rally_id' }
224
- ]
225
- }
226
- ]
227
- })
228
- }
229
- }
@@ -1,113 +0,0 @@
1
- import * as Sequelize from 'sequelize'
2
- import { DataTypes, Model } from 'sequelize'
3
- import type { PlayerId, PlayerModel } from './player'
4
- import type { RallyId, RallyModel } from './rally'
5
-
6
- export interface ReceptionAttributes {
7
- event_id: string
8
- rally_id: string
9
- event_type: 'LIBERO_REPLACEMENT' | 'SUBSTITUTION' | 'SERVE' | 'RECEPTION' | 'SET' | 'SPIKE' | 'BLOCK' | 'SCORE'
10
- failure: 'NO_FAILURE' | 'FAULT' | 'MISS' | 'OUT_OF_BOUNDS' | 'BAD_PASS'
11
- type: 'DIG' | 'OVERHAND' | 'ONE_HAND' | 'OTHER_BODY_PART'
12
- target: 'NO_TARGET' | 'OPPONENT_RIGHT_BACK' | 'OPPONENT_MIDDLE_BACK' | 'OPPONENT_LEFT_BACK' | 'OPPONENT_RIGHT_FRONT' | 'OPPONENT_MIDDLE_FRONT' | 'OPPONENT_LEFT_FRONT' | 'TEAM_LEFT_FRONT' | 'TEAM_MIDDLE_FRONT' | 'TEAM_RIGHT_FRONT' | 'TEAM_LEFT_BACK' | 'TEAM_MIDDLE_BACK' | 'TEAM_RIGHT_BACK'
13
- order: number
14
- player_id: string
15
- modifier: number
16
- score: number
17
- }
18
-
19
- export type ReceptionPk = 'event_id'
20
- export type ReceptionId = ReceptionModel[ReceptionPk]
21
- export type ReceptionCreationAttributes = ReceptionAttributes
22
-
23
- export class ReceptionModel extends Model<ReceptionAttributes, ReceptionCreationAttributes> implements ReceptionAttributes {
24
- event_id!: string
25
- rally_id!: string
26
- event_type!: 'LIBERO_REPLACEMENT' | 'SUBSTITUTION' | 'SERVE' | 'RECEPTION' | 'SET' | 'SPIKE' | 'BLOCK' | 'SCORE'
27
- failure!: 'NO_FAILURE' | 'FAULT' | 'MISS' | 'OUT_OF_BOUNDS' | 'BAD_PASS'
28
- type!: 'DIG' | 'OVERHAND' | 'ONE_HAND' | 'OTHER_BODY_PART'
29
- target!: 'NO_TARGET' | 'OPPONENT_RIGHT_BACK' | 'OPPONENT_MIDDLE_BACK' | 'OPPONENT_LEFT_BACK' | 'OPPONENT_RIGHT_FRONT' | 'OPPONENT_MIDDLE_FRONT' | 'OPPONENT_LEFT_FRONT' | 'TEAM_LEFT_FRONT' | 'TEAM_MIDDLE_FRONT' | 'TEAM_RIGHT_FRONT' | 'TEAM_LEFT_BACK' | 'TEAM_MIDDLE_BACK' | 'TEAM_RIGHT_BACK'
30
- order!: number
31
- player_id!: string
32
- modifier!: number
33
- score!: number
34
-
35
- // Reception belongsTo Player via player_id
36
- player!: PlayerModel
37
- getPlayer!: Sequelize.BelongsToGetAssociationMixin<PlayerModel>
38
- setPlayer!: Sequelize.BelongsToSetAssociationMixin<PlayerModel, PlayerId>
39
- createPlayer!: Sequelize.BelongsToCreateAssociationMixin<PlayerModel>
40
- // Reception belongsTo Rally via rally_id
41
- rally!: RallyModel
42
- getRally!: Sequelize.BelongsToGetAssociationMixin<RallyModel>
43
- setRally!: Sequelize.BelongsToSetAssociationMixin<RallyModel, RallyId>
44
- createRally!: Sequelize.BelongsToCreateAssociationMixin<RallyModel>
45
-
46
- static initModel (sequelize: Sequelize.Sequelize): typeof ReceptionModel {
47
- return ReceptionModel.init({
48
- event_id: {
49
- type: DataTypes.UUID,
50
- allowNull: false,
51
- primaryKey: true
52
- },
53
- rally_id: {
54
- type: DataTypes.UUID,
55
- allowNull: false,
56
- references: {
57
- model: 'Rally',
58
- key: 'rally_id'
59
- }
60
- },
61
- event_type: {
62
- type: DataTypes.ENUM('LIBERO_REPLACEMENT', 'SUBSTITUTION', 'SERVE', 'RECEPTION', 'SET', 'SPIKE', 'BLOCK', 'SCORE'),
63
- allowNull: false
64
- },
65
- failure: {
66
- type: DataTypes.ENUM('NO_FAILURE', 'FAULT', 'MISS', 'OUT_OF_BOUNDS', 'BAD_PASS'),
67
- allowNull: false
68
- },
69
- type: {
70
- type: DataTypes.ENUM('DIG', 'OVERHAND', 'ONE_HAND', 'OTHER_BODY_PART'),
71
- allowNull: false
72
- },
73
- target: {
74
- type: DataTypes.ENUM('NO_TARGET', 'OPPONENT_RIGHT_BACK', 'OPPONENT_MIDDLE_BACK', 'OPPONENT_LEFT_BACK', 'OPPONENT_RIGHT_FRONT', 'OPPONENT_MIDDLE_FRONT', 'OPPONENT_LEFT_FRONT', 'TEAM_LEFT_FRONT', 'TEAM_MIDDLE_FRONT', 'TEAM_RIGHT_FRONT', 'TEAM_LEFT_BACK', 'TEAM_MIDDLE_BACK', 'TEAM_RIGHT_BACK'),
75
- allowNull: false
76
- },
77
- order: {
78
- type: DataTypes.INTEGER,
79
- allowNull: false
80
- },
81
- player_id: {
82
- type: DataTypes.UUID,
83
- allowNull: false,
84
- references: {
85
- model: 'Player',
86
- key: 'player_id'
87
- }
88
- },
89
- modifier: {
90
- type: DataTypes.REAL,
91
- allowNull: false
92
- },
93
- score: {
94
- type: DataTypes.REAL,
95
- allowNull: false
96
- }
97
- }, {
98
- sequelize,
99
- tableName: 'Reception',
100
- schema: 'public',
101
- timestamps: false,
102
- indexes: [
103
- {
104
- name: 'Reception_pk',
105
- unique: true,
106
- fields: [
107
- { name: 'event_id' }
108
- ]
109
- }
110
- ]
111
- })
112
- }
113
- }
@@ -1,99 +0,0 @@
1
- import * as Sequelize from 'sequelize'
2
- import { DataTypes, Model } from 'sequelize'
3
- import type { PlayerId, PlayerModel } from './player'
4
- import type { RallyId, RallyModel } from './rally'
5
- import type { TeamId, TeamModel } from './team'
6
-
7
- export interface ScoreAttributes {
8
- event_id: string
9
- rally_id: string
10
- event_type: 'LIBERO_REPLACEMENT' | 'SUBSTITUTION' | 'SERVE' | 'RECEPTION' | 'SET' | 'SPIKE' | 'BLOCK' | 'SCORE'
11
- team_id: string
12
- order: number
13
- player_id: string
14
- }
15
-
16
- export type ScorePk = 'event_id'
17
- export type ScoreId = ScoreModel[ScorePk]
18
- export type ScoreCreationAttributes = ScoreAttributes
19
-
20
- export class ScoreModel extends Model<ScoreAttributes, ScoreCreationAttributes> implements ScoreAttributes {
21
- event_id!: string
22
- rally_id!: string
23
- event_type!: 'LIBERO_REPLACEMENT' | 'SUBSTITUTION' | 'SERVE' | 'RECEPTION' | 'SET' | 'SPIKE' | 'BLOCK' | 'SCORE'
24
- team_id!: string
25
- order!: number
26
- player_id!: string
27
-
28
- // Score belongsTo Player via player_id
29
- player!: PlayerModel
30
- getPlayer!: Sequelize.BelongsToGetAssociationMixin<PlayerModel>
31
- setPlayer!: Sequelize.BelongsToSetAssociationMixin<PlayerModel, PlayerId>
32
- createPlayer!: Sequelize.BelongsToCreateAssociationMixin<PlayerModel>
33
- // Score belongsTo Rally via rally_id
34
- rally!: RallyModel
35
- getRally!: Sequelize.BelongsToGetAssociationMixin<RallyModel>
36
- setRally!: Sequelize.BelongsToSetAssociationMixin<RallyModel, RallyId>
37
- createRally!: Sequelize.BelongsToCreateAssociationMixin<RallyModel>
38
- // Score belongsTo Team via team_id
39
- team!: TeamModel
40
- getTeam!: Sequelize.BelongsToGetAssociationMixin<TeamModel>
41
- setTeam!: Sequelize.BelongsToSetAssociationMixin<TeamModel, TeamId>
42
- createTeam!: Sequelize.BelongsToCreateAssociationMixin<TeamModel>
43
-
44
- static initModel (sequelize: Sequelize.Sequelize): typeof ScoreModel {
45
- return ScoreModel.init({
46
- event_id: {
47
- type: DataTypes.UUID,
48
- allowNull: false,
49
- primaryKey: true
50
- },
51
- rally_id: {
52
- type: DataTypes.UUID,
53
- allowNull: false,
54
- references: {
55
- model: 'Rally',
56
- key: 'rally_id'
57
- }
58
- },
59
- event_type: {
60
- type: DataTypes.ENUM('LIBERO_REPLACEMENT', 'SUBSTITUTION', 'SERVE', 'RECEPTION', 'SET', 'SPIKE', 'BLOCK', 'SCORE'),
61
- allowNull: false
62
- },
63
- team_id: {
64
- type: DataTypes.UUID,
65
- allowNull: false,
66
- references: {
67
- model: 'Team',
68
- key: 'team_id'
69
- }
70
- },
71
- order: {
72
- type: DataTypes.INTEGER,
73
- allowNull: false
74
- },
75
- player_id: {
76
- type: DataTypes.UUID,
77
- allowNull: false,
78
- references: {
79
- model: 'Player',
80
- key: 'player_id'
81
- }
82
- }
83
- }, {
84
- sequelize,
85
- tableName: 'Score',
86
- schema: 'public',
87
- timestamps: false,
88
- indexes: [
89
- {
90
- name: 'Score_pk',
91
- unique: true,
92
- fields: [
93
- { name: 'event_id' }
94
- ]
95
- }
96
- ]
97
- })
98
- }
99
- }
@@ -1,67 +0,0 @@
1
- import * as Sequelize from 'sequelize'
2
- import { DataTypes, Model } from 'sequelize'
3
- import type { SeasonId, SeasonModel } from './season'
4
- import type { TeamId, TeamModel } from './team'
5
-
6
- export interface SeasonTeamsAttributes {
7
- season_id: string
8
- team_id: string
9
- }
10
-
11
- export type SeasonTeamsPk = 'season_id' | 'team_id'
12
- export type SeasonTeamsId = SeasonTeamsModel[SeasonTeamsPk]
13
- export type SeasonTeamsCreationAttributes = SeasonTeamsAttributes
14
-
15
- export class SeasonTeamsModel extends Model<SeasonTeamsAttributes, SeasonTeamsCreationAttributes> implements SeasonTeamsAttributes {
16
- season_id!: string
17
- team_id!: string
18
-
19
- // SeasonTeams belongsTo Season via season_id
20
- season!: SeasonModel
21
- getSeason!: Sequelize.BelongsToGetAssociationMixin<SeasonModel>
22
- setSeason!: Sequelize.BelongsToSetAssociationMixin<SeasonModel, SeasonId>
23
- createSeason!: Sequelize.BelongsToCreateAssociationMixin<SeasonModel>
24
- // SeasonTeams belongsTo Team via team_id
25
- team!: TeamModel
26
- getTeam!: Sequelize.BelongsToGetAssociationMixin<TeamModel>
27
- setTeam!: Sequelize.BelongsToSetAssociationMixin<TeamModel, TeamId>
28
- createTeam!: Sequelize.BelongsToCreateAssociationMixin<TeamModel>
29
-
30
- static initModel (sequelize: Sequelize.Sequelize): typeof SeasonTeamsModel {
31
- return SeasonTeamsModel.init({
32
- season_id: {
33
- type: DataTypes.UUID,
34
- allowNull: false,
35
- primaryKey: true,
36
- references: {
37
- model: 'Season',
38
- key: 'season_id'
39
- }
40
- },
41
- team_id: {
42
- type: DataTypes.UUID,
43
- allowNull: false,
44
- primaryKey: true,
45
- references: {
46
- model: 'Team',
47
- key: 'team_id'
48
- }
49
- }
50
- }, {
51
- sequelize,
52
- tableName: 'SeasonTeams',
53
- schema: 'public',
54
- timestamps: false,
55
- indexes: [
56
- {
57
- name: 'SeasonTeams_pk',
58
- unique: true,
59
- fields: [
60
- { name: 'season_id' },
61
- { name: 'team_id' }
62
- ]
63
- }
64
- ]
65
- })
66
- }
67
- }
@@ -1,103 +0,0 @@
1
- import * as Sequelize from 'sequelize'
2
- import { DataTypes, Model } from 'sequelize'
3
- import type { LeagueAttributes, LeagueId, LeagueModel } from './league'
4
- import type { MatchAttributes, MatchId, MatchModel } from './match'
5
- import type { SeasonTeamsId, SeasonTeamsModel } from './season-teams'
6
- import type { TeamAttributes, TeamId, TeamModel } from './team'
7
-
8
- export interface SeasonAttributes {
9
- season_id: string
10
- iteration: number
11
- league_id: string
12
- seasonTeams?: TeamAttributes[]
13
- Matches?: MatchAttributes[]
14
- league?: LeagueAttributes
15
- }
16
-
17
- export type SeasonPk = 'season_id'
18
- export type SeasonId = SeasonModel[SeasonPk]
19
- export type SeasonCreationAttributes = SeasonAttributes
20
-
21
- export class SeasonModel extends Model<SeasonAttributes, SeasonCreationAttributes> implements SeasonAttributes {
22
- season_id!: string
23
- iteration!: number
24
- league_id!: string
25
-
26
- // Season belongsTo League via league_id
27
- league!: LeagueModel
28
- getLeague!: Sequelize.BelongsToGetAssociationMixin<LeagueModel>
29
- setLeague!: Sequelize.BelongsToSetAssociationMixin<LeagueModel, LeagueId>
30
- createLeague!: Sequelize.BelongsToCreateAssociationMixin<LeagueModel>
31
- // Season hasMany Match via season_id
32
- Matches!: MatchModel[]
33
- getMatches!: Sequelize.HasManyGetAssociationsMixin<MatchModel>
34
- setMatches!: Sequelize.HasManySetAssociationsMixin<MatchModel, MatchId>
35
- addMatch!: Sequelize.HasManyAddAssociationMixin<MatchModel, MatchId>
36
- addMatches!: Sequelize.HasManyAddAssociationsMixin<MatchModel, MatchId>
37
- createMatch!: Sequelize.HasManyCreateAssociationMixin<MatchModel>
38
- removeMatch!: Sequelize.HasManyRemoveAssociationMixin<MatchModel, MatchId>
39
- removeMatches!: Sequelize.HasManyRemoveAssociationsMixin<MatchModel, MatchId>
40
- hasMatch!: Sequelize.HasManyHasAssociationMixin<MatchModel, MatchId>
41
- hasMatches!: Sequelize.HasManyHasAssociationsMixin<MatchModel, MatchId>
42
- countMatches!: Sequelize.HasManyCountAssociationsMixin
43
- // Season hasMany SeasonTeams via season_id
44
- SeasonTeams!: SeasonTeamsModel[]
45
- getSeasonTeams!: Sequelize.HasManyGetAssociationsMixin<SeasonTeamsModel>
46
- setSeasonTeams!: Sequelize.HasManySetAssociationsMixin<SeasonTeamsModel, SeasonTeamsId>
47
- addSeasonTeam!: Sequelize.HasManyAddAssociationMixin<SeasonTeamsModel, SeasonTeamsId>
48
- addSeasonTeams!: Sequelize.HasManyAddAssociationsMixin<SeasonTeamsModel, SeasonTeamsId>
49
- createSeasonTeam!: Sequelize.HasManyCreateAssociationMixin<SeasonTeamsModel>
50
- removeSeasonTeam!: Sequelize.HasManyRemoveAssociationMixin<SeasonTeamsModel, SeasonTeamsId>
51
- removeSeasonTeams!: Sequelize.HasManyRemoveAssociationsMixin<SeasonTeamsModel, SeasonTeamsId>
52
- hasSeasonTeam!: Sequelize.HasManyHasAssociationMixin<SeasonTeamsModel, SeasonTeamsId>
53
- hasSeasonTeams!: Sequelize.HasManyHasAssociationsMixin<SeasonTeamsModel, SeasonTeamsId>
54
- countSeasonTeams!: Sequelize.HasManyCountAssociationsMixin
55
- // Season belongsToMany Team via season_id and team_id
56
- seasonTeams!: TeamModel[]
57
- getseasonTeams!: Sequelize.BelongsToManyGetAssociationsMixin<TeamModel>
58
- setseasonTeams!: Sequelize.BelongsToManySetAssociationsMixin<TeamModel, TeamId>
59
- addTeam_id_Team!: Sequelize.BelongsToManyAddAssociationMixin<TeamModel, TeamId>
60
- addseasonTeams!: Sequelize.BelongsToManyAddAssociationsMixin<TeamModel, TeamId>
61
- createTeam_id_Team!: Sequelize.BelongsToManyCreateAssociationMixin<TeamModel>
62
- removeTeam_id_Team!: Sequelize.BelongsToManyRemoveAssociationMixin<TeamModel, TeamId>
63
- removeseasonTeams!: Sequelize.BelongsToManyRemoveAssociationsMixin<TeamModel, TeamId>
64
- hasTeam_id_Team!: Sequelize.BelongsToManyHasAssociationMixin<TeamModel, TeamId>
65
- hasseasonTeams!: Sequelize.BelongsToManyHasAssociationsMixin<TeamModel, TeamId>
66
- countseasonTeams!: Sequelize.BelongsToManyCountAssociationsMixin
67
-
68
- static initModel (sequelize: Sequelize.Sequelize): typeof SeasonModel {
69
- return SeasonModel.init({
70
- season_id: {
71
- type: DataTypes.UUID,
72
- allowNull: false,
73
- primaryKey: true
74
- },
75
- iteration: {
76
- type: DataTypes.INTEGER,
77
- allowNull: false
78
- },
79
- league_id: {
80
- type: DataTypes.UUID,
81
- allowNull: false,
82
- references: {
83
- model: 'League',
84
- key: 'league_id'
85
- }
86
- }
87
- }, {
88
- sequelize,
89
- tableName: 'Season',
90
- schema: 'public',
91
- timestamps: false,
92
- indexes: [
93
- {
94
- name: 'Season_pk',
95
- unique: true,
96
- fields: [
97
- { name: 'season_id' }
98
- ]
99
- }
100
- ]
101
- })
102
- }
103
- }