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
package/src/data/models/serve.ts
DELETED
|
@@ -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 ServeAttributes {
|
|
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' | 'NET' | 'OUT_OF_BOUNDS'
|
|
11
|
-
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'
|
|
12
|
-
order: number
|
|
13
|
-
player_id: string
|
|
14
|
-
modifier: number
|
|
15
|
-
score: number
|
|
16
|
-
type: 'UNDERHAND' | 'OVERHAND_TOPSPIN' | 'OVERHAND_FLOAT' | 'JUMP_TOPSPIN' | 'JUMP_FLOAT'
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export type ServePk = 'event_id'
|
|
20
|
-
export type ServeId = ServeModel[ServePk]
|
|
21
|
-
export type ServeCreationAttributes = ServeAttributes
|
|
22
|
-
|
|
23
|
-
export class ServeModel extends Model<ServeAttributes, ServeCreationAttributes> implements ServeAttributes {
|
|
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' | 'NET' | 'OUT_OF_BOUNDS'
|
|
28
|
-
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'
|
|
29
|
-
order!: number
|
|
30
|
-
player_id!: string
|
|
31
|
-
modifier!: number
|
|
32
|
-
score!: number
|
|
33
|
-
type!: 'UNDERHAND' | 'OVERHAND_TOPSPIN' | 'OVERHAND_FLOAT' | 'JUMP_TOPSPIN' | 'JUMP_FLOAT'
|
|
34
|
-
|
|
35
|
-
// Serve 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
|
-
// Serve 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 ServeModel {
|
|
47
|
-
return ServeModel.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', 'NET', 'OUT_OF_BOUNDS'),
|
|
67
|
-
allowNull: false
|
|
68
|
-
},
|
|
69
|
-
target: {
|
|
70
|
-
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'),
|
|
71
|
-
allowNull: false
|
|
72
|
-
},
|
|
73
|
-
order: {
|
|
74
|
-
type: DataTypes.INTEGER,
|
|
75
|
-
allowNull: false
|
|
76
|
-
},
|
|
77
|
-
player_id: {
|
|
78
|
-
type: DataTypes.UUID,
|
|
79
|
-
allowNull: false,
|
|
80
|
-
references: {
|
|
81
|
-
model: 'Player',
|
|
82
|
-
key: 'player_id'
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
modifier: {
|
|
86
|
-
type: DataTypes.REAL,
|
|
87
|
-
allowNull: false
|
|
88
|
-
},
|
|
89
|
-
score: {
|
|
90
|
-
type: DataTypes.REAL,
|
|
91
|
-
allowNull: false
|
|
92
|
-
},
|
|
93
|
-
type: {
|
|
94
|
-
type: DataTypes.ENUM('UNDERHAND', 'OVERHAND_TOPSPIN', 'OVERHAND_FLOAT', 'JUMP_TOPSPIN', 'JUMP_FLOAT'),
|
|
95
|
-
allowNull: false
|
|
96
|
-
}
|
|
97
|
-
}, {
|
|
98
|
-
sequelize,
|
|
99
|
-
tableName: 'Serve',
|
|
100
|
-
schema: 'public',
|
|
101
|
-
timestamps: false,
|
|
102
|
-
indexes: [
|
|
103
|
-
{
|
|
104
|
-
name: 'Serve_pk',
|
|
105
|
-
unique: true,
|
|
106
|
-
fields: [
|
|
107
|
-
{ name: 'event_id' }
|
|
108
|
-
]
|
|
109
|
-
}
|
|
110
|
-
]
|
|
111
|
-
})
|
|
112
|
-
}
|
|
113
|
-
}
|
package/src/data/models/set.ts
DELETED
|
@@ -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 SetAttributes {
|
|
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: 'OVERHAND' | 'UNDERHAND' | 'SPIKE' | 'DUMP'
|
|
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 SetPk = 'event_id'
|
|
20
|
-
export type SetId = SetModel[SetPk]
|
|
21
|
-
export type SetCreationAttributes = SetAttributes
|
|
22
|
-
|
|
23
|
-
export class SetModel extends Model<SetAttributes, SetCreationAttributes> implements SetAttributes {
|
|
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!: 'OVERHAND' | 'UNDERHAND' | 'SPIKE' | 'DUMP'
|
|
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
|
-
// Set 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
|
-
// Set 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 SetModel {
|
|
47
|
-
return SetModel.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('OVERHAND', 'UNDERHAND', 'SPIKE', 'DUMP'),
|
|
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: 'Set',
|
|
100
|
-
schema: 'public',
|
|
101
|
-
timestamps: false,
|
|
102
|
-
indexes: [
|
|
103
|
-
{
|
|
104
|
-
name: 'Set_pk',
|
|
105
|
-
unique: true,
|
|
106
|
-
fields: [
|
|
107
|
-
{ name: 'event_id' }
|
|
108
|
-
]
|
|
109
|
-
}
|
|
110
|
-
]
|
|
111
|
-
})
|
|
112
|
-
}
|
|
113
|
-
}
|
package/src/data/models/spike.ts
DELETED
|
@@ -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 SpikeAttributes {
|
|
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: 'CROSS_SHOT' | 'LINE_SHOT' | 'TOOL_SHOT' | 'TIP' | 'DOWN_BALL' | 'OVERHAND'
|
|
12
|
-
failure: 'NO_FAILURE' | 'FAULT' | 'MISS' | 'OUT_OF_BOUNDS' | 'NET'
|
|
13
|
-
order: number
|
|
14
|
-
player_id: string
|
|
15
|
-
modifier: number
|
|
16
|
-
score: number
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export type SpikePk = 'event_id'
|
|
20
|
-
export type SpikeId = SpikeModel[SpikePk]
|
|
21
|
-
export type SpikeCreationAttributes = SpikeAttributes
|
|
22
|
-
|
|
23
|
-
export class SpikeModel extends Model<SpikeAttributes, SpikeCreationAttributes> implements SpikeAttributes {
|
|
24
|
-
event_id!: string
|
|
25
|
-
rally_id!: string
|
|
26
|
-
event_type!: 'LIBERO_REPLACEMENT' | 'SUBSTITUTION' | 'SERVE' | 'RECEPTION' | 'SET' | 'SPIKE' | 'BLOCK' | 'SCORE'
|
|
27
|
-
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'
|
|
28
|
-
type!: 'CROSS_SHOT' | 'LINE_SHOT' | 'TOOL_SHOT' | 'TIP' | 'DOWN_BALL' | 'OVERHAND'
|
|
29
|
-
failure!: 'NO_FAILURE' | 'FAULT' | 'MISS' | 'OUT_OF_BOUNDS' | 'NET'
|
|
30
|
-
order!: number
|
|
31
|
-
player_id!: string
|
|
32
|
-
modifier!: number
|
|
33
|
-
score!: number
|
|
34
|
-
|
|
35
|
-
// Spike 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
|
-
// Spike 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 SpikeModel {
|
|
47
|
-
return SpikeModel.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
|
-
target: {
|
|
66
|
-
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'),
|
|
67
|
-
allowNull: false
|
|
68
|
-
},
|
|
69
|
-
type: {
|
|
70
|
-
type: DataTypes.ENUM('CROSS_SHOT', 'LINE_SHOT', 'TOOL_SHOT', 'TIP', 'DOWN_BALL', 'OVERHAND'),
|
|
71
|
-
allowNull: false
|
|
72
|
-
},
|
|
73
|
-
failure: {
|
|
74
|
-
type: DataTypes.ENUM('NO_FAILURE', 'FAULT', 'MISS', 'OUT_OF_BOUNDS', 'NET'),
|
|
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: 'Spike',
|
|
100
|
-
schema: 'public',
|
|
101
|
-
timestamps: false,
|
|
102
|
-
indexes: [
|
|
103
|
-
{
|
|
104
|
-
name: 'Spike_pk',
|
|
105
|
-
unique: true,
|
|
106
|
-
fields: [
|
|
107
|
-
{ name: 'event_id' }
|
|
108
|
-
]
|
|
109
|
-
}
|
|
110
|
-
]
|
|
111
|
-
})
|
|
112
|
-
}
|
|
113
|
-
}
|
|
@@ -1,98 +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 SubstitutionAttributes {
|
|
7
|
-
event_id: string
|
|
8
|
-
rally_id: string
|
|
9
|
-
event_type: 'LIBERO_REPLACEMENT' | 'SUBSTITUTION' | 'SERVE' | 'RECEPTION' | 'SET' | 'SPIKE' | 'BLOCK' | 'SCORE'
|
|
10
|
-
player_out: string
|
|
11
|
-
order: number
|
|
12
|
-
player_id: string
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export type SubstitutionPk = 'event_id'
|
|
16
|
-
export type SubstitutionId = SubstitutionModel[SubstitutionPk]
|
|
17
|
-
export type SubstitutionCreationAttributes = SubstitutionAttributes
|
|
18
|
-
|
|
19
|
-
export class SubstitutionModel extends Model<SubstitutionAttributes, SubstitutionCreationAttributes> implements SubstitutionAttributes {
|
|
20
|
-
event_id!: string
|
|
21
|
-
rally_id!: string
|
|
22
|
-
event_type!: 'LIBERO_REPLACEMENT' | 'SUBSTITUTION' | 'SERVE' | 'RECEPTION' | 'SET' | 'SPIKE' | 'BLOCK' | 'SCORE'
|
|
23
|
-
player_out!: string
|
|
24
|
-
order!: number
|
|
25
|
-
player_id!: string
|
|
26
|
-
|
|
27
|
-
// Substitution belongsTo Player via player_out
|
|
28
|
-
player_out_Player!: PlayerModel
|
|
29
|
-
getPlayer_out_Player!: Sequelize.BelongsToGetAssociationMixin<PlayerModel>
|
|
30
|
-
setPlayer_out_Player!: Sequelize.BelongsToSetAssociationMixin<PlayerModel, PlayerId>
|
|
31
|
-
createPlayer_out_Player!: Sequelize.BelongsToCreateAssociationMixin<PlayerModel>
|
|
32
|
-
// Substitution belongsTo Player via player_id
|
|
33
|
-
player!: PlayerModel
|
|
34
|
-
getPlayer!: Sequelize.BelongsToGetAssociationMixin<PlayerModel>
|
|
35
|
-
setPlayer!: Sequelize.BelongsToSetAssociationMixin<PlayerModel, PlayerId>
|
|
36
|
-
createPlayer!: Sequelize.BelongsToCreateAssociationMixin<PlayerModel>
|
|
37
|
-
// Substitution belongsTo Rally via rally_id
|
|
38
|
-
rally!: RallyModel
|
|
39
|
-
getRally!: Sequelize.BelongsToGetAssociationMixin<RallyModel>
|
|
40
|
-
setRally!: Sequelize.BelongsToSetAssociationMixin<RallyModel, RallyId>
|
|
41
|
-
createRally!: Sequelize.BelongsToCreateAssociationMixin<RallyModel>
|
|
42
|
-
|
|
43
|
-
static initModel (sequelize: Sequelize.Sequelize): typeof SubstitutionModel {
|
|
44
|
-
return SubstitutionModel.init({
|
|
45
|
-
event_id: {
|
|
46
|
-
type: DataTypes.UUID,
|
|
47
|
-
allowNull: false,
|
|
48
|
-
primaryKey: true
|
|
49
|
-
},
|
|
50
|
-
rally_id: {
|
|
51
|
-
type: DataTypes.UUID,
|
|
52
|
-
allowNull: false,
|
|
53
|
-
references: {
|
|
54
|
-
model: 'Rally',
|
|
55
|
-
key: 'rally_id'
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
event_type: {
|
|
59
|
-
type: DataTypes.ENUM('LIBERO_REPLACEMENT', 'SUBSTITUTION', 'SERVE', 'RECEPTION', 'SET', 'SPIKE', 'BLOCK', 'SCORE'),
|
|
60
|
-
allowNull: false
|
|
61
|
-
},
|
|
62
|
-
player_out: {
|
|
63
|
-
type: DataTypes.UUID,
|
|
64
|
-
allowNull: false,
|
|
65
|
-
references: {
|
|
66
|
-
model: 'Player',
|
|
67
|
-
key: 'player_id'
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
order: {
|
|
71
|
-
type: DataTypes.INTEGER,
|
|
72
|
-
allowNull: false
|
|
73
|
-
},
|
|
74
|
-
player_id: {
|
|
75
|
-
type: DataTypes.UUID,
|
|
76
|
-
allowNull: false,
|
|
77
|
-
references: {
|
|
78
|
-
model: 'Player',
|
|
79
|
-
key: 'player_id'
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}, {
|
|
83
|
-
sequelize,
|
|
84
|
-
tableName: 'Substitution',
|
|
85
|
-
schema: 'public',
|
|
86
|
-
timestamps: false,
|
|
87
|
-
indexes: [
|
|
88
|
-
{
|
|
89
|
-
name: 'Substitution_pk',
|
|
90
|
-
unique: true,
|
|
91
|
-
fields: [
|
|
92
|
-
{ name: 'event_id' }
|
|
93
|
-
]
|
|
94
|
-
}
|
|
95
|
-
]
|
|
96
|
-
})
|
|
97
|
-
}
|
|
98
|
-
}
|
package/src/data/models/team.ts
DELETED
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
import * as Sequelize from 'sequelize'
|
|
2
|
-
import { DataTypes, Model } from 'sequelize'
|
|
3
|
-
import type { CoachAttributes, CoachId, CoachModel } from './coach'
|
|
4
|
-
import type { CountryId, CountryModel } from './country'
|
|
5
|
-
import type { MatchId, MatchModel } from './match'
|
|
6
|
-
import type { PlayerId, PlayerModel } from './player'
|
|
7
|
-
import type { RallyId, RallyModel } from './rally'
|
|
8
|
-
import type { ScoreId, ScoreModel } from './score'
|
|
9
|
-
import type { SeasonId, SeasonModel } from './season'
|
|
10
|
-
import type { SeasonTeamsId, SeasonTeamsModel } from './season-teams'
|
|
11
|
-
import { LeagueAttributes, LeagueId, LeagueModel } from './league'
|
|
12
|
-
|
|
13
|
-
export interface TeamAttributes {
|
|
14
|
-
team_id: string
|
|
15
|
-
coach_id: string
|
|
16
|
-
league_id: string
|
|
17
|
-
name: string
|
|
18
|
-
short_name: string
|
|
19
|
-
country_id: string
|
|
20
|
-
coach?: CoachAttributes
|
|
21
|
-
league?: LeagueAttributes
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export type TeamPk = 'team_id'
|
|
25
|
-
export type TeamId = TeamModel[TeamPk]
|
|
26
|
-
export type TeamCreationAttributes = TeamAttributes
|
|
27
|
-
|
|
28
|
-
export class TeamModel extends Model<TeamAttributes, TeamCreationAttributes> implements TeamAttributes {
|
|
29
|
-
team_id!: string
|
|
30
|
-
coach_id!: string
|
|
31
|
-
name!: string
|
|
32
|
-
short_name!: string
|
|
33
|
-
country_id!: string
|
|
34
|
-
league_id!: string
|
|
35
|
-
|
|
36
|
-
// Team belongsTo Coach via coach_id
|
|
37
|
-
coach!: CoachModel
|
|
38
|
-
getCoach!: Sequelize.BelongsToGetAssociationMixin<CoachModel>
|
|
39
|
-
setCoach!: Sequelize.BelongsToSetAssociationMixin<CoachModel, CoachId>
|
|
40
|
-
createCoach!: Sequelize.BelongsToCreateAssociationMixin<CoachModel>
|
|
41
|
-
// Team belongsTo Country via country_id
|
|
42
|
-
country!: CountryModel
|
|
43
|
-
getCountry!: Sequelize.BelongsToGetAssociationMixin<CountryModel>
|
|
44
|
-
setCountry!: Sequelize.BelongsToSetAssociationMixin<CountryModel, CountryId>
|
|
45
|
-
createCountry!: Sequelize.BelongsToCreateAssociationMixin<CountryModel>
|
|
46
|
-
// Team belongsTo League via league_id
|
|
47
|
-
league!: LeagueModel
|
|
48
|
-
getLeague!: Sequelize.BelongsToGetAssociationMixin<LeagueModel>
|
|
49
|
-
setLeague!: Sequelize.BelongsToSetAssociationMixin<LeagueModel, LeagueId>
|
|
50
|
-
createLeague!: Sequelize.BelongsToCreateAssociationMixin<LeagueModel>
|
|
51
|
-
// Team hasMany Match via home_team
|
|
52
|
-
Matches!: MatchModel[]
|
|
53
|
-
getMatches!: Sequelize.HasManyGetAssociationsMixin<MatchModel>
|
|
54
|
-
setMatches!: Sequelize.HasManySetAssociationsMixin<MatchModel, MatchId>
|
|
55
|
-
addMatch!: Sequelize.HasManyAddAssociationMixin<MatchModel, MatchId>
|
|
56
|
-
addMatches!: Sequelize.HasManyAddAssociationsMixin<MatchModel, MatchId>
|
|
57
|
-
createMatch!: Sequelize.HasManyCreateAssociationMixin<MatchModel>
|
|
58
|
-
removeMatch!: Sequelize.HasManyRemoveAssociationMixin<MatchModel, MatchId>
|
|
59
|
-
removeMatches!: Sequelize.HasManyRemoveAssociationsMixin<MatchModel, MatchId>
|
|
60
|
-
hasMatch!: Sequelize.HasManyHasAssociationMixin<MatchModel, MatchId>
|
|
61
|
-
hasMatches!: Sequelize.HasManyHasAssociationsMixin<MatchModel, MatchId>
|
|
62
|
-
countMatches!: Sequelize.HasManyCountAssociationsMixin
|
|
63
|
-
// Team hasMany Match via away_team
|
|
64
|
-
away_team_Matches!: MatchModel[]
|
|
65
|
-
getAway_team_Matches!: Sequelize.HasManyGetAssociationsMixin<MatchModel>
|
|
66
|
-
setAway_team_Matches!: Sequelize.HasManySetAssociationsMixin<MatchModel, MatchId>
|
|
67
|
-
addAway_team_Match!: Sequelize.HasManyAddAssociationMixin<MatchModel, MatchId>
|
|
68
|
-
addAway_team_Matches!: Sequelize.HasManyAddAssociationsMixin<MatchModel, MatchId>
|
|
69
|
-
createAway_team_Match!: Sequelize.HasManyCreateAssociationMixin<MatchModel>
|
|
70
|
-
removeAway_team_Match!: Sequelize.HasManyRemoveAssociationMixin<MatchModel, MatchId>
|
|
71
|
-
removeAway_team_Matches!: Sequelize.HasManyRemoveAssociationsMixin<MatchModel, MatchId>
|
|
72
|
-
hasAway_team_Match!: Sequelize.HasManyHasAssociationMixin<MatchModel, MatchId>
|
|
73
|
-
hasAway_team_Matches!: Sequelize.HasManyHasAssociationsMixin<MatchModel, MatchId>
|
|
74
|
-
countAway_team_Matches!: Sequelize.HasManyCountAssociationsMixin
|
|
75
|
-
// Team hasMany Player via team_id
|
|
76
|
-
Players!: PlayerModel[]
|
|
77
|
-
getPlayers!: Sequelize.HasManyGetAssociationsMixin<PlayerModel>
|
|
78
|
-
setPlayers!: Sequelize.HasManySetAssociationsMixin<PlayerModel, PlayerId>
|
|
79
|
-
addPlayer!: Sequelize.HasManyAddAssociationMixin<PlayerModel, PlayerId>
|
|
80
|
-
addPlayers!: Sequelize.HasManyAddAssociationsMixin<PlayerModel, PlayerId>
|
|
81
|
-
createPlayer!: Sequelize.HasManyCreateAssociationMixin<PlayerModel>
|
|
82
|
-
removePlayer!: Sequelize.HasManyRemoveAssociationMixin<PlayerModel, PlayerId>
|
|
83
|
-
removePlayers!: Sequelize.HasManyRemoveAssociationsMixin<PlayerModel, PlayerId>
|
|
84
|
-
hasPlayer!: Sequelize.HasManyHasAssociationMixin<PlayerModel, PlayerId>
|
|
85
|
-
hasPlayers!: Sequelize.HasManyHasAssociationsMixin<PlayerModel, PlayerId>
|
|
86
|
-
countPlayers!: Sequelize.HasManyCountAssociationsMixin
|
|
87
|
-
// Team hasMany Rally via serving_team
|
|
88
|
-
Rallies!: RallyModel[]
|
|
89
|
-
getRallies!: Sequelize.HasManyGetAssociationsMixin<RallyModel>
|
|
90
|
-
setRallies!: Sequelize.HasManySetAssociationsMixin<RallyModel, RallyId>
|
|
91
|
-
addRally!: Sequelize.HasManyAddAssociationMixin<RallyModel, RallyId>
|
|
92
|
-
addRallies!: Sequelize.HasManyAddAssociationsMixin<RallyModel, RallyId>
|
|
93
|
-
createRally!: Sequelize.HasManyCreateAssociationMixin<RallyModel>
|
|
94
|
-
removeRally!: Sequelize.HasManyRemoveAssociationMixin<RallyModel, RallyId>
|
|
95
|
-
removeRallies!: Sequelize.HasManyRemoveAssociationsMixin<RallyModel, RallyId>
|
|
96
|
-
hasRally!: Sequelize.HasManyHasAssociationMixin<RallyModel, RallyId>
|
|
97
|
-
hasRallies!: Sequelize.HasManyHasAssociationsMixin<RallyModel, RallyId>
|
|
98
|
-
countRallies!: Sequelize.HasManyCountAssociationsMixin
|
|
99
|
-
// Team hasMany Score via team_id
|
|
100
|
-
Scores!: ScoreModel[]
|
|
101
|
-
getScores!: Sequelize.HasManyGetAssociationsMixin<ScoreModel>
|
|
102
|
-
setScores!: Sequelize.HasManySetAssociationsMixin<ScoreModel, ScoreId>
|
|
103
|
-
addScore!: Sequelize.HasManyAddAssociationMixin<ScoreModel, ScoreId>
|
|
104
|
-
addScores!: Sequelize.HasManyAddAssociationsMixin<ScoreModel, ScoreId>
|
|
105
|
-
createScore!: Sequelize.HasManyCreateAssociationMixin<ScoreModel>
|
|
106
|
-
removeScore!: Sequelize.HasManyRemoveAssociationMixin<ScoreModel, ScoreId>
|
|
107
|
-
removeScores!: Sequelize.HasManyRemoveAssociationsMixin<ScoreModel, ScoreId>
|
|
108
|
-
hasScore!: Sequelize.HasManyHasAssociationMixin<ScoreModel, ScoreId>
|
|
109
|
-
hasScores!: Sequelize.HasManyHasAssociationsMixin<ScoreModel, ScoreId>
|
|
110
|
-
countScores!: Sequelize.HasManyCountAssociationsMixin
|
|
111
|
-
// Team belongsToMany Season via team_id and season_id
|
|
112
|
-
season_id_Seasons!: SeasonModel[]
|
|
113
|
-
getSeason_id_Seasons!: Sequelize.BelongsToManyGetAssociationsMixin<SeasonModel>
|
|
114
|
-
setSeason_id_Seasons!: Sequelize.BelongsToManySetAssociationsMixin<SeasonModel, SeasonId>
|
|
115
|
-
addSeason_id_Season!: Sequelize.BelongsToManyAddAssociationMixin<SeasonModel, SeasonId>
|
|
116
|
-
addSeason_id_Seasons!: Sequelize.BelongsToManyAddAssociationsMixin<SeasonModel, SeasonId>
|
|
117
|
-
createSeason_id_Season!: Sequelize.BelongsToManyCreateAssociationMixin<SeasonModel>
|
|
118
|
-
removeSeason_id_Season!: Sequelize.BelongsToManyRemoveAssociationMixin<SeasonModel, SeasonId>
|
|
119
|
-
removeSeason_id_Seasons!: Sequelize.BelongsToManyRemoveAssociationsMixin<SeasonModel, SeasonId>
|
|
120
|
-
hasSeason_id_Season!: Sequelize.BelongsToManyHasAssociationMixin<SeasonModel, SeasonId>
|
|
121
|
-
hasSeason_id_Seasons!: Sequelize.BelongsToManyHasAssociationsMixin<SeasonModel, SeasonId>
|
|
122
|
-
countSeason_id_Seasons!: Sequelize.BelongsToManyCountAssociationsMixin
|
|
123
|
-
// Team hasMany SeasonTeams via team_id
|
|
124
|
-
Season!: SeasonTeamsModel[]
|
|
125
|
-
getSeasonTeams!: Sequelize.HasManyGetAssociationsMixin<SeasonTeamsModel>
|
|
126
|
-
setSeasonTeams!: Sequelize.HasManySetAssociationsMixin<SeasonTeamsModel, SeasonTeamsId>
|
|
127
|
-
addSeasonTeam!: Sequelize.HasManyAddAssociationMixin<SeasonTeamsModel, SeasonTeamsId>
|
|
128
|
-
addSeasonTeams!: Sequelize.HasManyAddAssociationsMixin<SeasonTeamsModel, SeasonTeamsId>
|
|
129
|
-
createSeasonTeam!: Sequelize.HasManyCreateAssociationMixin<SeasonTeamsModel>
|
|
130
|
-
removeSeasonTeam!: Sequelize.HasManyRemoveAssociationMixin<SeasonTeamsModel, SeasonTeamsId>
|
|
131
|
-
removeSeasonTeams!: Sequelize.HasManyRemoveAssociationsMixin<SeasonTeamsModel, SeasonTeamsId>
|
|
132
|
-
hasSeasonTeam!: Sequelize.HasManyHasAssociationMixin<SeasonTeamsModel, SeasonTeamsId>
|
|
133
|
-
hasSeasonTeams!: Sequelize.HasManyHasAssociationsMixin<SeasonTeamsModel, SeasonTeamsId>
|
|
134
|
-
countSeasonTeams!: Sequelize.HasManyCountAssociationsMixin
|
|
135
|
-
|
|
136
|
-
static initModel (sequelize: Sequelize.Sequelize): typeof TeamModel {
|
|
137
|
-
return TeamModel.init({
|
|
138
|
-
team_id: {
|
|
139
|
-
type: DataTypes.UUID,
|
|
140
|
-
allowNull: false,
|
|
141
|
-
primaryKey: true
|
|
142
|
-
},
|
|
143
|
-
coach_id: {
|
|
144
|
-
type: DataTypes.UUID,
|
|
145
|
-
allowNull: false,
|
|
146
|
-
references: {
|
|
147
|
-
model: 'Coach',
|
|
148
|
-
key: 'coach_id'
|
|
149
|
-
}
|
|
150
|
-
},
|
|
151
|
-
league_id: {
|
|
152
|
-
type: DataTypes.UUID,
|
|
153
|
-
allowNull: false,
|
|
154
|
-
references: {
|
|
155
|
-
model: 'League',
|
|
156
|
-
key: 'league_id'
|
|
157
|
-
}
|
|
158
|
-
},
|
|
159
|
-
name: {
|
|
160
|
-
type: DataTypes.STRING(50),
|
|
161
|
-
allowNull: false,
|
|
162
|
-
unique: true
|
|
163
|
-
},
|
|
164
|
-
short_name: {
|
|
165
|
-
type: DataTypes.STRING,
|
|
166
|
-
allowNull: false,
|
|
167
|
-
unique: true
|
|
168
|
-
},
|
|
169
|
-
country_id: {
|
|
170
|
-
type: DataTypes.UUID,
|
|
171
|
-
allowNull: false,
|
|
172
|
-
references: {
|
|
173
|
-
model: 'Country',
|
|
174
|
-
key: 'country_id'
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
}, {
|
|
178
|
-
sequelize,
|
|
179
|
-
tableName: 'Team',
|
|
180
|
-
schema: 'public',
|
|
181
|
-
timestamps: false,
|
|
182
|
-
indexes: [
|
|
183
|
-
{
|
|
184
|
-
name: 'Team_pk',
|
|
185
|
-
unique: true,
|
|
186
|
-
fields: [
|
|
187
|
-
{ name: 'team_id' }
|
|
188
|
-
]
|
|
189
|
-
}
|
|
190
|
-
]
|
|
191
|
-
})
|
|
192
|
-
}
|
|
193
|
-
}
|