@earbug/db-models 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 (137) hide show
  1. package/dist/AppUser.d.ts +5 -5
  2. package/dist/AppUser.js +13 -13
  3. package/dist/AppUserDevice.d.ts +4 -4
  4. package/dist/AppUserDevice.js +8 -8
  5. package/dist/AppUserFollowRelation.d.ts +3 -3
  6. package/dist/AppUserFollowRelation.js +6 -6
  7. package/dist/AppUserPlatformRelation.d.ts +7 -7
  8. package/dist/AppUserPlatformRelation.js +18 -18
  9. package/dist/CanonAlbum.d.ts +29 -5
  10. package/dist/CanonAlbum.js +10 -10
  11. package/dist/CanonAlbumImageHarvested.d.ts +9 -9
  12. package/dist/CanonAlbumImageHarvested.js +24 -32
  13. package/dist/CanonAlbumTrackRelation.d.ts +10 -10
  14. package/dist/CanonAlbumTrackRelation.js +2 -2
  15. package/dist/CanonArtist.d.ts +14 -14
  16. package/dist/CanonArtist.js +6 -6
  17. package/dist/CanonArtistImageHarvested.d.ts +9 -9
  18. package/dist/CanonArtistImageHarvested.js +24 -24
  19. package/dist/CanonGenre.d.ts +3 -3
  20. package/dist/CanonGenre.js +6 -6
  21. package/dist/CanonLabel.d.ts +2 -2
  22. package/dist/CanonLabel.js +6 -6
  23. package/dist/CanonMember.d.ts +3 -3
  24. package/dist/CanonMember.js +6 -6
  25. package/dist/CanonMemberExternalReferenceRelation.d.ts +2 -2
  26. package/dist/CanonMemberExternalReferenceRelation.js +5 -5
  27. package/dist/CanonTrack.d.ts +29 -5
  28. package/dist/CanonTrack.js +11 -11
  29. package/dist/ConfigParam.d.ts +2 -2
  30. package/dist/ConfigParam.js +5 -5
  31. package/dist/ExternalReference.d.ts +2 -2
  32. package/dist/ExternalReference.js +5 -5
  33. package/dist/JukeboxAccessType.d.ts +2 -2
  34. package/dist/JukeboxAccessType.js +4 -4
  35. package/dist/JukeboxCanonGenreRelation.d.ts +2 -2
  36. package/dist/JukeboxCanonGenreRelation.js +6 -6
  37. package/dist/JukeboxInvite.d.ts +3 -3
  38. package/dist/JukeboxInvite.js +6 -6
  39. package/dist/JukeboxQueueEntry.d.ts +10 -10
  40. package/dist/JukeboxQueueEntry.js +12 -12
  41. package/dist/JukeboxQueueMode.d.ts +2 -2
  42. package/dist/JukeboxQueueMode.js +4 -4
  43. package/dist/JukeboxSession.d.ts +9 -9
  44. package/dist/JukeboxSession.js +20 -20
  45. package/dist/JukeboxTerminationCondition.d.ts +2 -2
  46. package/dist/JukeboxTerminationCondition.js +4 -4
  47. package/dist/JukeboxType.d.ts +2 -2
  48. package/dist/JukeboxType.js +4 -4
  49. package/dist/JukeboxUser.d.ts +7 -7
  50. package/dist/JukeboxUser.js +20 -20
  51. package/dist/KnexMigrations.d.ts +3 -3
  52. package/dist/KnexMigrations.js +6 -6
  53. package/dist/KnexMigrationsLock.d.ts +3 -3
  54. package/dist/KnexMigrationsLock.js +5 -5
  55. package/dist/MetricsDaily.d.ts +3 -3
  56. package/dist/MetricsDaily.js +4 -4
  57. package/dist/MetricsEvent.d.ts +5 -1
  58. package/dist/MetricsEvent.js +6 -0
  59. package/dist/NewsSite.d.ts +3 -3
  60. package/dist/NewsSite.js +6 -6
  61. package/dist/Platform.d.ts +2 -2
  62. package/dist/Platform.js +7 -7
  63. package/dist/PlatformAlbum.d.ts +5 -28
  64. package/dist/PlatformAlbum.js +10 -10
  65. package/dist/PlatformArtist.d.ts +5 -5
  66. package/dist/PlatformArtist.js +10 -10
  67. package/dist/PlatformGenre.d.ts +2 -2
  68. package/dist/PlatformGenre.js +6 -6
  69. package/dist/PlatformTrack.d.ts +3 -26
  70. package/dist/PlatformTrack.js +6 -6
  71. package/dist/PlatformUserAlbum.d.ts +2 -2
  72. package/dist/PlatformUserAlbum.js +6 -6
  73. package/dist/PlatformUserAlbumTrack.d.ts +4 -4
  74. package/dist/PlatformUserAlbumTrack.js +11 -11
  75. package/dist/PlatformUserPlaylist.d.ts +5 -5
  76. package/dist/PlatformUserPlaylist.js +11 -11
  77. package/dist/PlatformUserPlaylistTrack.d.ts +7 -7
  78. package/dist/PlatformUserPlaylistTrack.js +17 -17
  79. package/dist/PlaybackStatus.d.ts +2 -14
  80. package/dist/PlaybackStatus.js +4 -4
  81. package/dist/PlaybackStatusType.d.ts +12 -0
  82. package/dist/State.d.ts +2 -2
  83. package/dist/State.js +4 -4
  84. package/dist/UnmatchedAlbum.d.ts +2 -2
  85. package/dist/UnmatchedAlbum.js +6 -6
  86. package/dist/UnmatchedArtist.d.ts +2 -2
  87. package/dist/UnmatchedArtist.js +6 -6
  88. package/dist/UserContacts.d.ts +3 -3
  89. package/dist/UserContacts.js +7 -7
  90. package/dist/init-models.js +9 -9
  91. package/models/AppUser.ts +18 -18
  92. package/models/AppUserDevice.ts +12 -12
  93. package/models/AppUserFollowRelation.ts +9 -9
  94. package/models/AppUserPlatformRelation.ts +25 -25
  95. package/models/CanonAlbum.ts +41 -15
  96. package/models/CanonAlbumImageHarvested.ts +33 -41
  97. package/models/CanonAlbumTrackRelation.ts +14 -14
  98. package/models/CanonArtist.ts +20 -20
  99. package/models/CanonArtistImageHarvested.ts +33 -33
  100. package/models/CanonGenre.ts +9 -9
  101. package/models/CanonLabel.ts +8 -8
  102. package/models/CanonMember.ts +9 -9
  103. package/models/CanonMemberExternalReferenceRelation.ts +7 -7
  104. package/models/CanonTrack.ts +42 -16
  105. package/models/ConfigParam.ts +7 -7
  106. package/models/ExternalReference.ts +7 -7
  107. package/models/JukeboxAccessType.ts +6 -6
  108. package/models/JukeboxCanonGenreRelation.ts +8 -8
  109. package/models/JukeboxInvite.ts +9 -9
  110. package/models/JukeboxQueueEntry.ts +23 -23
  111. package/models/JukeboxQueueMode.ts +6 -6
  112. package/models/JukeboxSession.ts +29 -29
  113. package/models/JukeboxTerminationCondition.ts +6 -6
  114. package/models/JukeboxType.ts +6 -6
  115. package/models/JukeboxUser.ts +27 -27
  116. package/models/KnexMigrations.ts +9 -9
  117. package/models/KnexMigrationsLock.ts +8 -8
  118. package/models/MetricsDaily.ts +7 -7
  119. package/models/MetricsEvent.ts +11 -1
  120. package/models/NewsSite.ts +9 -9
  121. package/models/Platform.ts +9 -9
  122. package/models/PlatformAlbum.ts +15 -40
  123. package/models/PlatformArtist.ts +15 -15
  124. package/models/PlatformGenre.ts +8 -8
  125. package/models/PlatformTrack.ts +9 -34
  126. package/models/PlatformUserAlbum.ts +8 -8
  127. package/models/PlatformUserAlbumTrack.ts +15 -15
  128. package/models/PlatformUserPlaylist.ts +16 -16
  129. package/models/PlatformUserPlaylistTrack.ts +24 -24
  130. package/models/PlaybackStatus.ts +6 -19
  131. package/models/PlaybackStatusType.ts +13 -0
  132. package/models/State.ts +6 -6
  133. package/models/UnmatchedAlbum.ts +8 -8
  134. package/models/UnmatchedArtist.ts +8 -8
  135. package/models/UserContacts.ts +10 -10
  136. package/models/init-models.ts +9 -9
  137. package/package.json +1 -1
@@ -3,28 +3,28 @@ import { DataTypes, Model, Optional } from 'sequelize';
3
3
  import type { CanonArtist, CanonArtistId } from './CanonArtist';
4
4
 
5
5
  export interface CanonArtistImageHarvestedAttributes {
6
- id: string;
7
- canonArtistId: string;
8
- priority?: number;
9
- url?: string;
10
6
  dateHarvested: Date;
11
7
  storageKey: string;
12
8
  harvestMethod?: string;
9
+ url?: string;
10
+ priority?: number;
11
+ canonArtistId: string;
12
+ id: string;
13
13
  }
14
14
 
15
15
  export type CanonArtistImageHarvestedPk = "id";
16
16
  export type CanonArtistImageHarvestedId = CanonArtistImageHarvested[CanonArtistImageHarvestedPk];
17
- export type CanonArtistImageHarvestedOptionalAttributes = "id" | "priority" | "url" | "harvestMethod";
17
+ export type CanonArtistImageHarvestedOptionalAttributes = "harvestMethod" | "url" | "priority" | "id";
18
18
  export type CanonArtistImageHarvestedCreationAttributes = Optional<CanonArtistImageHarvestedAttributes, CanonArtistImageHarvestedOptionalAttributes>;
19
19
 
20
20
  export class CanonArtistImageHarvested extends Model<CanonArtistImageHarvestedAttributes, CanonArtistImageHarvestedCreationAttributes> implements CanonArtistImageHarvestedAttributes {
21
- id!: string;
22
- canonArtistId!: string;
23
- priority?: number;
24
- url?: string;
25
21
  dateHarvested!: Date;
26
22
  storageKey!: string;
27
23
  harvestMethod?: string;
24
+ url?: string;
25
+ priority?: number;
26
+ canonArtistId!: string;
27
+ id!: string;
28
28
 
29
29
  // CanonArtistImageHarvested belongsTo CanonArtist via canonArtistId
30
30
  canonArtist!: CanonArtist;
@@ -34,30 +34,6 @@ export class CanonArtistImageHarvested extends Model<CanonArtistImageHarvestedAt
34
34
 
35
35
  static initModel(sequelize: Sequelize.Sequelize): typeof CanonArtistImageHarvested {
36
36
  return CanonArtistImageHarvested.init({
37
- id: {
38
- type: DataTypes.UUID,
39
- allowNull: false,
40
- defaultValue: DataTypes.UUIDV4,
41
- primaryKey: true
42
- },
43
- canonArtistId: {
44
- type: DataTypes.UUID,
45
- allowNull: false,
46
- references: {
47
- model: 'canon_artist',
48
- key: 'id'
49
- },
50
- field: 'canon_artist_id'
51
- },
52
- priority: {
53
- type: DataTypes.DECIMAL,
54
- allowNull: true,
55
- defaultValue: 0
56
- },
57
- url: {
58
- type: DataTypes.TEXT,
59
- allowNull: true
60
- },
61
37
  dateHarvested: {
62
38
  type: DataTypes.DATE,
63
39
  allowNull: false,
@@ -72,6 +48,30 @@ export class CanonArtistImageHarvested extends Model<CanonArtistImageHarvestedAt
72
48
  type: DataTypes.STRING(255),
73
49
  allowNull: true,
74
50
  field: 'harvest_method'
51
+ },
52
+ url: {
53
+ type: DataTypes.TEXT,
54
+ allowNull: true
55
+ },
56
+ priority: {
57
+ type: DataTypes.DECIMAL,
58
+ allowNull: true,
59
+ defaultValue: 0
60
+ },
61
+ canonArtistId: {
62
+ type: DataTypes.UUID,
63
+ allowNull: false,
64
+ references: {
65
+ model: 'canon_artist',
66
+ key: 'id'
67
+ },
68
+ field: 'canon_artist_id'
69
+ },
70
+ id: {
71
+ type: DataTypes.UUID,
72
+ allowNull: false,
73
+ defaultValue: DataTypes.UUIDV4,
74
+ primaryKey: true
75
75
  }
76
76
  }, {
77
77
  sequelize,
@@ -11,26 +11,26 @@ import type { PlatformArtist, PlatformArtistId } from './PlatformArtist';
11
11
  import type { PlatformGenre, PlatformGenreId } from './PlatformGenre';
12
12
 
13
13
  export interface CanonGenreAttributes {
14
- id: string;
15
14
  name: string;
16
15
  asciiName: string;
17
16
  description: string;
18
17
  parentGenreId?: string;
18
+ id: string;
19
19
  createDate: Date;
20
20
  updateDate: Date;
21
21
  }
22
22
 
23
23
  export type CanonGenrePk = "id";
24
24
  export type CanonGenreId = CanonGenre[CanonGenrePk];
25
- export type CanonGenreOptionalAttributes = "id" | "parentGenreId" | "createDate" | "updateDate";
25
+ export type CanonGenreOptionalAttributes = "parentGenreId" | "id" | "createDate" | "updateDate";
26
26
  export type CanonGenreCreationAttributes = Optional<CanonGenreAttributes, CanonGenreOptionalAttributes>;
27
27
 
28
28
  export class CanonGenre extends Model<CanonGenreAttributes, CanonGenreCreationAttributes> implements CanonGenreAttributes {
29
- id!: string;
30
29
  name!: string;
31
30
  asciiName!: string;
32
31
  description!: string;
33
32
  parentGenreId?: string;
33
+ id!: string;
34
34
  createDate!: Date;
35
35
  updateDate!: Date;
36
36
 
@@ -145,12 +145,6 @@ export class CanonGenre extends Model<CanonGenreAttributes, CanonGenreCreationAt
145
145
 
146
146
  static initModel(sequelize: Sequelize.Sequelize): typeof CanonGenre {
147
147
  return CanonGenre.init({
148
- id: {
149
- type: DataTypes.UUID,
150
- allowNull: false,
151
- defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
152
- primaryKey: true
153
- },
154
148
  name: {
155
149
  type: DataTypes.TEXT,
156
150
  allowNull: false,
@@ -170,6 +164,12 @@ export class CanonGenre extends Model<CanonGenreAttributes, CanonGenreCreationAt
170
164
  allowNull: true,
171
165
  field: 'parent_genre_id'
172
166
  },
167
+ id: {
168
+ type: DataTypes.UUID,
169
+ allowNull: false,
170
+ defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
171
+ primaryKey: true
172
+ },
173
173
  createDate: {
174
174
  type: DataTypes.DATE,
175
175
  allowNull: false,
@@ -6,9 +6,9 @@ import type { ExternalReference, ExternalReferenceId } from './ExternalReference
6
6
  import type { PlatformAlbum, PlatformAlbumId } from './PlatformAlbum';
7
7
 
8
8
  export interface CanonLabelAttributes {
9
- id: string;
10
9
  name: string;
11
10
  asciiName: string;
11
+ id: string;
12
12
  createDate: Date;
13
13
  updateDate: Date;
14
14
  }
@@ -19,9 +19,9 @@ export type CanonLabelOptionalAttributes = "id" | "createDate" | "updateDate";
19
19
  export type CanonLabelCreationAttributes = Optional<CanonLabelAttributes, CanonLabelOptionalAttributes>;
20
20
 
21
21
  export class CanonLabel extends Model<CanonLabelAttributes, CanonLabelCreationAttributes> implements CanonLabelAttributes {
22
- id!: string;
23
22
  name!: string;
24
23
  asciiName!: string;
24
+ id!: string;
25
25
  createDate!: Date;
26
26
  updateDate!: Date;
27
27
 
@@ -76,12 +76,6 @@ export class CanonLabel extends Model<CanonLabelAttributes, CanonLabelCreationAt
76
76
 
77
77
  static initModel(sequelize: Sequelize.Sequelize): typeof CanonLabel {
78
78
  return CanonLabel.init({
79
- id: {
80
- type: DataTypes.UUID,
81
- allowNull: false,
82
- defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
83
- primaryKey: true
84
- },
85
79
  name: {
86
80
  type: DataTypes.TEXT,
87
81
  allowNull: false
@@ -91,6 +85,12 @@ export class CanonLabel extends Model<CanonLabelAttributes, CanonLabelCreationAt
91
85
  allowNull: false,
92
86
  field: 'ascii_name'
93
87
  },
88
+ id: {
89
+ type: DataTypes.UUID,
90
+ allowNull: false,
91
+ defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
92
+ primaryKey: true
93
+ },
94
94
  createDate: {
95
95
  type: DataTypes.DATE,
96
96
  allowNull: false,
@@ -6,9 +6,9 @@ import type { ExternalReference, ExternalReferenceId } from './ExternalReference
6
6
  import type { PlatformArtist, PlatformArtistId } from './PlatformArtist';
7
7
 
8
8
  export interface CanonMemberAttributes {
9
- id: string;
10
9
  name?: string;
11
10
  asciiName?: string;
11
+ id: string;
12
12
  createDate?: Date;
13
13
  updateDate?: Date;
14
14
  isPast?: boolean;
@@ -16,13 +16,13 @@ export interface CanonMemberAttributes {
16
16
 
17
17
  export type CanonMemberPk = "id";
18
18
  export type CanonMemberId = CanonMember[CanonMemberPk];
19
- export type CanonMemberOptionalAttributes = "id" | "name" | "asciiName" | "createDate" | "updateDate" | "isPast";
19
+ export type CanonMemberOptionalAttributes = "name" | "asciiName" | "id" | "createDate" | "updateDate" | "isPast";
20
20
  export type CanonMemberCreationAttributes = Optional<CanonMemberAttributes, CanonMemberOptionalAttributes>;
21
21
 
22
22
  export class CanonMember extends Model<CanonMemberAttributes, CanonMemberCreationAttributes> implements CanonMemberAttributes {
23
- id!: string;
24
23
  name?: string;
25
24
  asciiName?: string;
25
+ id!: string;
26
26
  createDate?: Date;
27
27
  updateDate?: Date;
28
28
  isPast?: boolean;
@@ -78,12 +78,6 @@ export class CanonMember extends Model<CanonMemberAttributes, CanonMemberCreatio
78
78
 
79
79
  static initModel(sequelize: Sequelize.Sequelize): typeof CanonMember {
80
80
  return CanonMember.init({
81
- id: {
82
- type: DataTypes.UUID,
83
- allowNull: false,
84
- defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
85
- primaryKey: true
86
- },
87
81
  name: {
88
82
  type: DataTypes.TEXT,
89
83
  allowNull: true
@@ -93,6 +87,12 @@ export class CanonMember extends Model<CanonMemberAttributes, CanonMemberCreatio
93
87
  allowNull: true,
94
88
  field: 'ascii_name'
95
89
  },
90
+ id: {
91
+ type: DataTypes.UUID,
92
+ allowNull: false,
93
+ defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
94
+ primaryKey: true
95
+ },
96
96
  createDate: {
97
97
  type: DataTypes.DATE,
98
98
  allowNull: true,
@@ -4,10 +4,10 @@ import type { CanonMember, CanonMemberId } from './CanonMember';
4
4
  import type { ExternalReference, ExternalReferenceId } from './ExternalReference';
5
5
 
6
6
  export interface CanonMemberExternalReferenceRelationAttributes {
7
- id: string;
8
7
  canonMemberId: string;
9
8
  externalReferenceId: string;
10
9
  url: string;
10
+ id: string;
11
11
  createDate: Date;
12
12
  updateDate: Date;
13
13
  }
@@ -18,10 +18,10 @@ export type CanonMemberExternalReferenceRelationOptionalAttributes = "id" | "cre
18
18
  export type CanonMemberExternalReferenceRelationCreationAttributes = Optional<CanonMemberExternalReferenceRelationAttributes, CanonMemberExternalReferenceRelationOptionalAttributes>;
19
19
 
20
20
  export class CanonMemberExternalReferenceRelation extends Model<CanonMemberExternalReferenceRelationAttributes, CanonMemberExternalReferenceRelationCreationAttributes> implements CanonMemberExternalReferenceRelationAttributes {
21
- id!: string;
22
21
  canonMemberId!: string;
23
22
  externalReferenceId!: string;
24
23
  url!: string;
24
+ id!: string;
25
25
  createDate!: Date;
26
26
  updateDate!: Date;
27
27
 
@@ -38,11 +38,6 @@ export class CanonMemberExternalReferenceRelation extends Model<CanonMemberExter
38
38
 
39
39
  static initModel(sequelize: Sequelize.Sequelize): typeof CanonMemberExternalReferenceRelation {
40
40
  return CanonMemberExternalReferenceRelation.init({
41
- id: {
42
- type: DataTypes.UUID,
43
- allowNull: false,
44
- defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1')
45
- },
46
41
  canonMemberId: {
47
42
  type: DataTypes.UUID,
48
43
  allowNull: false,
@@ -67,6 +62,11 @@ export class CanonMemberExternalReferenceRelation extends Model<CanonMemberExter
67
62
  type: DataTypes.TEXT,
68
63
  allowNull: false
69
64
  },
65
+ id: {
66
+ type: DataTypes.UUID,
67
+ allowNull: false,
68
+ defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1')
69
+ },
70
70
  createDate: {
71
71
  type: DataTypes.DATE,
72
72
  allowNull: false,
@@ -1,5 +1,7 @@
1
1
  import * as Sequelize from 'sequelize';
2
2
  import { DataTypes, Model, Optional } from 'sequelize';
3
+ import type { CanonAlbum, CanonAlbumId } from './CanonAlbum';
4
+ import type { CanonAlbumTrackRelation, CanonAlbumTrackRelationId } from './CanonAlbumTrackRelation';
3
5
  import type { CanonArtist, CanonArtistId } from './CanonArtist';
4
6
  import type { CanonArtistTrackRelation, CanonArtistTrackRelationId } from './CanonArtistTrackRelation';
5
7
  import type { CanonToPlatformTrackRelation, CanonToPlatformTrackRelationId } from './CanonToPlatformTrackRelation';
@@ -7,33 +9,57 @@ import type { JukeboxQueueEntry, JukeboxQueueEntryId } from './JukeboxQueueEntry
7
9
  import type { PlatformTrack, PlatformTrackId } from './PlatformTrack';
8
10
 
9
11
  export interface CanonTrackAttributes {
10
- id: string;
11
12
  name: string;
12
13
  asciiName: string;
13
14
  explicit: boolean;
14
15
  discNumber?: number;
15
16
  discTrackNumber?: number;
17
+ durationMs: number;
18
+ id: string;
16
19
  createDate: Date;
17
20
  updateDate: Date;
18
- durationMs: number;
19
21
  }
20
22
 
21
23
  export type CanonTrackPk = "id";
22
24
  export type CanonTrackId = CanonTrack[CanonTrackPk];
23
- export type CanonTrackOptionalAttributes = "id" | "discNumber" | "discTrackNumber" | "createDate" | "updateDate";
25
+ export type CanonTrackOptionalAttributes = "discNumber" | "discTrackNumber" | "id" | "createDate" | "updateDate";
24
26
  export type CanonTrackCreationAttributes = Optional<CanonTrackAttributes, CanonTrackOptionalAttributes>;
25
27
 
26
28
  export class CanonTrack extends Model<CanonTrackAttributes, CanonTrackCreationAttributes> implements CanonTrackAttributes {
27
- id!: string;
28
29
  name!: string;
29
30
  asciiName!: string;
30
31
  explicit!: boolean;
31
32
  discNumber?: number;
32
33
  discTrackNumber?: number;
34
+ durationMs!: number;
35
+ id!: string;
33
36
  createDate!: Date;
34
37
  updateDate!: Date;
35
- durationMs!: number;
36
38
 
39
+ // CanonTrack belongsToMany CanonAlbum via canonTrackId and canonAlbumId
40
+ canonAlbumIdCanonAlbumCanonAlbumTrackRelations!: CanonAlbum[];
41
+ getCanonAlbumIdCanonAlbumCanonAlbumTrackRelations!: Sequelize.BelongsToManyGetAssociationsMixin<CanonAlbum>;
42
+ setCanonAlbumIdCanonAlbumCanonAlbumTrackRelations!: Sequelize.BelongsToManySetAssociationsMixin<CanonAlbum, CanonAlbumId>;
43
+ addCanonAlbumIdCanonAlbumCanonAlbumTrackRelation!: Sequelize.BelongsToManyAddAssociationMixin<CanonAlbum, CanonAlbumId>;
44
+ addCanonAlbumIdCanonAlbumCanonAlbumTrackRelations!: Sequelize.BelongsToManyAddAssociationsMixin<CanonAlbum, CanonAlbumId>;
45
+ createCanonAlbumIdCanonAlbumCanonAlbumTrackRelation!: Sequelize.BelongsToManyCreateAssociationMixin<CanonAlbum>;
46
+ removeCanonAlbumIdCanonAlbumCanonAlbumTrackRelation!: Sequelize.BelongsToManyRemoveAssociationMixin<CanonAlbum, CanonAlbumId>;
47
+ removeCanonAlbumIdCanonAlbumCanonAlbumTrackRelations!: Sequelize.BelongsToManyRemoveAssociationsMixin<CanonAlbum, CanonAlbumId>;
48
+ hasCanonAlbumIdCanonAlbumCanonAlbumTrackRelation!: Sequelize.BelongsToManyHasAssociationMixin<CanonAlbum, CanonAlbumId>;
49
+ hasCanonAlbumIdCanonAlbumCanonAlbumTrackRelations!: Sequelize.BelongsToManyHasAssociationsMixin<CanonAlbum, CanonAlbumId>;
50
+ countCanonAlbumIdCanonAlbumCanonAlbumTrackRelations!: Sequelize.BelongsToManyCountAssociationsMixin;
51
+ // CanonTrack hasMany CanonAlbumTrackRelation via canonTrackId
52
+ canonAlbumTrackRelations!: CanonAlbumTrackRelation[];
53
+ getCanonAlbumTrackRelations!: Sequelize.HasManyGetAssociationsMixin<CanonAlbumTrackRelation>;
54
+ setCanonAlbumTrackRelations!: Sequelize.HasManySetAssociationsMixin<CanonAlbumTrackRelation, CanonAlbumTrackRelationId>;
55
+ addCanonAlbumTrackRelation!: Sequelize.HasManyAddAssociationMixin<CanonAlbumTrackRelation, CanonAlbumTrackRelationId>;
56
+ addCanonAlbumTrackRelations!: Sequelize.HasManyAddAssociationsMixin<CanonAlbumTrackRelation, CanonAlbumTrackRelationId>;
57
+ createCanonAlbumTrackRelation!: Sequelize.HasManyCreateAssociationMixin<CanonAlbumTrackRelation>;
58
+ removeCanonAlbumTrackRelation!: Sequelize.HasManyRemoveAssociationMixin<CanonAlbumTrackRelation, CanonAlbumTrackRelationId>;
59
+ removeCanonAlbumTrackRelations!: Sequelize.HasManyRemoveAssociationsMixin<CanonAlbumTrackRelation, CanonAlbumTrackRelationId>;
60
+ hasCanonAlbumTrackRelation!: Sequelize.HasManyHasAssociationMixin<CanonAlbumTrackRelation, CanonAlbumTrackRelationId>;
61
+ hasCanonAlbumTrackRelations!: Sequelize.HasManyHasAssociationsMixin<CanonAlbumTrackRelation, CanonAlbumTrackRelationId>;
62
+ countCanonAlbumTrackRelations!: Sequelize.HasManyCountAssociationsMixin;
37
63
  // CanonTrack belongsToMany CanonArtist via canonTrackId and canonArtistId
38
64
  canonArtistIdCanonArtistCanonArtistTrackRelations!: CanonArtist[];
39
65
  getCanonArtistIdCanonArtistCanonArtistTrackRelations!: Sequelize.BelongsToManyGetAssociationsMixin<CanonArtist>;
@@ -97,12 +123,6 @@ export class CanonTrack extends Model<CanonTrackAttributes, CanonTrackCreationAt
97
123
 
98
124
  static initModel(sequelize: Sequelize.Sequelize): typeof CanonTrack {
99
125
  return CanonTrack.init({
100
- id: {
101
- type: DataTypes.UUID,
102
- allowNull: false,
103
- defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
104
- primaryKey: true
105
- },
106
126
  name: {
107
127
  type: DataTypes.TEXT,
108
128
  allowNull: false
@@ -126,6 +146,17 @@ export class CanonTrack extends Model<CanonTrackAttributes, CanonTrackCreationAt
126
146
  allowNull: true,
127
147
  field: 'disc_track_number'
128
148
  },
149
+ durationMs: {
150
+ type: DataTypes.INTEGER,
151
+ allowNull: false,
152
+ field: 'duration_ms'
153
+ },
154
+ id: {
155
+ type: DataTypes.UUID,
156
+ allowNull: false,
157
+ defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
158
+ primaryKey: true
159
+ },
129
160
  createDate: {
130
161
  type: DataTypes.DATE,
131
162
  allowNull: false,
@@ -137,11 +168,6 @@ export class CanonTrack extends Model<CanonTrackAttributes, CanonTrackCreationAt
137
168
  allowNull: false,
138
169
  defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
139
170
  field: 'update_date'
140
- },
141
- durationMs: {
142
- type: DataTypes.INTEGER,
143
- allowNull: false,
144
- field: 'duration_ms'
145
171
  }
146
172
  }, {
147
173
  sequelize,
@@ -2,10 +2,10 @@ import * as Sequelize from 'sequelize';
2
2
  import { DataTypes, Model, Optional } from 'sequelize';
3
3
 
4
4
  export interface ConfigParamAttributes {
5
- name: string;
6
5
  value?: string;
7
6
  createdAt: Date;
8
7
  updatedAt: Date;
8
+ name: string;
9
9
  }
10
10
 
11
11
  export type ConfigParamPk = "name";
@@ -14,19 +14,14 @@ export type ConfigParamOptionalAttributes = "value" | "createdAt" | "updatedAt";
14
14
  export type ConfigParamCreationAttributes = Optional<ConfigParamAttributes, ConfigParamOptionalAttributes>;
15
15
 
16
16
  export class ConfigParam extends Model<ConfigParamAttributes, ConfigParamCreationAttributes> implements ConfigParamAttributes {
17
- name!: string;
18
17
  value?: string;
19
18
  createdAt!: Date;
20
19
  updatedAt!: Date;
20
+ name!: string;
21
21
 
22
22
 
23
23
  static initModel(sequelize: Sequelize.Sequelize): typeof ConfigParam {
24
24
  return ConfigParam.init({
25
- name: {
26
- type: DataTypes.TEXT,
27
- allowNull: false,
28
- primaryKey: true
29
- },
30
25
  value: {
31
26
  type: DataTypes.TEXT,
32
27
  allowNull: true
@@ -42,6 +37,11 @@ export class ConfigParam extends Model<ConfigParamAttributes, ConfigParamCreatio
42
37
  allowNull: false,
43
38
  defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
44
39
  field: 'updated_at'
40
+ },
41
+ name: {
42
+ type: DataTypes.TEXT,
43
+ allowNull: false,
44
+ primaryKey: true
45
45
  }
46
46
  }, {
47
47
  sequelize,
@@ -12,8 +12,8 @@ import type { CanonMemberExternalReferenceRelation, CanonMemberExternalReference
12
12
  import type { PlatformArtist, PlatformArtistId } from './PlatformArtist';
13
13
 
14
14
  export interface ExternalReferenceAttributes {
15
- id: string;
16
15
  name: string;
16
+ id: string;
17
17
  createDate: Date;
18
18
  updateDate: Date;
19
19
  }
@@ -24,8 +24,8 @@ export type ExternalReferenceOptionalAttributes = "id" | "createDate" | "updateD
24
24
  export type ExternalReferenceCreationAttributes = Optional<ExternalReferenceAttributes, ExternalReferenceOptionalAttributes>;
25
25
 
26
26
  export class ExternalReference extends Model<ExternalReferenceAttributes, ExternalReferenceCreationAttributes> implements ExternalReferenceAttributes {
27
- id!: string;
28
27
  name!: string;
28
+ id!: string;
29
29
  createDate!: Date;
30
30
  updateDate!: Date;
31
31
 
@@ -152,17 +152,17 @@ export class ExternalReference extends Model<ExternalReferenceAttributes, Extern
152
152
 
153
153
  static initModel(sequelize: Sequelize.Sequelize): typeof ExternalReference {
154
154
  return ExternalReference.init({
155
+ name: {
156
+ type: DataTypes.TEXT,
157
+ allowNull: false,
158
+ unique: "external_reference_un"
159
+ },
155
160
  id: {
156
161
  type: DataTypes.UUID,
157
162
  allowNull: false,
158
163
  defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
159
164
  primaryKey: true
160
165
  },
161
- name: {
162
- type: DataTypes.TEXT,
163
- allowNull: false,
164
- unique: "external_reference_un"
165
- },
166
166
  createDate: {
167
167
  type: DataTypes.DATE,
168
168
  allowNull: false,
@@ -3,8 +3,8 @@ import { DataTypes, Model, Optional } from 'sequelize';
3
3
  import type { JukeboxSession, JukeboxSessionId } from './JukeboxSession';
4
4
 
5
5
  export interface JukeboxAccessTypeAttributes {
6
- id: number;
7
6
  description: string;
7
+ id: number;
8
8
  }
9
9
 
10
10
  export type JukeboxAccessTypePk = "id";
@@ -12,8 +12,8 @@ export type JukeboxAccessTypeId = JukeboxAccessType[JukeboxAccessTypePk];
12
12
  export type JukeboxAccessTypeCreationAttributes = JukeboxAccessTypeAttributes;
13
13
 
14
14
  export class JukeboxAccessType extends Model<JukeboxAccessTypeAttributes, JukeboxAccessTypeCreationAttributes> implements JukeboxAccessTypeAttributes {
15
- id!: number;
16
15
  description!: string;
16
+ id!: number;
17
17
 
18
18
  // JukeboxAccessType hasMany JukeboxSession via accessTypeId
19
19
  jukeboxSessions!: JukeboxSession[];
@@ -30,16 +30,16 @@ export class JukeboxAccessType extends Model<JukeboxAccessTypeAttributes, Jukebo
30
30
 
31
31
  static initModel(sequelize: Sequelize.Sequelize): typeof JukeboxAccessType {
32
32
  return JukeboxAccessType.init({
33
+ description: {
34
+ type: DataTypes.TEXT,
35
+ allowNull: false
36
+ },
33
37
  id: {
34
38
  autoIncrement: true,
35
39
  autoIncrementIdentity: true,
36
40
  type: DataTypes.SMALLINT,
37
41
  allowNull: false,
38
42
  primaryKey: true
39
- },
40
- description: {
41
- type: DataTypes.TEXT,
42
- allowNull: false
43
43
  }
44
44
  }, {
45
45
  sequelize,
@@ -4,10 +4,10 @@ import type { CanonGenre, CanonGenreId } from './CanonGenre';
4
4
  import type { JukeboxSession, JukeboxSessionId } from './JukeboxSession';
5
5
 
6
6
  export interface JukeboxCanonGenreRelationAttributes {
7
- id: string;
8
7
  jukeboxSessionId: string;
9
8
  canonGenreId: string;
10
9
  stateId: number;
10
+ id: string;
11
11
  createdAt: Date;
12
12
  updatedAt: Date;
13
13
  }
@@ -18,10 +18,10 @@ export type JukeboxCanonGenreRelationOptionalAttributes = "id" | "createdAt" | "
18
18
  export type JukeboxCanonGenreRelationCreationAttributes = Optional<JukeboxCanonGenreRelationAttributes, JukeboxCanonGenreRelationOptionalAttributes>;
19
19
 
20
20
  export class JukeboxCanonGenreRelation extends Model<JukeboxCanonGenreRelationAttributes, JukeboxCanonGenreRelationCreationAttributes> implements JukeboxCanonGenreRelationAttributes {
21
- id!: string;
22
21
  jukeboxSessionId!: string;
23
22
  canonGenreId!: string;
24
23
  stateId!: number;
24
+ id!: string;
25
25
  createdAt!: Date;
26
26
  updatedAt!: Date;
27
27
 
@@ -38,12 +38,6 @@ export class JukeboxCanonGenreRelation extends Model<JukeboxCanonGenreRelationAt
38
38
 
39
39
  static initModel(sequelize: Sequelize.Sequelize): typeof JukeboxCanonGenreRelation {
40
40
  return JukeboxCanonGenreRelation.init({
41
- id: {
42
- type: DataTypes.UUID,
43
- allowNull: false,
44
- defaultValue: DataTypes.UUIDV4,
45
- primaryKey: true
46
- },
47
41
  jukeboxSessionId: {
48
42
  type: DataTypes.UUID,
49
43
  allowNull: false,
@@ -69,6 +63,12 @@ export class JukeboxCanonGenreRelation extends Model<JukeboxCanonGenreRelationAt
69
63
  allowNull: false,
70
64
  field: 'state_id'
71
65
  },
66
+ id: {
67
+ type: DataTypes.UUID,
68
+ allowNull: false,
69
+ defaultValue: DataTypes.UUIDV4,
70
+ primaryKey: true
71
+ },
72
72
  createdAt: {
73
73
  type: DataTypes.DATE,
74
74
  allowNull: false,
@@ -4,26 +4,26 @@ import type { AppUser, AppUserId } from './AppUser';
4
4
  import type { JukeboxSession, JukeboxSessionId } from './JukeboxSession';
5
5
 
6
6
  export interface JukeboxInviteAttributes {
7
- id: string;
8
7
  jukeboxSessionId: string;
9
8
  inviterUserId: string;
10
9
  invitedUserId?: string;
11
10
  email?: string;
11
+ id: string;
12
12
  createdAt: Date;
13
13
  updatedAt: Date;
14
14
  }
15
15
 
16
16
  export type JukeboxInvitePk = "id";
17
17
  export type JukeboxInviteId = JukeboxInvite[JukeboxInvitePk];
18
- export type JukeboxInviteOptionalAttributes = "id" | "invitedUserId" | "email" | "createdAt" | "updatedAt";
18
+ export type JukeboxInviteOptionalAttributes = "invitedUserId" | "email" | "id" | "createdAt" | "updatedAt";
19
19
  export type JukeboxInviteCreationAttributes = Optional<JukeboxInviteAttributes, JukeboxInviteOptionalAttributes>;
20
20
 
21
21
  export class JukeboxInvite extends Model<JukeboxInviteAttributes, JukeboxInviteCreationAttributes> implements JukeboxInviteAttributes {
22
- id!: string;
23
22
  jukeboxSessionId!: string;
24
23
  inviterUserId!: string;
25
24
  invitedUserId?: string;
26
25
  email?: string;
26
+ id!: string;
27
27
  createdAt!: Date;
28
28
  updatedAt!: Date;
29
29
 
@@ -45,12 +45,6 @@ export class JukeboxInvite extends Model<JukeboxInviteAttributes, JukeboxInviteC
45
45
 
46
46
  static initModel(sequelize: Sequelize.Sequelize): typeof JukeboxInvite {
47
47
  return JukeboxInvite.init({
48
- id: {
49
- type: DataTypes.UUID,
50
- allowNull: false,
51
- defaultValue: DataTypes.UUIDV4,
52
- primaryKey: true
53
- },
54
48
  jukeboxSessionId: {
55
49
  type: DataTypes.UUID,
56
50
  allowNull: false,
@@ -82,6 +76,12 @@ export class JukeboxInvite extends Model<JukeboxInviteAttributes, JukeboxInviteC
82
76
  type: DataTypes.TEXT,
83
77
  allowNull: true
84
78
  },
79
+ id: {
80
+ type: DataTypes.UUID,
81
+ allowNull: false,
82
+ defaultValue: DataTypes.UUIDV4,
83
+ primaryKey: true
84
+ },
85
85
  createdAt: {
86
86
  type: DataTypes.DATE,
87
87
  allowNull: false,