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 +1 @@
1
- {"version":3,"file":"in-play-event.js","sourceRoot":"","sources":["../../../../src/service/event/in-play-event.ts"],"names":[],"mappings":";;;;;;AAAA,+CAA0D;AAG1D,kGAA8D;AAC9D,oCAAkC;AAQlC,MAAsB,WAAY,SAAQ,wBAAU;IAOlD,YAAuB,IAAqB;QAC1C,KAAK,CAAC,IAAI,CAAC,CAAA;QAEX,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAA;QACzB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;QACvB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAA;IAC/B,CAAC;IAES,MAAM,CAAC,cAAc,CAAE,KAAuB,EAAE,SAAiB,EAAE,IAAY;;QACvF,MAAM,MAAM,GAAI,4BAAe,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,CAAA;QAChD,MAAM,OAAO,GAAW,MAAA,MAAM,CAAC,OAAO,mCAAI,CAAC,CAAA;QAC3C,MAAM,KAAK,GAAW,IAAA,eAAO,EAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,KAAa,EAAE,GAAG,EAAE,EAAE;YAClE,OAAO,KAAK,GAAG,CAAC,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAE,KAAa,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAA;QAC5E,CAAC,EAAE,CAAC,CAAC,CAAA;QAEL,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAA;IAC1C,CAAC;CACF;AAxBD,kCAwBC"}
1
+ {"version":3,"file":"in-play-event.js","sourceRoot":"","sources":["../../../../src/service/event/in-play-event.ts"],"names":[],"mappings":";;;;;;AAAA,+CAA0D;AAG1D,kGAA8D;AAC9D,oCAAkC;AAQlC,MAAsB,WAAY,SAAQ,wBAAU;IAOlD,YAAuB,IAAqB;QAC1C,KAAK,CAAC,IAAI,CAAC,CAAA;QAEX,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAA;QACzB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;QACvB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAA;IAC/B,CAAC;IAES,MAAM,CAAC,cAAc,CAAE,KAAuB,EAAE,SAAiB,EAAE,IAAY;;QACvF,MAAM,MAAM,GAAI,4BAAe,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,CAAA;QAChD,MAAM,OAAO,GAAW,MAAA,MAAM,CAAC,OAAO,mCAAI,CAAC,CAAA;QAC3C,MAAM,KAAK,GAAW,IAAA,eAAO,EAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,KAAa,EAAE,GAAG,EAAE,EAAE;YAClE,OAAO,KAAK,GAAG,CAAC,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAE,KAAa,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAA;QAC5E,CAAC,EAAE,CAAC,CAAW,CAAA;QAEf,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAA;IAC1C,CAAC;CACF;AAxBD,kCAwBC"}
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "volleyballsimtypes",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "description": "vbsim types",
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
5
+ "main": "dist/src/index.js",
6
+ "module": "dist/src/index.js",
7
+ "types": "dist/src/index.d.ts",
7
8
  "type": "module",
8
9
  "files": [
9
- "dist",
10
- "src"
10
+ "dist"
11
11
  ],
12
12
  "scripts": {
13
13
  "madge": "npx madge --warning --circular --extensions ts ./",
package/src/data/index.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from './models'
2
- export * from './transformers'
@@ -1,159 +0,0 @@
1
- import * as Sequelize from 'sequelize'
2
- import { DataTypes, Model, Optional } from 'sequelize'
3
- import type { PlayerId, PlayerModel } from './player'
4
- import type { RallyId, RallyModel } from './rally'
5
-
6
- export interface BlockAttributes {
7
- event_id: string
8
- rally_id: string
9
- event_type: 'LIBERO_REPLACEMENT' | 'SUBSTITUTION' | 'SERVE' | 'RECEPTION' | 'SET' | 'SPIKE' | 'BLOCK' | 'SCORE'
10
- 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'
11
- type: 'NO_BLOCKER' | 'SINGLE' | 'DOUBLE' | 'TRIPLE'
12
- failure: 'NO_FAILURE' | 'FAULT' | 'MISS' | 'OUT_OF_BOUNDS' | 'WIPE' | 'TOOL'
13
- order: number
14
- player_id: string
15
- blocker_1?: string
16
- blocker_2?: string
17
- blocker_3?: string
18
- modifier: number
19
- score: number
20
- }
21
-
22
- export type BlockPk = 'event_id'
23
- export type BlockId = BlockModel[BlockPk]
24
- export type BlockOptionalAttributes = 'blocker_1' | 'blocker_2' | 'blocker_3'
25
- export type BlockCreationAttributes = Optional<BlockAttributes, BlockOptionalAttributes>
26
-
27
- export class BlockModel extends Model<BlockAttributes, BlockCreationAttributes> implements BlockAttributes {
28
- event_id!: string
29
- rally_id!: string
30
- event_type!: 'LIBERO_REPLACEMENT' | 'SUBSTITUTION' | 'SERVE' | 'RECEPTION' | 'SET' | 'SPIKE' | 'BLOCK' | 'SCORE'
31
- 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'
32
- type!: 'NO_BLOCKER' | 'SINGLE' | 'DOUBLE' | 'TRIPLE'
33
- failure!: 'NO_FAILURE' | 'FAULT' | 'MISS' | 'OUT_OF_BOUNDS' | 'WIPE' | 'TOOL'
34
- order!: number
35
- player_id!: string
36
- blocker_1?: string
37
- blocker_2?: string
38
- blocker_3?: string
39
- modifier!: number
40
- score!: number
41
-
42
- // Block belongsTo Player via player_id
43
- player!: PlayerModel
44
- getPlayer!: Sequelize.BelongsToGetAssociationMixin<PlayerModel>
45
- setPlayer!: Sequelize.BelongsToSetAssociationMixin<PlayerModel, PlayerId>
46
- createPlayer!: Sequelize.BelongsToCreateAssociationMixin<PlayerModel>
47
- // Block belongsTo Player via blocker_1
48
- blocker_1_Player!: PlayerModel
49
- getBlocker_1_Player!: Sequelize.BelongsToGetAssociationMixin<PlayerModel>
50
- setBlocker_1_Player!: Sequelize.BelongsToSetAssociationMixin<PlayerModel, PlayerId>
51
- createBlocker_1_Player!: Sequelize.BelongsToCreateAssociationMixin<PlayerModel>
52
- // Block belongsTo Player via blocker_2
53
- blocker_2_Player!: PlayerModel
54
- getBlocker_2_Player!: Sequelize.BelongsToGetAssociationMixin<PlayerModel>
55
- setBlocker_2_Player!: Sequelize.BelongsToSetAssociationMixin<PlayerModel, PlayerId>
56
- createBlocker_2_Player!: Sequelize.BelongsToCreateAssociationMixin<PlayerModel>
57
- // Block belongsTo Player via blocker_3
58
- blocker_3_Player!: PlayerModel
59
- getBlocker_3_Player!: Sequelize.BelongsToGetAssociationMixin<PlayerModel>
60
- setBlocker_3_Player!: Sequelize.BelongsToSetAssociationMixin<PlayerModel, PlayerId>
61
- createBlocker_3_Player!: Sequelize.BelongsToCreateAssociationMixin<PlayerModel>
62
- // Block belongsTo Rally via rally_id
63
- rally!: RallyModel
64
- getRally!: Sequelize.BelongsToGetAssociationMixin<RallyModel>
65
- setRally!: Sequelize.BelongsToSetAssociationMixin<RallyModel, RallyId>
66
- createRally!: Sequelize.BelongsToCreateAssociationMixin<RallyModel>
67
-
68
- static initModel (sequelize: Sequelize.Sequelize): typeof BlockModel {
69
- return BlockModel.init({
70
- event_id: {
71
- type: DataTypes.UUID,
72
- allowNull: false,
73
- primaryKey: true
74
- },
75
- rally_id: {
76
- type: DataTypes.UUID,
77
- allowNull: false,
78
- references: {
79
- model: 'Rally',
80
- key: 'rally_id'
81
- }
82
- },
83
- event_type: {
84
- type: DataTypes.ENUM('LIBERO_REPLACEMENT', 'SUBSTITUTION', 'SERVE', 'RECEPTION', 'SET', 'SPIKE', 'BLOCK', 'SCORE'),
85
- allowNull: false
86
- },
87
- target: {
88
- 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'),
89
- allowNull: false
90
- },
91
- type: {
92
- type: DataTypes.ENUM('NO_BLOCKER', 'SINGLE', 'DOUBLE', 'TRIPLE'),
93
- allowNull: false
94
- },
95
- failure: {
96
- type: DataTypes.ENUM('NO_FAILURE', 'FAULT', 'MISS', 'OUT_OF_BOUNDS', 'WIPE', 'TOOL'),
97
- allowNull: false
98
- },
99
- order: {
100
- type: DataTypes.INTEGER,
101
- allowNull: false
102
- },
103
- player_id: {
104
- type: DataTypes.UUID,
105
- allowNull: false,
106
- references: {
107
- model: 'Player',
108
- key: 'player_id'
109
- }
110
- },
111
- blocker_1: {
112
- type: DataTypes.UUID,
113
- allowNull: true,
114
- references: {
115
- model: 'Player',
116
- key: 'player_id'
117
- }
118
- },
119
- blocker_2: {
120
- type: DataTypes.UUID,
121
- allowNull: true,
122
- references: {
123
- model: 'Player',
124
- key: 'player_id'
125
- }
126
- },
127
- blocker_3: {
128
- type: DataTypes.UUID,
129
- allowNull: true,
130
- references: {
131
- model: 'Player',
132
- key: 'player_id'
133
- }
134
- },
135
- modifier: {
136
- type: DataTypes.REAL,
137
- allowNull: false
138
- },
139
- score: {
140
- type: DataTypes.REAL,
141
- allowNull: false
142
- }
143
- }, {
144
- sequelize,
145
- tableName: 'Block',
146
- schema: 'public',
147
- timestamps: false,
148
- indexes: [
149
- {
150
- name: 'Block_pk',
151
- unique: true,
152
- fields: [
153
- { name: 'event_id' }
154
- ]
155
- }
156
- ]
157
- })
158
- }
159
- }
@@ -1,94 +0,0 @@
1
- import * as Sequelize from 'sequelize'
2
- import { DataTypes, Model, Optional } from 'sequelize'
3
- import type { CountryId, CountryModel } from './country'
4
- import type { TeamId, TeamModel } from './team'
5
-
6
- export interface CoachAttributes {
7
- coach_id: string
8
- formation: '4-2' | '6-2' | '5-1'
9
- substitution_tolerance: number
10
- first_name: string
11
- last_name: string
12
- country_id: string
13
- }
14
-
15
- export type CoachPk = 'coach_id'
16
- export type CoachId = CoachModel[CoachPk]
17
- export type CoachOptionalAttributes = 'substitution_tolerance'
18
- export type CoachCreationAttributes = Optional<CoachAttributes, CoachOptionalAttributes>
19
-
20
- export class CoachModel extends Model<CoachAttributes, CoachCreationAttributes> implements CoachAttributes {
21
- coach_id!: string
22
- formation!: '4-2' | '6-2' | '5-1'
23
- substitution_tolerance!: number
24
- first_name!: string
25
- last_name!: string
26
- country_id!: string
27
-
28
- // Coach hasMany Team via coach_id
29
- Teams!: TeamModel[]
30
- getTeams!: Sequelize.HasManyGetAssociationsMixin<TeamModel>
31
- setTeams!: Sequelize.HasManySetAssociationsMixin<TeamModel, TeamId>
32
- addTeam!: Sequelize.HasManyAddAssociationMixin<TeamModel, TeamId>
33
- addTeams!: Sequelize.HasManyAddAssociationsMixin<TeamModel, TeamId>
34
- createTeam!: Sequelize.HasManyCreateAssociationMixin<TeamModel>
35
- removeTeam!: Sequelize.HasManyRemoveAssociationMixin<TeamModel, TeamId>
36
- removeTeams!: Sequelize.HasManyRemoveAssociationsMixin<TeamModel, TeamId>
37
- hasTeam!: Sequelize.HasManyHasAssociationMixin<TeamModel, TeamId>
38
- hasTeams!: Sequelize.HasManyHasAssociationsMixin<TeamModel, TeamId>
39
- countTeams!: Sequelize.HasManyCountAssociationsMixin
40
- // Coach belongsTo Country via country_id
41
- country!: CountryModel
42
- getCountry!: Sequelize.BelongsToGetAssociationMixin<CountryModel>
43
- setCountry!: Sequelize.BelongsToSetAssociationMixin<CountryModel, CountryId>
44
- createCountry!: Sequelize.BelongsToCreateAssociationMixin<CountryModel>
45
-
46
- static initModel (sequelize: Sequelize.Sequelize): typeof CoachModel {
47
- return CoachModel.init({
48
- coach_id: {
49
- type: DataTypes.UUID,
50
- allowNull: false,
51
- primaryKey: true
52
- },
53
- formation: {
54
- type: DataTypes.ENUM('4-2', '6-2', '5-1'),
55
- allowNull: false
56
- },
57
- substitution_tolerance: {
58
- type: DataTypes.REAL,
59
- allowNull: false,
60
- defaultValue: 0
61
- },
62
- first_name: {
63
- type: DataTypes.STRING,
64
- allowNull: false
65
- },
66
- last_name: {
67
- type: DataTypes.STRING,
68
- allowNull: false
69
- },
70
- country_id: {
71
- type: DataTypes.UUID,
72
- allowNull: false,
73
- references: {
74
- model: 'Country',
75
- key: 'country_id'
76
- }
77
- }
78
- }, {
79
- sequelize,
80
- tableName: 'Coach',
81
- schema: 'public',
82
- timestamps: false,
83
- indexes: [
84
- {
85
- name: 'Coach_pk',
86
- unique: true,
87
- fields: [
88
- { name: 'coach_id' }
89
- ]
90
- }
91
- ]
92
- })
93
- }
94
- }
@@ -1,105 +0,0 @@
1
- import * as Sequelize from 'sequelize'
2
- import { DataTypes, Model } from 'sequelize'
3
- import type { CoachId, CoachModel } from './coach'
4
- import type { LeagueId, LeagueModel } from './league'
5
- import type { PlayerId, PlayerModel } from './player'
6
- import type { TeamId, TeamModel } from './team'
7
-
8
- export interface CountryAttributes {
9
- country_id: string
10
- name: string
11
- short_name: string
12
- }
13
-
14
- export type CountryPk = 'country_id'
15
- export type CountryId = CountryModel[CountryPk]
16
- export type CountryCreationAttributes = CountryAttributes
17
-
18
- export class CountryModel extends Model<CountryAttributes, CountryCreationAttributes> implements CountryAttributes {
19
- country_id!: string
20
- name!: string
21
- short_name!: string
22
-
23
- // Country hasMany Coach via country_id
24
- Coaches!: CoachModel[]
25
- getCoaches!: Sequelize.HasManyGetAssociationsMixin<CoachModel>
26
- setCoaches!: Sequelize.HasManySetAssociationsMixin<CoachModel, CoachId>
27
- addCoach!: Sequelize.HasManyAddAssociationMixin<CoachModel, CoachId>
28
- addCoaches!: Sequelize.HasManyAddAssociationsMixin<CoachModel, CoachId>
29
- createCoach!: Sequelize.HasManyCreateAssociationMixin<CoachModel>
30
- removeCoach!: Sequelize.HasManyRemoveAssociationMixin<CoachModel, CoachId>
31
- removeCoaches!: Sequelize.HasManyRemoveAssociationsMixin<CoachModel, CoachId>
32
- hasCoach!: Sequelize.HasManyHasAssociationMixin<CoachModel, CoachId>
33
- hasCoaches!: Sequelize.HasManyHasAssociationsMixin<CoachModel, CoachId>
34
- countCoaches!: Sequelize.HasManyCountAssociationsMixin
35
- // Country hasMany League via country_id
36
- Leagues!: LeagueModel[]
37
- getLeagues!: Sequelize.HasManyGetAssociationsMixin<LeagueModel>
38
- setLeagues!: Sequelize.HasManySetAssociationsMixin<LeagueModel, LeagueId>
39
- addLeague!: Sequelize.HasManyAddAssociationMixin<LeagueModel, LeagueId>
40
- addLeagues!: Sequelize.HasManyAddAssociationsMixin<LeagueModel, LeagueId>
41
- createLeague!: Sequelize.HasManyCreateAssociationMixin<LeagueModel>
42
- removeLeague!: Sequelize.HasManyRemoveAssociationMixin<LeagueModel, LeagueId>
43
- removeLeagues!: Sequelize.HasManyRemoveAssociationsMixin<LeagueModel, LeagueId>
44
- hasLeague!: Sequelize.HasManyHasAssociationMixin<LeagueModel, LeagueId>
45
- hasLeagues!: Sequelize.HasManyHasAssociationsMixin<LeagueModel, LeagueId>
46
- countLeagues!: Sequelize.HasManyCountAssociationsMixin
47
- // Country hasMany Player via country_id
48
- Players!: PlayerModel[]
49
- getPlayers!: Sequelize.HasManyGetAssociationsMixin<PlayerModel>
50
- setPlayers!: Sequelize.HasManySetAssociationsMixin<PlayerModel, PlayerId>
51
- addPlayer!: Sequelize.HasManyAddAssociationMixin<PlayerModel, PlayerId>
52
- addPlayers!: Sequelize.HasManyAddAssociationsMixin<PlayerModel, PlayerId>
53
- createPlayer!: Sequelize.HasManyCreateAssociationMixin<PlayerModel>
54
- removePlayer!: Sequelize.HasManyRemoveAssociationMixin<PlayerModel, PlayerId>
55
- removePlayers!: Sequelize.HasManyRemoveAssociationsMixin<PlayerModel, PlayerId>
56
- hasPlayer!: Sequelize.HasManyHasAssociationMixin<PlayerModel, PlayerId>
57
- hasPlayers!: Sequelize.HasManyHasAssociationsMixin<PlayerModel, PlayerId>
58
- countPlayers!: Sequelize.HasManyCountAssociationsMixin
59
- // Country hasMany Team via country_id
60
- Teams!: TeamModel[]
61
- getTeams!: Sequelize.HasManyGetAssociationsMixin<TeamModel>
62
- setTeams!: Sequelize.HasManySetAssociationsMixin<TeamModel, TeamId>
63
- addTeam!: Sequelize.HasManyAddAssociationMixin<TeamModel, TeamId>
64
- addTeams!: Sequelize.HasManyAddAssociationsMixin<TeamModel, TeamId>
65
- createTeam!: Sequelize.HasManyCreateAssociationMixin<TeamModel>
66
- removeTeam!: Sequelize.HasManyRemoveAssociationMixin<TeamModel, TeamId>
67
- removeTeams!: Sequelize.HasManyRemoveAssociationsMixin<TeamModel, TeamId>
68
- hasTeam!: Sequelize.HasManyHasAssociationMixin<TeamModel, TeamId>
69
- hasTeams!: Sequelize.HasManyHasAssociationsMixin<TeamModel, TeamId>
70
- countTeams!: Sequelize.HasManyCountAssociationsMixin
71
-
72
- static initModel (sequelize: Sequelize.Sequelize): typeof CountryModel {
73
- return CountryModel.init({
74
- country_id: {
75
- type: DataTypes.UUID,
76
- allowNull: false,
77
- primaryKey: true
78
- },
79
- name: {
80
- type: DataTypes.STRING(50),
81
- allowNull: false,
82
- unique: true
83
- },
84
- short_name: {
85
- type: DataTypes.STRING,
86
- allowNull: false,
87
- unique: true
88
- }
89
- }, {
90
- sequelize,
91
- tableName: 'Country',
92
- schema: 'public',
93
- timestamps: false,
94
- indexes: [
95
- {
96
- name: 'Country_pk',
97
- unique: true,
98
- fields: [
99
- { name: 'country_id' }
100
- ]
101
- }
102
- ]
103
- })
104
- }
105
- }
@@ -1,83 +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 EventAttributes {
7
- event_id: string
8
- rally_id: string
9
- event_type: 'LIBERO_REPLACEMENT' | 'SUBSTITUTION' | 'SERVE' | 'RECEPTION' | 'SET' | 'SPIKE' | 'BLOCK' | 'SCORE'
10
- order: number
11
- player_id: string
12
- }
13
-
14
- export type EventPk = 'event_id'
15
- export type EventId = EventModel[EventPk]
16
- export type EventCreationAttributes = EventAttributes
17
-
18
- export class EventModel extends Model<EventAttributes, EventCreationAttributes> implements EventAttributes {
19
- event_id!: string
20
- rally_id!: string
21
- event_type!: 'LIBERO_REPLACEMENT' | 'SUBSTITUTION' | 'SERVE' | 'RECEPTION' | 'SET' | 'SPIKE' | 'BLOCK' | 'SCORE'
22
- order!: number
23
- player_id!: string
24
-
25
- // Event belongsTo Player via player_id
26
- player!: PlayerModel
27
- getPlayer!: Sequelize.BelongsToGetAssociationMixin<PlayerModel>
28
- setPlayer!: Sequelize.BelongsToSetAssociationMixin<PlayerModel, PlayerId>
29
- createPlayer!: Sequelize.BelongsToCreateAssociationMixin<PlayerModel>
30
- // Event belongsTo Rally via rally_id
31
- rally!: RallyModel
32
- getRally!: Sequelize.BelongsToGetAssociationMixin<RallyModel>
33
- setRally!: Sequelize.BelongsToSetAssociationMixin<RallyModel, RallyId>
34
- createRally!: Sequelize.BelongsToCreateAssociationMixin<RallyModel>
35
-
36
- static initModel (sequelize: Sequelize.Sequelize): typeof EventModel {
37
- return EventModel.init({
38
- event_id: {
39
- type: DataTypes.UUID,
40
- allowNull: false,
41
- primaryKey: true
42
- },
43
- rally_id: {
44
- type: DataTypes.UUID,
45
- allowNull: false,
46
- references: {
47
- model: 'Rally',
48
- key: 'rally_id'
49
- }
50
- },
51
- event_type: {
52
- type: DataTypes.ENUM('LIBERO_REPLACEMENT', 'SUBSTITUTION', 'SERVE', 'RECEPTION', 'SET', 'SPIKE', 'BLOCK', 'SCORE'),
53
- allowNull: false
54
- },
55
- order: {
56
- type: DataTypes.INTEGER,
57
- allowNull: false
58
- },
59
- player_id: {
60
- type: DataTypes.UUID,
61
- allowNull: false,
62
- references: {
63
- model: 'Player',
64
- key: 'player_id'
65
- }
66
- }
67
- }, {
68
- sequelize,
69
- tableName: 'Event',
70
- schema: 'public',
71
- timestamps: false,
72
- indexes: [
73
- {
74
- name: 'Event_pk',
75
- unique: true,
76
- fields: [
77
- { name: 'event_id' }
78
- ]
79
- }
80
- ]
81
- })
82
- }
83
- }
@@ -1,22 +0,0 @@
1
- export * from './block'
2
- export * from './coach'
3
- export * from './country'
4
- export * from './event'
5
- export * from './league'
6
- export * from './libero-replacement'
7
- export * from './match'
8
- export * from './match-set'
9
- export * from './match-set-stats'
10
- export * from './performance-stats'
11
- export * from './player'
12
- export * from './rally'
13
- export * from './rally-position'
14
- export * from './reception'
15
- export * from './score'
16
- export * from './season'
17
- export * from './season-teams'
18
- export * from './serve'
19
- export * from './set'
20
- export * from './spike'
21
- export * from './substitution'
22
- export * from './team'
@@ -1,90 +0,0 @@
1
- import * as Sequelize from 'sequelize'
2
- import { DataTypes, Model } from 'sequelize'
3
- import type { CountryAttributes, CountryId, CountryModel } from './country'
4
- import type { SeasonAttributes, SeasonId, SeasonModel } from './season'
5
- import { TeamAttributes, TeamId, TeamModel } from './team'
6
-
7
- export interface LeagueAttributes {
8
- league_id: string
9
- country_id: string
10
- name: string
11
- Teams?: TeamAttributes[]
12
- Seasons?: SeasonAttributes[]
13
- country?: CountryAttributes
14
- }
15
-
16
- export type LeaguePk = 'league_id'
17
- export type LeagueId = LeagueModel[LeaguePk]
18
- export type LeagueCreationAttributes = LeagueAttributes
19
-
20
- export class LeagueModel extends Model<LeagueAttributes, LeagueCreationAttributes> implements LeagueAttributes {
21
- league_id!: string
22
- country_id!: string
23
- name!: string
24
-
25
- // League belongsTo Country via country_id
26
- country!: CountryModel
27
- getCountry!: Sequelize.BelongsToGetAssociationMixin<CountryModel>
28
- setCountry!: Sequelize.BelongsToSetAssociationMixin<CountryModel, CountryId>
29
- createCountry!: Sequelize.BelongsToCreateAssociationMixin<CountryModel>
30
- // League hasMany Season via league_id
31
- Seasons!: SeasonModel[]
32
- getSeasons!: Sequelize.HasManyGetAssociationsMixin<SeasonModel>
33
- setSeasons!: Sequelize.HasManySetAssociationsMixin<SeasonModel, SeasonId>
34
- addSeason!: Sequelize.HasManyAddAssociationMixin<SeasonModel, SeasonId>
35
- addSeasons!: Sequelize.HasManyAddAssociationsMixin<SeasonModel, SeasonId>
36
- createSeason!: Sequelize.HasManyCreateAssociationMixin<SeasonModel>
37
- removeSeason!: Sequelize.HasManyRemoveAssociationMixin<SeasonModel, SeasonId>
38
- removeSeasons!: Sequelize.HasManyRemoveAssociationsMixin<SeasonModel, SeasonId>
39
- hasSeason!: Sequelize.HasManyHasAssociationMixin<SeasonModel, SeasonId>
40
- hasSeasons!: Sequelize.HasManyHasAssociationsMixin<SeasonModel, SeasonId>
41
- countSeasons!: Sequelize.HasManyCountAssociationsMixin
42
- // League hasMany Team via league_id
43
- Teams!: TeamModel[]
44
- getTeams!: Sequelize.HasManyGetAssociationsMixin<TeamModel>
45
- setTeams!: Sequelize.HasManySetAssociationsMixin<TeamModel, TeamId>
46
- addTeam!: Sequelize.HasManyAddAssociationMixin<TeamModel, TeamId>
47
- addTeams!: Sequelize.HasManyAddAssociationsMixin<TeamModel, TeamId>
48
- createTeam!: Sequelize.HasManyCreateAssociationMixin<TeamModel>
49
- removeTeam!: Sequelize.HasManyRemoveAssociationMixin<TeamModel, TeamId>
50
- removeTeams!: Sequelize.HasManyRemoveAssociationsMixin<TeamModel, TeamId>
51
- hasTeam!: Sequelize.HasManyHasAssociationMixin<TeamModel, TeamId>
52
- hasTeams!: Sequelize.HasManyHasAssociationsMixin<TeamModel, TeamId>
53
- countTeams!: Sequelize.HasManyCountAssociationsMixin
54
-
55
- static initModel (sequelize: Sequelize.Sequelize): typeof LeagueModel {
56
- return LeagueModel.init({
57
- league_id: {
58
- type: DataTypes.UUID,
59
- allowNull: false,
60
- primaryKey: true
61
- },
62
- country_id: {
63
- type: DataTypes.UUID,
64
- allowNull: false,
65
- references: {
66
- model: 'Country',
67
- key: 'country_id'
68
- }
69
- },
70
- name: {
71
- type: DataTypes.STRING,
72
- allowNull: false
73
- }
74
- }, {
75
- sequelize,
76
- tableName: 'League',
77
- schema: 'public',
78
- timestamps: false,
79
- indexes: [
80
- {
81
- name: 'League_pk',
82
- unique: true,
83
- fields: [
84
- { name: 'league_id' }
85
- ]
86
- }
87
- ]
88
- })
89
- }
90
- }