@earbug/db-models 0.0.7 → 0.0.9

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 (138) hide show
  1. package/dist/AppUser.d.ts +28 -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 +5 -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/CanonArtist.d.ts +3 -3
  14. package/dist/CanonArtist.js +6 -6
  15. package/dist/CanonArtistImageHarvested.d.ts +9 -9
  16. package/dist/CanonArtistImageHarvested.js +24 -24
  17. package/dist/CanonGenre.d.ts +3 -3
  18. package/dist/CanonGenre.js +6 -6
  19. package/dist/CanonLabel.d.ts +2 -2
  20. package/dist/CanonLabel.js +6 -6
  21. package/dist/CanonMember.d.ts +3 -3
  22. package/dist/CanonMember.js +6 -6
  23. package/dist/CanonMemberExternalReferenceRelation.d.ts +2 -2
  24. package/dist/CanonMemberExternalReferenceRelation.js +5 -5
  25. package/dist/CanonTrack.d.ts +5 -5
  26. package/dist/CanonTrack.js +11 -11
  27. package/dist/ConfigParam.d.ts +2 -2
  28. package/dist/ConfigParam.js +5 -5
  29. package/dist/ExternalReference.d.ts +2 -2
  30. package/dist/ExternalReference.js +5 -5
  31. package/dist/JukeboxAccessType.d.ts +2 -2
  32. package/dist/JukeboxAccessType.js +4 -4
  33. package/dist/JukeboxCanonGenreRelation.d.ts +2 -2
  34. package/dist/JukeboxCanonGenreRelation.js +6 -6
  35. package/dist/JukeboxInvite.d.ts +3 -3
  36. package/dist/JukeboxInvite.js +6 -6
  37. package/dist/JukeboxQueueEntry.d.ts +10 -10
  38. package/dist/JukeboxQueueEntry.js +12 -12
  39. package/dist/JukeboxQueueMode.d.ts +2 -2
  40. package/dist/JukeboxQueueMode.js +4 -4
  41. package/dist/JukeboxSession.d.ts +21 -9
  42. package/dist/JukeboxSession.js +20 -20
  43. package/dist/JukeboxTerminationCondition.d.ts +2 -2
  44. package/dist/JukeboxTerminationCondition.js +4 -4
  45. package/dist/JukeboxType.d.ts +2 -2
  46. package/dist/JukeboxType.js +4 -4
  47. package/dist/JukeboxUser.d.ts +7 -7
  48. package/dist/JukeboxUser.js +20 -20
  49. package/dist/KnexMigrations.d.ts +3 -3
  50. package/dist/KnexMigrations.js +6 -6
  51. package/dist/KnexMigrationsLock.d.ts +3 -3
  52. package/dist/KnexMigrationsLock.js +5 -5
  53. package/dist/MetricsDaily.d.ts +3 -3
  54. package/dist/MetricsDaily.js +4 -4
  55. package/dist/NewsSite.d.ts +3 -3
  56. package/dist/NewsSite.js +6 -6
  57. package/dist/Notification.d.ts +62 -0
  58. package/dist/Notification.js +163 -0
  59. package/dist/NotificationType.d.ts +26 -0
  60. package/dist/NotificationType.js +42 -0
  61. package/dist/Platform.d.ts +2 -2
  62. package/dist/Platform.js +7 -7
  63. package/dist/PlatformAlbum.d.ts +5 -5
  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 -3
  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.d.ts +8 -2
  91. package/dist/init-models.js +20 -4
  92. package/models/AppUser.ts +43 -18
  93. package/models/AppUserDevice.ts +12 -12
  94. package/models/AppUserFollowRelation.ts +9 -9
  95. package/models/AppUserPlatformRelation.ts +25 -25
  96. package/models/CanonAlbum.ts +15 -15
  97. package/models/CanonAlbumImageHarvested.ts +33 -41
  98. package/models/CanonArtist.ts +9 -9
  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 +16 -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 +42 -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/NewsSite.ts +9 -9
  120. package/models/Notification.ts +202 -0
  121. package/models/NotificationType.ts +66 -0
  122. package/models/Platform.ts +9 -9
  123. package/models/PlatformAlbum.ts +15 -15
  124. package/models/PlatformArtist.ts +15 -15
  125. package/models/PlatformGenre.ts +8 -8
  126. package/models/PlatformTrack.ts +9 -9
  127. package/models/PlatformUserAlbum.ts +8 -8
  128. package/models/PlatformUserAlbumTrack.ts +15 -15
  129. package/models/PlatformUserPlaylist.ts +16 -16
  130. package/models/PlatformUserPlaylistTrack.ts +24 -24
  131. package/models/PlaybackStatus.ts +6 -19
  132. package/models/PlaybackStatusType.ts +13 -0
  133. package/models/State.ts +6 -6
  134. package/models/UnmatchedAlbum.ts +8 -8
  135. package/models/UnmatchedArtist.ts +8 -8
  136. package/models/UserContacts.ts +10 -10
  137. package/models/init-models.ts +24 -2
  138. package/package.json +1 -1
@@ -9,10 +9,10 @@ import type { PlatformAlbum, PlatformAlbumId } from './PlatformAlbum';
9
9
  import type { PlatformArtist, PlatformArtistId } from './PlatformArtist';
10
10
 
11
11
  export interface CanonArtistAttributes {
12
- id: string;
13
12
  name: string;
14
13
  asciiName: string;
15
14
  description?: string;
15
+ id: string;
16
16
  hasPhoto: boolean;
17
17
  createDate: Date;
18
18
  updateDate: Date;
@@ -23,14 +23,14 @@ export interface CanonArtistAttributes {
23
23
 
24
24
  export type CanonArtistPk = "id";
25
25
  export type CanonArtistId = CanonArtist[CanonArtistPk];
26
- export type CanonArtistOptionalAttributes = "id" | "description" | "createDate" | "updateDate" | "hasThumbnailPhoto" | "images" | "lastImageHarvestAttempt";
26
+ export type CanonArtistOptionalAttributes = "description" | "id" | "createDate" | "updateDate" | "hasThumbnailPhoto" | "images" | "lastImageHarvestAttempt";
27
27
  export type CanonArtistCreationAttributes = Optional<CanonArtistAttributes, CanonArtistOptionalAttributes>;
28
28
 
29
29
  export class CanonArtist extends Model<CanonArtistAttributes, CanonArtistCreationAttributes> implements CanonArtistAttributes {
30
- id!: string;
31
30
  name!: string;
32
31
  asciiName!: string;
33
32
  description?: string;
33
+ id!: string;
34
34
  hasPhoto!: boolean;
35
35
  createDate!: Date;
36
36
  updateDate!: Date;
@@ -125,12 +125,6 @@ export class CanonArtist extends Model<CanonArtistAttributes, CanonArtistCreatio
125
125
 
126
126
  static initModel(sequelize: Sequelize.Sequelize): typeof CanonArtist {
127
127
  return CanonArtist.init({
128
- id: {
129
- type: DataTypes.UUID,
130
- allowNull: false,
131
- defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
132
- primaryKey: true
133
- },
134
128
  name: {
135
129
  type: DataTypes.TEXT,
136
130
  allowNull: false
@@ -144,6 +138,12 @@ export class CanonArtist extends Model<CanonArtistAttributes, CanonArtistCreatio
144
138
  type: DataTypes.TEXT,
145
139
  allowNull: true
146
140
  },
141
+ id: {
142
+ type: DataTypes.UUID,
143
+ allowNull: false,
144
+ defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
145
+ primaryKey: true
146
+ },
147
147
  hasPhoto: {
148
148
  type: DataTypes.BOOLEAN,
149
149
  allowNull: false,
@@ -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,
@@ -9,32 +9,32 @@ import type { JukeboxQueueEntry, JukeboxQueueEntryId } from './JukeboxQueueEntry
9
9
  import type { PlatformTrack, PlatformTrackId } from './PlatformTrack';
10
10
 
11
11
  export interface CanonTrackAttributes {
12
- id: string;
13
12
  name: string;
14
13
  asciiName: string;
15
14
  explicit: boolean;
16
15
  discNumber?: number;
17
16
  discTrackNumber?: number;
17
+ durationMs: number;
18
+ id: string;
18
19
  createDate: Date;
19
20
  updateDate: Date;
20
- durationMs: number;
21
21
  }
22
22
 
23
23
  export type CanonTrackPk = "id";
24
24
  export type CanonTrackId = CanonTrack[CanonTrackPk];
25
- export type CanonTrackOptionalAttributes = "id" | "discNumber" | "discTrackNumber" | "createDate" | "updateDate";
25
+ export type CanonTrackOptionalAttributes = "discNumber" | "discTrackNumber" | "id" | "createDate" | "updateDate";
26
26
  export type CanonTrackCreationAttributes = Optional<CanonTrackAttributes, CanonTrackOptionalAttributes>;
27
27
 
28
28
  export class CanonTrack extends Model<CanonTrackAttributes, CanonTrackCreationAttributes> implements CanonTrackAttributes {
29
- id!: string;
30
29
  name!: string;
31
30
  asciiName!: string;
32
31
  explicit!: boolean;
33
32
  discNumber?: number;
34
33
  discTrackNumber?: number;
34
+ durationMs!: number;
35
+ id!: string;
35
36
  createDate!: Date;
36
37
  updateDate!: Date;
37
- durationMs!: number;
38
38
 
39
39
  // CanonTrack belongsToMany CanonAlbum via canonTrackId and canonAlbumId
40
40
  canonAlbumIdCanonAlbumCanonAlbumTrackRelations!: CanonAlbum[];
@@ -123,12 +123,6 @@ export class CanonTrack extends Model<CanonTrackAttributes, CanonTrackCreationAt
123
123
 
124
124
  static initModel(sequelize: Sequelize.Sequelize): typeof CanonTrack {
125
125
  return CanonTrack.init({
126
- id: {
127
- type: DataTypes.UUID,
128
- allowNull: false,
129
- defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
130
- primaryKey: true
131
- },
132
126
  name: {
133
127
  type: DataTypes.TEXT,
134
128
  allowNull: false
@@ -152,6 +146,17 @@ export class CanonTrack extends Model<CanonTrackAttributes, CanonTrackCreationAt
152
146
  allowNull: true,
153
147
  field: 'disc_track_number'
154
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
+ },
155
160
  createDate: {
156
161
  type: DataTypes.DATE,
157
162
  allowNull: false,
@@ -163,11 +168,6 @@ export class CanonTrack extends Model<CanonTrackAttributes, CanonTrackCreationAt
163
168
  allowNull: false,
164
169
  defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
165
170
  field: 'update_date'
166
- },
167
- durationMs: {
168
- type: DataTypes.INTEGER,
169
- allowNull: false,
170
- field: 'duration_ms'
171
171
  }
172
172
  }, {
173
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,