@earbug/db-models 0.0.1

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 (211) hide show
  1. package/.nvmrc +1 -0
  2. package/dist/AppUser.d.ts +161 -0
  3. package/dist/AppUser.js +121 -0
  4. package/dist/AppUserDevice.d.ts +26 -0
  5. package/dist/AppUserDevice.js +88 -0
  6. package/dist/AppUserFollowRelation.d.ts +34 -0
  7. package/dist/AppUserFollowRelation.js +113 -0
  8. package/dist/AppUserPlatformRelation.d.ts +43 -0
  9. package/dist/AppUserPlatformRelation.js +132 -0
  10. package/dist/CanonAlbum.d.ts +119 -0
  11. package/dist/CanonAlbum.js +117 -0
  12. package/dist/CanonAlbumExternalReferenceRelation.d.ts +31 -0
  13. package/dist/CanonAlbumExternalReferenceRelation.js +86 -0
  14. package/dist/CanonAlbumGenreRelation.d.ts +29 -0
  15. package/dist/CanonAlbumGenreRelation.js +82 -0
  16. package/dist/CanonAlbumImageHarvested.d.ts +30 -0
  17. package/dist/CanonAlbumImageHarvested.js +78 -0
  18. package/dist/CanonAlbumLabelRelation.d.ts +29 -0
  19. package/dist/CanonAlbumLabelRelation.js +82 -0
  20. package/dist/CanonAlbumTrackRelation.d.ts +29 -0
  21. package/dist/CanonAlbumTrackRelation.js +82 -0
  22. package/dist/CanonArtist.d.ts +91 -0
  23. package/dist/CanonArtist.js +114 -0
  24. package/dist/CanonArtistAlbumRelation.d.ts +29 -0
  25. package/dist/CanonArtistAlbumRelation.js +82 -0
  26. package/dist/CanonArtistExternalReferenceRelation.d.ts +31 -0
  27. package/dist/CanonArtistExternalReferenceRelation.js +86 -0
  28. package/dist/CanonArtistGenreRelation.d.ts +29 -0
  29. package/dist/CanonArtistGenreRelation.js +82 -0
  30. package/dist/CanonArtistImageHarvested.d.ts +30 -0
  31. package/dist/CanonArtistImageHarvested.js +70 -0
  32. package/dist/CanonArtistMemberRelation.d.ts +29 -0
  33. package/dist/CanonArtistMemberRelation.js +82 -0
  34. package/dist/CanonArtistTrackRelation.d.ts +29 -0
  35. package/dist/CanonArtistTrackRelation.js +82 -0
  36. package/dist/CanonGenre.d.ts +133 -0
  37. package/dist/CanonGenre.js +93 -0
  38. package/dist/CanonGenreExternalReferenceRelation.d.ts +31 -0
  39. package/dist/CanonGenreExternalReferenceRelation.js +86 -0
  40. package/dist/CanonLabel.d.ts +69 -0
  41. package/dist/CanonLabel.js +83 -0
  42. package/dist/CanonLabelExternalReferenceRelation.d.ts +31 -0
  43. package/dist/CanonLabelExternalReferenceRelation.js +86 -0
  44. package/dist/CanonMember.d.ts +71 -0
  45. package/dist/CanonMember.js +82 -0
  46. package/dist/CanonMemberExternalReferenceRelation.d.ts +33 -0
  47. package/dist/CanonMemberExternalReferenceRelation.js +91 -0
  48. package/dist/CanonToPlatformAlbumRelation.d.ts +29 -0
  49. package/dist/CanonToPlatformAlbumRelation.js +82 -0
  50. package/dist/CanonToPlatformArtistRelation.d.ts +29 -0
  51. package/dist/CanonToPlatformArtistRelation.js +82 -0
  52. package/dist/CanonToPlatformGenreRelation.d.ts +29 -0
  53. package/dist/CanonToPlatformGenreRelation.js +82 -0
  54. package/dist/CanonToPlatformTrackRelation.d.ts +29 -0
  55. package/dist/CanonToPlatformTrackRelation.js +82 -0
  56. package/dist/CanonTrack.d.ts +89 -0
  57. package/dist/CanonTrack.js +99 -0
  58. package/dist/ConfigParam.d.ts +19 -0
  59. package/dist/ConfigParam.js +70 -0
  60. package/dist/ExternalReference.d.ts +139 -0
  61. package/dist/ExternalReference.js +79 -0
  62. package/dist/JukeboxAccessType.d.ts +26 -0
  63. package/dist/JukeboxAccessType.js +36 -0
  64. package/dist/JukeboxCanonGenreRelation.d.ts +33 -0
  65. package/dist/JukeboxCanonGenreRelation.js +101 -0
  66. package/dist/JukeboxInvite.d.ts +39 -0
  67. package/dist/JukeboxInvite.js +98 -0
  68. package/dist/JukeboxQueueEntry.d.ts +74 -0
  69. package/dist/JukeboxQueueEntry.js +142 -0
  70. package/dist/JukeboxQueueMode.d.ts +26 -0
  71. package/dist/JukeboxQueueMode.js +36 -0
  72. package/dist/JukeboxSession.d.ts +108 -0
  73. package/dist/JukeboxSession.js +133 -0
  74. package/dist/JukeboxStatus.d.ts +26 -0
  75. package/dist/JukeboxStatus.js +34 -0
  76. package/dist/JukeboxTerminationCondition.d.ts +26 -0
  77. package/dist/JukeboxTerminationCondition.js +36 -0
  78. package/dist/JukeboxType.d.ts +26 -0
  79. package/dist/JukeboxType.js +36 -0
  80. package/dist/JukeboxUser.d.ts +56 -0
  81. package/dist/JukeboxUser.js +135 -0
  82. package/dist/JukeboxUserType.d.ts +26 -0
  83. package/dist/JukeboxUserType.js +34 -0
  84. package/dist/KnexMigrations.d.ts +19 -0
  85. package/dist/KnexMigrations.js +44 -0
  86. package/dist/KnexMigrationsLock.d.ts +15 -0
  87. package/dist/KnexMigrationsLock.js +36 -0
  88. package/dist/MetricsDaily.d.ts +19 -0
  89. package/dist/MetricsDaily.js +87 -0
  90. package/dist/MetricsEvent.d.ts +23 -0
  91. package/dist/MetricsEvent.js +117 -0
  92. package/dist/NewsSite.d.ts +21 -0
  93. package/dist/NewsSite.js +57 -0
  94. package/dist/PauseStatusType.d.ts +26 -0
  95. package/dist/PauseStatusType.js +34 -0
  96. package/dist/Platform.d.ts +127 -0
  97. package/dist/Platform.js +80 -0
  98. package/dist/PlatformAlbum.d.ts +232 -0
  99. package/dist/PlatformAlbum.js +123 -0
  100. package/dist/PlatformAlbumGenreRelation.d.ts +29 -0
  101. package/dist/PlatformAlbumGenreRelation.js +82 -0
  102. package/dist/PlatformAlbumTrackRelation.d.ts +29 -0
  103. package/dist/PlatformAlbumTrackRelation.js +82 -0
  104. package/dist/PlatformArtist.d.ts +225 -0
  105. package/dist/PlatformArtist.js +109 -0
  106. package/dist/PlatformArtistAlbumRelation.d.ts +29 -0
  107. package/dist/PlatformArtistAlbumRelation.js +82 -0
  108. package/dist/PlatformArtistGenreRelation.d.ts +29 -0
  109. package/dist/PlatformArtistGenreRelation.js +82 -0
  110. package/dist/PlatformArtistTrackRelation.d.ts +29 -0
  111. package/dist/PlatformArtistTrackRelation.js +82 -0
  112. package/dist/PlatformGenre.d.ts +122 -0
  113. package/dist/PlatformGenre.js +90 -0
  114. package/dist/PlatformTrack.d.ts +183 -0
  115. package/dist/PlatformTrack.js +129 -0
  116. package/dist/PlatformTrackGenreRelation.d.ts +29 -0
  117. package/dist/PlatformTrackGenreRelation.js +82 -0
  118. package/dist/PlatformUserAlbum.d.ts +54 -0
  119. package/dist/PlatformUserAlbum.js +121 -0
  120. package/dist/PlatformUserAlbumTrack.d.ts +42 -0
  121. package/dist/PlatformUserAlbumTrack.js +121 -0
  122. package/dist/PlatformUserPlaylist.d.ts +62 -0
  123. package/dist/PlatformUserPlaylist.js +135 -0
  124. package/dist/PlatformUserPlaylistTrack.d.ts +48 -0
  125. package/dist/PlatformUserPlaylistTrack.js +132 -0
  126. package/dist/PlaybackStatus.d.ts +26 -0
  127. package/dist/PlaybackStatus.js +36 -0
  128. package/dist/State.d.ts +50 -0
  129. package/dist/State.js +36 -0
  130. package/dist/TrackDeletionReason.d.ts +26 -0
  131. package/dist/TrackDeletionReason.js +34 -0
  132. package/dist/UnmatchedAlbum.d.ts +22 -0
  133. package/dist/UnmatchedAlbum.js +70 -0
  134. package/dist/UnmatchedArtist.d.ts +26 -0
  135. package/dist/UnmatchedArtist.js +81 -0
  136. package/dist/UserContacts.d.ts +46 -0
  137. package/dist/UserContacts.js +105 -0
  138. package/dist/init-models.d.ts +209 -0
  139. package/dist/init-models.js +507 -0
  140. package/model_options.json +3 -0
  141. package/models/AppUser.ts +267 -0
  142. package/models/AppUserDevice.ts +88 -0
  143. package/models/AppUserFollowRelation.ts +122 -0
  144. package/models/AppUserPlatformRelation.ts +150 -0
  145. package/models/CanonAlbum.ts +216 -0
  146. package/models/CanonAlbumExternalReferenceRelation.ts +92 -0
  147. package/models/CanonAlbumGenreRelation.ts +86 -0
  148. package/models/CanonAlbumImageHarvested.ts +106 -0
  149. package/models/CanonAlbumLabelRelation.ts +86 -0
  150. package/models/CanonAlbumTrackRelation.ts +86 -0
  151. package/models/CanonArtist.ts +183 -0
  152. package/models/CanonArtistAlbumRelation.ts +86 -0
  153. package/models/CanonArtistExternalReferenceRelation.ts +92 -0
  154. package/models/CanonArtistGenreRelation.ts +86 -0
  155. package/models/CanonArtistImageHarvested.ts +98 -0
  156. package/models/CanonArtistMemberRelation.ts +86 -0
  157. package/models/CanonArtistTrackRelation.ts +86 -0
  158. package/models/CanonGenre.ts +208 -0
  159. package/models/CanonGenreExternalReferenceRelation.ts +92 -0
  160. package/models/CanonLabel.ts +129 -0
  161. package/models/CanonLabelExternalReferenceRelation.ts +92 -0
  162. package/models/CanonMember.ts +130 -0
  163. package/models/CanonMemberExternalReferenceRelation.ts +99 -0
  164. package/models/CanonToPlatformAlbumRelation.ts +86 -0
  165. package/models/CanonToPlatformArtistRelation.ts +86 -0
  166. package/models/CanonToPlatformGenreRelation.ts +86 -0
  167. package/models/CanonToPlatformTrackRelation.ts +86 -0
  168. package/models/CanonTrack.ts +167 -0
  169. package/models/ConfigParam.ts +62 -0
  170. package/models/ExternalReference.ts +201 -0
  171. package/models/JukeboxAccessType.ts +60 -0
  172. package/models/JukeboxCanonGenreRelation.ts +109 -0
  173. package/models/JukeboxInvite.ts +113 -0
  174. package/models/JukeboxQueueEntry.ts +195 -0
  175. package/models/JukeboxQueueMode.ts +60 -0
  176. package/models/JukeboxSession.ts +223 -0
  177. package/models/JukeboxStatus.ts +58 -0
  178. package/models/JukeboxTerminationCondition.ts +60 -0
  179. package/models/JukeboxType.ts +60 -0
  180. package/models/JukeboxUser.ts +169 -0
  181. package/models/JukeboxUserType.ts +58 -0
  182. package/models/KnexMigrations.ts +60 -0
  183. package/models/KnexMigrationsLock.ts +48 -0
  184. package/models/MetricsDaily.ts +79 -0
  185. package/models/MetricsEvent.ts +114 -0
  186. package/models/NewsSite.ts +75 -0
  187. package/models/PauseStatusType.ts +58 -0
  188. package/models/Platform.ts +189 -0
  189. package/models/PlatformAlbum.ts +345 -0
  190. package/models/PlatformAlbumGenreRelation.ts +86 -0
  191. package/models/PlatformAlbumTrackRelation.ts +86 -0
  192. package/models/PlatformArtist.ts +324 -0
  193. package/models/PlatformArtistAlbumRelation.ts +86 -0
  194. package/models/PlatformArtistGenreRelation.ts +86 -0
  195. package/models/PlatformArtistTrackRelation.ts +86 -0
  196. package/models/PlatformGenre.ts +194 -0
  197. package/models/PlatformTrack.ts +298 -0
  198. package/models/PlatformTrackGenreRelation.ts +86 -0
  199. package/models/PlatformUserAlbum.ts +152 -0
  200. package/models/PlatformUserAlbumTrack.ts +139 -0
  201. package/models/PlatformUserPlaylist.ts +174 -0
  202. package/models/PlatformUserPlaylistTrack.ts +156 -0
  203. package/models/PlaybackStatus.ts +60 -0
  204. package/models/State.ts +86 -0
  205. package/models/TrackDeletionReason.ts +58 -0
  206. package/models/UnmatchedAlbum.ts +66 -0
  207. package/models/UnmatchedArtist.ts +81 -0
  208. package/models/UserContacts.ts +149 -0
  209. package/models/init-models.ts +716 -0
  210. package/package.json +19 -0
  211. package/tsconfig.json +52 -0
@@ -0,0 +1,86 @@
1
+ import * as Sequelize from 'sequelize';
2
+ import { DataTypes, Model, Optional } from 'sequelize';
3
+ import type { AppUser, AppUserId } from './AppUser';
4
+ import type { PlatformUserPlaylist, PlatformUserPlaylistId } from './PlatformUserPlaylist';
5
+ import type { PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId } from './PlatformUserPlaylistTrack';
6
+
7
+ export interface StateAttributes {
8
+ id: number;
9
+ description: string;
10
+ }
11
+
12
+ export type StatePk = "id";
13
+ export type StateId = State[StatePk];
14
+ export type StateCreationAttributes = StateAttributes;
15
+
16
+ export class State extends Model<StateAttributes, StateCreationAttributes> implements StateAttributes {
17
+ id!: number;
18
+ description!: string;
19
+
20
+ // State hasMany AppUser via stateId
21
+ appUsers!: AppUser[];
22
+ getAppUsers!: Sequelize.HasManyGetAssociationsMixin<AppUser>;
23
+ setAppUsers!: Sequelize.HasManySetAssociationsMixin<AppUser, AppUserId>;
24
+ addAppUser!: Sequelize.HasManyAddAssociationMixin<AppUser, AppUserId>;
25
+ addAppUsers!: Sequelize.HasManyAddAssociationsMixin<AppUser, AppUserId>;
26
+ createAppUser!: Sequelize.HasManyCreateAssociationMixin<AppUser>;
27
+ removeAppUser!: Sequelize.HasManyRemoveAssociationMixin<AppUser, AppUserId>;
28
+ removeAppUsers!: Sequelize.HasManyRemoveAssociationsMixin<AppUser, AppUserId>;
29
+ hasAppUser!: Sequelize.HasManyHasAssociationMixin<AppUser, AppUserId>;
30
+ hasAppUsers!: Sequelize.HasManyHasAssociationsMixin<AppUser, AppUserId>;
31
+ countAppUsers!: Sequelize.HasManyCountAssociationsMixin;
32
+ // State hasMany PlatformUserPlaylist via stateId
33
+ platformUserPlaylists!: PlatformUserPlaylist[];
34
+ getPlatformUserPlaylists!: Sequelize.HasManyGetAssociationsMixin<PlatformUserPlaylist>;
35
+ setPlatformUserPlaylists!: Sequelize.HasManySetAssociationsMixin<PlatformUserPlaylist, PlatformUserPlaylistId>;
36
+ addPlatformUserPlaylist!: Sequelize.HasManyAddAssociationMixin<PlatformUserPlaylist, PlatformUserPlaylistId>;
37
+ addPlatformUserPlaylists!: Sequelize.HasManyAddAssociationsMixin<PlatformUserPlaylist, PlatformUserPlaylistId>;
38
+ createPlatformUserPlaylist!: Sequelize.HasManyCreateAssociationMixin<PlatformUserPlaylist>;
39
+ removePlatformUserPlaylist!: Sequelize.HasManyRemoveAssociationMixin<PlatformUserPlaylist, PlatformUserPlaylistId>;
40
+ removePlatformUserPlaylists!: Sequelize.HasManyRemoveAssociationsMixin<PlatformUserPlaylist, PlatformUserPlaylistId>;
41
+ hasPlatformUserPlaylist!: Sequelize.HasManyHasAssociationMixin<PlatformUserPlaylist, PlatformUserPlaylistId>;
42
+ hasPlatformUserPlaylists!: Sequelize.HasManyHasAssociationsMixin<PlatformUserPlaylist, PlatformUserPlaylistId>;
43
+ countPlatformUserPlaylists!: Sequelize.HasManyCountAssociationsMixin;
44
+ // State hasMany PlatformUserPlaylistTrack via stateId
45
+ platformUserPlaylistTracks!: PlatformUserPlaylistTrack[];
46
+ getPlatformUserPlaylistTracks!: Sequelize.HasManyGetAssociationsMixin<PlatformUserPlaylistTrack>;
47
+ setPlatformUserPlaylistTracks!: Sequelize.HasManySetAssociationsMixin<PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId>;
48
+ addPlatformUserPlaylistTrack!: Sequelize.HasManyAddAssociationMixin<PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId>;
49
+ addPlatformUserPlaylistTracks!: Sequelize.HasManyAddAssociationsMixin<PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId>;
50
+ createPlatformUserPlaylistTrack!: Sequelize.HasManyCreateAssociationMixin<PlatformUserPlaylistTrack>;
51
+ removePlatformUserPlaylistTrack!: Sequelize.HasManyRemoveAssociationMixin<PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId>;
52
+ removePlatformUserPlaylistTracks!: Sequelize.HasManyRemoveAssociationsMixin<PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId>;
53
+ hasPlatformUserPlaylistTrack!: Sequelize.HasManyHasAssociationMixin<PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId>;
54
+ hasPlatformUserPlaylistTracks!: Sequelize.HasManyHasAssociationsMixin<PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId>;
55
+ countPlatformUserPlaylistTracks!: Sequelize.HasManyCountAssociationsMixin;
56
+
57
+ static initModel(sequelize: Sequelize.Sequelize): typeof State {
58
+ return State.init({
59
+ id: {
60
+ autoIncrement: true,
61
+ autoIncrementIdentity: true,
62
+ type: DataTypes.SMALLINT,
63
+ allowNull: false,
64
+ primaryKey: true
65
+ },
66
+ description: {
67
+ type: DataTypes.TEXT,
68
+ allowNull: false
69
+ }
70
+ }, {
71
+ sequelize,
72
+ tableName: 'state',
73
+ schema: 'eb',
74
+ timestamps: false,
75
+ indexes: [
76
+ {
77
+ name: "state_pkey",
78
+ unique: true,
79
+ fields: [
80
+ { name: "id" },
81
+ ]
82
+ },
83
+ ]
84
+ });
85
+ }
86
+ }
@@ -0,0 +1,58 @@
1
+ import * as Sequelize from 'sequelize';
2
+ import { DataTypes, Model, Optional } from 'sequelize';
3
+ import type { JukeboxQueueEntry, JukeboxQueueEntryId } from './JukeboxQueueEntry';
4
+
5
+ export interface TrackDeletionReasonAttributes {
6
+ id: number;
7
+ description: string;
8
+ }
9
+
10
+ export type TrackDeletionReasonPk = "id";
11
+ export type TrackDeletionReasonId = TrackDeletionReason[TrackDeletionReasonPk];
12
+ export type TrackDeletionReasonCreationAttributes = TrackDeletionReasonAttributes;
13
+
14
+ export class TrackDeletionReason extends Model<TrackDeletionReasonAttributes, TrackDeletionReasonCreationAttributes> implements TrackDeletionReasonAttributes {
15
+ id!: number;
16
+ description!: string;
17
+
18
+ // TrackDeletionReason hasMany JukeboxQueueEntry via trackDeletionReasonId
19
+ jukeboxQueueEntries!: JukeboxQueueEntry[];
20
+ getJukeboxQueueEntries!: Sequelize.HasManyGetAssociationsMixin<JukeboxQueueEntry>;
21
+ setJukeboxQueueEntries!: Sequelize.HasManySetAssociationsMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
22
+ addJukeboxQueueEntry!: Sequelize.HasManyAddAssociationMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
23
+ addJukeboxQueueEntries!: Sequelize.HasManyAddAssociationsMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
24
+ createJukeboxQueueEntry!: Sequelize.HasManyCreateAssociationMixin<JukeboxQueueEntry>;
25
+ removeJukeboxQueueEntry!: Sequelize.HasManyRemoveAssociationMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
26
+ removeJukeboxQueueEntries!: Sequelize.HasManyRemoveAssociationsMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
27
+ hasJukeboxQueueEntry!: Sequelize.HasManyHasAssociationMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
28
+ hasJukeboxQueueEntries!: Sequelize.HasManyHasAssociationsMixin<JukeboxQueueEntry, JukeboxQueueEntryId>;
29
+ countJukeboxQueueEntries!: Sequelize.HasManyCountAssociationsMixin;
30
+
31
+ static initModel(sequelize: Sequelize.Sequelize): typeof TrackDeletionReason {
32
+ return TrackDeletionReason.init({
33
+ id: {
34
+ type: DataTypes.SMALLINT,
35
+ allowNull: false,
36
+ primaryKey: true
37
+ },
38
+ description: {
39
+ type: DataTypes.STRING(255),
40
+ allowNull: false
41
+ }
42
+ }, {
43
+ sequelize,
44
+ tableName: 'track_deletion_reason',
45
+ schema: 'eb',
46
+ timestamps: false,
47
+ indexes: [
48
+ {
49
+ name: "track_deletion_reason_pkey",
50
+ unique: true,
51
+ fields: [
52
+ { name: "id" },
53
+ ]
54
+ },
55
+ ]
56
+ });
57
+ }
58
+ }
@@ -0,0 +1,66 @@
1
+ import * as Sequelize from 'sequelize';
2
+ import { DataTypes, Model, Optional } from 'sequelize';
3
+ import type { PlatformAlbum, PlatformAlbumId } from './PlatformAlbum';
4
+
5
+ export interface UnmatchedAlbumAttributes {
6
+ id: string;
7
+ platformAlbumId: string;
8
+ createDate: Date;
9
+ }
10
+
11
+ export type UnmatchedAlbumPk = "id";
12
+ export type UnmatchedAlbumId = UnmatchedAlbum[UnmatchedAlbumPk];
13
+ export type UnmatchedAlbumOptionalAttributes = "id" | "createDate";
14
+ export type UnmatchedAlbumCreationAttributes = Optional<UnmatchedAlbumAttributes, UnmatchedAlbumOptionalAttributes>;
15
+
16
+ export class UnmatchedAlbum extends Model<UnmatchedAlbumAttributes, UnmatchedAlbumCreationAttributes> implements UnmatchedAlbumAttributes {
17
+ id!: string;
18
+ platformAlbumId!: string;
19
+ createDate!: Date;
20
+
21
+ // UnmatchedAlbum belongsTo PlatformAlbum via platformAlbumId
22
+ platformAlbum!: PlatformAlbum;
23
+ getPlatformAlbum!: Sequelize.BelongsToGetAssociationMixin<PlatformAlbum>;
24
+ setPlatformAlbum!: Sequelize.BelongsToSetAssociationMixin<PlatformAlbum, PlatformAlbumId>;
25
+ createPlatformAlbum!: Sequelize.BelongsToCreateAssociationMixin<PlatformAlbum>;
26
+
27
+ static initModel(sequelize: Sequelize.Sequelize): typeof UnmatchedAlbum {
28
+ return UnmatchedAlbum.init({
29
+ id: {
30
+ type: DataTypes.UUID,
31
+ allowNull: false,
32
+ defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
33
+ primaryKey: true
34
+ },
35
+ platformAlbumId: {
36
+ type: DataTypes.UUID,
37
+ allowNull: false,
38
+ references: {
39
+ model: 'platform_album',
40
+ key: 'id'
41
+ },
42
+ field: 'platform_album_id'
43
+ },
44
+ createDate: {
45
+ type: DataTypes.DATE,
46
+ allowNull: false,
47
+ defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
48
+ field: 'create_date'
49
+ }
50
+ }, {
51
+ sequelize,
52
+ tableName: 'unmatched_album',
53
+ schema: 'eb',
54
+ timestamps: false,
55
+ indexes: [
56
+ {
57
+ name: "unmatched_album_pkey",
58
+ unique: true,
59
+ fields: [
60
+ { name: "id" },
61
+ ]
62
+ },
63
+ ]
64
+ });
65
+ }
66
+ }
@@ -0,0 +1,81 @@
1
+ import * as Sequelize from 'sequelize';
2
+ import { DataTypes, Model, Optional } from 'sequelize';
3
+ import type { Platform, PlatformId } from './Platform';
4
+
5
+ export interface UnmatchedArtistAttributes {
6
+ id: string;
7
+ platformId: number;
8
+ externalArtistId: number;
9
+ createDate: Date;
10
+ updateDate: Date;
11
+ }
12
+
13
+ export type UnmatchedArtistPk = "id";
14
+ export type UnmatchedArtistId = UnmatchedArtist[UnmatchedArtistPk];
15
+ export type UnmatchedArtistOptionalAttributes = "id" | "createDate" | "updateDate";
16
+ export type UnmatchedArtistCreationAttributes = Optional<UnmatchedArtistAttributes, UnmatchedArtistOptionalAttributes>;
17
+
18
+ export class UnmatchedArtist extends Model<UnmatchedArtistAttributes, UnmatchedArtistCreationAttributes> implements UnmatchedArtistAttributes {
19
+ id!: string;
20
+ platformId!: number;
21
+ externalArtistId!: number;
22
+ createDate!: Date;
23
+ updateDate!: Date;
24
+
25
+ // UnmatchedArtist belongsTo Platform via platformId
26
+ platform!: Platform;
27
+ getPlatform!: Sequelize.BelongsToGetAssociationMixin<Platform>;
28
+ setPlatform!: Sequelize.BelongsToSetAssociationMixin<Platform, PlatformId>;
29
+ createPlatform!: Sequelize.BelongsToCreateAssociationMixin<Platform>;
30
+
31
+ static initModel(sequelize: Sequelize.Sequelize): typeof UnmatchedArtist {
32
+ return UnmatchedArtist.init({
33
+ id: {
34
+ type: DataTypes.UUID,
35
+ allowNull: false,
36
+ defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
37
+ primaryKey: true
38
+ },
39
+ platformId: {
40
+ type: DataTypes.SMALLINT,
41
+ allowNull: false,
42
+ references: {
43
+ model: 'platform',
44
+ key: 'id'
45
+ },
46
+ field: 'platform_id'
47
+ },
48
+ externalArtistId: {
49
+ type: DataTypes.INTEGER,
50
+ allowNull: false,
51
+ field: 'external_artist_id'
52
+ },
53
+ createDate: {
54
+ type: DataTypes.DATE,
55
+ allowNull: false,
56
+ defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
57
+ field: 'create_date'
58
+ },
59
+ updateDate: {
60
+ type: DataTypes.DATE,
61
+ allowNull: false,
62
+ defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
63
+ field: 'update_date'
64
+ }
65
+ }, {
66
+ sequelize,
67
+ tableName: 'unmatched_artist',
68
+ schema: 'eb',
69
+ timestamps: false,
70
+ indexes: [
71
+ {
72
+ name: "unmatched_artist_pkey",
73
+ unique: true,
74
+ fields: [
75
+ { name: "id" },
76
+ ]
77
+ },
78
+ ]
79
+ });
80
+ }
81
+ }
@@ -0,0 +1,149 @@
1
+ import * as Sequelize from 'sequelize';
2
+ import { DataTypes, Model, Optional } from 'sequelize';
3
+ import type { AppUser, AppUserId } from './AppUser';
4
+
5
+ export interface UserContactsAttributes {
6
+ appUserId: string;
7
+ contactId: string;
8
+ contactAppUserId?: string;
9
+ firstName?: string;
10
+ lastName?: string;
11
+ contactEmail1?: string;
12
+ contactEmail2?: string;
13
+ contactEmail3?: string;
14
+ contactPhone1?: string;
15
+ contactPhone1Type?: "mobile" | "work" | "home" | "main";
16
+ contactPhone2?: string;
17
+ contactPhone2Type?: "mobile" | "work" | "home" | "main";
18
+ contactPhone3?: string;
19
+ contactPhone3Type?: "mobile" | "work" | "home" | "main";
20
+ active?: boolean;
21
+ }
22
+
23
+ export type UserContactsPk = "contactId";
24
+ export type UserContactsId = UserContacts[UserContactsPk];
25
+ export type UserContactsOptionalAttributes = "contactId" | "contactAppUserId" | "firstName" | "lastName" | "contactEmail1" | "contactEmail2" | "contactEmail3" | "contactPhone1" | "contactPhone1Type" | "contactPhone2" | "contactPhone2Type" | "contactPhone3" | "contactPhone3Type" | "active";
26
+ export type UserContactsCreationAttributes = Optional<UserContactsAttributes, UserContactsOptionalAttributes>;
27
+
28
+ export class UserContacts extends Model<UserContactsAttributes, UserContactsCreationAttributes> implements UserContactsAttributes {
29
+ appUserId!: string;
30
+ contactId!: string;
31
+ contactAppUserId?: string;
32
+ firstName?: string;
33
+ lastName?: string;
34
+ contactEmail1?: string;
35
+ contactEmail2?: string;
36
+ contactEmail3?: string;
37
+ contactPhone1?: string;
38
+ contactPhone1Type?: "mobile" | "work" | "home" | "main";
39
+ contactPhone2?: string;
40
+ contactPhone2Type?: "mobile" | "work" | "home" | "main";
41
+ contactPhone3?: string;
42
+ contactPhone3Type?: "mobile" | "work" | "home" | "main";
43
+ active?: boolean;
44
+
45
+ // UserContacts belongsTo AppUser via appUserId
46
+ appUser!: AppUser;
47
+ getAppUser!: Sequelize.BelongsToGetAssociationMixin<AppUser>;
48
+ setAppUser!: Sequelize.BelongsToSetAssociationMixin<AppUser, AppUserId>;
49
+ createAppUser!: Sequelize.BelongsToCreateAssociationMixin<AppUser>;
50
+
51
+ static initModel(sequelize: Sequelize.Sequelize): typeof UserContacts {
52
+ return UserContacts.init({
53
+ appUserId: {
54
+ type: DataTypes.UUID,
55
+ allowNull: false,
56
+ references: {
57
+ model: 'app_user',
58
+ key: 'id'
59
+ },
60
+ field: 'app_user_id'
61
+ },
62
+ contactId: {
63
+ type: DataTypes.UUID,
64
+ allowNull: false,
65
+ defaultValue: DataTypes.UUIDV4,
66
+ primaryKey: true,
67
+ field: 'contact_id'
68
+ },
69
+ contactAppUserId: {
70
+ type: DataTypes.UUID,
71
+ allowNull: true,
72
+ field: 'contact_app_user_id'
73
+ },
74
+ firstName: {
75
+ type: DataTypes.STRING(255),
76
+ allowNull: true,
77
+ field: 'first_name'
78
+ },
79
+ lastName: {
80
+ type: DataTypes.STRING(255),
81
+ allowNull: true,
82
+ field: 'last_name'
83
+ },
84
+ contactEmail1: {
85
+ type: DataTypes.STRING(255),
86
+ allowNull: true,
87
+ field: 'contact_email_1'
88
+ },
89
+ contactEmail2: {
90
+ type: DataTypes.STRING(255),
91
+ allowNull: true,
92
+ field: 'contact_email_2'
93
+ },
94
+ contactEmail3: {
95
+ type: DataTypes.STRING(255),
96
+ allowNull: true,
97
+ field: 'contact_email_3'
98
+ },
99
+ contactPhone1: {
100
+ type: DataTypes.STRING(255),
101
+ allowNull: true,
102
+ field: 'contact_phone_1'
103
+ },
104
+ contactPhone1Type: {
105
+ type: DataTypes.ENUM("mobile","work","home","main"),
106
+ allowNull: true,
107
+ field: 'contact_phone_1_type'
108
+ },
109
+ contactPhone2: {
110
+ type: DataTypes.STRING(255),
111
+ allowNull: true,
112
+ field: 'contact_phone_2'
113
+ },
114
+ contactPhone2Type: {
115
+ type: DataTypes.ENUM("mobile","work","home","main"),
116
+ allowNull: true,
117
+ field: 'contact_phone_2_type'
118
+ },
119
+ contactPhone3: {
120
+ type: DataTypes.STRING(255),
121
+ allowNull: true,
122
+ field: 'contact_phone_3'
123
+ },
124
+ contactPhone3Type: {
125
+ type: DataTypes.ENUM("mobile","work","home","main"),
126
+ allowNull: true,
127
+ field: 'contact_phone_3_type'
128
+ },
129
+ active: {
130
+ type: DataTypes.BOOLEAN,
131
+ allowNull: true
132
+ }
133
+ }, {
134
+ sequelize,
135
+ tableName: 'user_contacts',
136
+ schema: 'eb',
137
+ timestamps: false,
138
+ indexes: [
139
+ {
140
+ name: "user_contacts_pkey",
141
+ unique: true,
142
+ fields: [
143
+ { name: "contact_id" },
144
+ ]
145
+ },
146
+ ]
147
+ });
148
+ }
149
+ }