@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,82 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.PlatformTrackGenreRelation = void 0;
27
+ const Sequelize = __importStar(require("sequelize"));
28
+ const sequelize_1 = require("sequelize");
29
+ class PlatformTrackGenreRelation extends sequelize_1.Model {
30
+ static initModel(sequelize) {
31
+ return PlatformTrackGenreRelation.init({
32
+ platformGenreId: {
33
+ type: sequelize_1.DataTypes.UUID,
34
+ allowNull: false,
35
+ primaryKey: true,
36
+ references: {
37
+ model: 'platform_genre',
38
+ key: 'id'
39
+ },
40
+ field: 'platform_genre_id'
41
+ },
42
+ platformTrackId: {
43
+ type: sequelize_1.DataTypes.UUID,
44
+ allowNull: false,
45
+ primaryKey: true,
46
+ references: {
47
+ model: 'platform_track',
48
+ key: 'id'
49
+ },
50
+ field: 'platform_track_id'
51
+ },
52
+ createDate: {
53
+ type: sequelize_1.DataTypes.DATE,
54
+ allowNull: false,
55
+ defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
56
+ field: 'create_date'
57
+ },
58
+ updateDate: {
59
+ type: sequelize_1.DataTypes.DATE,
60
+ allowNull: false,
61
+ defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
62
+ field: 'update_date'
63
+ }
64
+ }, {
65
+ sequelize,
66
+ tableName: 'platform_track_genre_relation',
67
+ schema: 'eb',
68
+ timestamps: false,
69
+ indexes: [
70
+ {
71
+ name: "platform_track_genre_relation_pkey",
72
+ unique: true,
73
+ fields: [
74
+ { name: "platform_track_id" },
75
+ { name: "platform_genre_id" },
76
+ ]
77
+ },
78
+ ]
79
+ });
80
+ }
81
+ }
82
+ exports.PlatformTrackGenreRelation = PlatformTrackGenreRelation;
@@ -0,0 +1,54 @@
1
+ import * as Sequelize from 'sequelize';
2
+ import { Model, Optional } from 'sequelize';
3
+ import type { AppUser, AppUserId } from './AppUser';
4
+ import type { Platform, PlatformId } from './Platform';
5
+ import type { PlatformAlbum, PlatformAlbumId } from './PlatformAlbum';
6
+ import type { PlatformUserAlbumTrack, PlatformUserAlbumTrackId } from './PlatformUserAlbumTrack';
7
+ export interface PlatformUserAlbumAttributes {
8
+ id: string;
9
+ appUserId: string;
10
+ platformId: number;
11
+ externalUserAlbumId: string;
12
+ platformAlbumId: string;
13
+ createdAt: Date;
14
+ updatedAt: Date;
15
+ stateId: number;
16
+ }
17
+ export type PlatformUserAlbumPk = "id";
18
+ export type PlatformUserAlbumId = PlatformUserAlbum[PlatformUserAlbumPk];
19
+ export type PlatformUserAlbumOptionalAttributes = "id" | "createdAt" | "updatedAt" | "stateId";
20
+ export type PlatformUserAlbumCreationAttributes = Optional<PlatformUserAlbumAttributes, PlatformUserAlbumOptionalAttributes>;
21
+ export declare class PlatformUserAlbum extends Model<PlatformUserAlbumAttributes, PlatformUserAlbumCreationAttributes> implements PlatformUserAlbumAttributes {
22
+ id: string;
23
+ appUserId: string;
24
+ platformId: number;
25
+ externalUserAlbumId: string;
26
+ platformAlbumId: string;
27
+ createdAt: Date;
28
+ updatedAt: Date;
29
+ stateId: number;
30
+ appUser: AppUser;
31
+ getAppUser: Sequelize.BelongsToGetAssociationMixin<AppUser>;
32
+ setAppUser: Sequelize.BelongsToSetAssociationMixin<AppUser, AppUserId>;
33
+ createAppUser: Sequelize.BelongsToCreateAssociationMixin<AppUser>;
34
+ platform: Platform;
35
+ getPlatform: Sequelize.BelongsToGetAssociationMixin<Platform>;
36
+ setPlatform: Sequelize.BelongsToSetAssociationMixin<Platform, PlatformId>;
37
+ createPlatform: Sequelize.BelongsToCreateAssociationMixin<Platform>;
38
+ platformAlbum: PlatformAlbum;
39
+ getPlatformAlbum: Sequelize.BelongsToGetAssociationMixin<PlatformAlbum>;
40
+ setPlatformAlbum: Sequelize.BelongsToSetAssociationMixin<PlatformAlbum, PlatformAlbumId>;
41
+ createPlatformAlbum: Sequelize.BelongsToCreateAssociationMixin<PlatformAlbum>;
42
+ platformUserAlbumTracks: PlatformUserAlbumTrack[];
43
+ getPlatformUserAlbumTracks: Sequelize.HasManyGetAssociationsMixin<PlatformUserAlbumTrack>;
44
+ setPlatformUserAlbumTracks: Sequelize.HasManySetAssociationsMixin<PlatformUserAlbumTrack, PlatformUserAlbumTrackId>;
45
+ addPlatformUserAlbumTrack: Sequelize.HasManyAddAssociationMixin<PlatformUserAlbumTrack, PlatformUserAlbumTrackId>;
46
+ addPlatformUserAlbumTracks: Sequelize.HasManyAddAssociationsMixin<PlatformUserAlbumTrack, PlatformUserAlbumTrackId>;
47
+ createPlatformUserAlbumTrack: Sequelize.HasManyCreateAssociationMixin<PlatformUserAlbumTrack>;
48
+ removePlatformUserAlbumTrack: Sequelize.HasManyRemoveAssociationMixin<PlatformUserAlbumTrack, PlatformUserAlbumTrackId>;
49
+ removePlatformUserAlbumTracks: Sequelize.HasManyRemoveAssociationsMixin<PlatformUserAlbumTrack, PlatformUserAlbumTrackId>;
50
+ hasPlatformUserAlbumTrack: Sequelize.HasManyHasAssociationMixin<PlatformUserAlbumTrack, PlatformUserAlbumTrackId>;
51
+ hasPlatformUserAlbumTracks: Sequelize.HasManyHasAssociationsMixin<PlatformUserAlbumTrack, PlatformUserAlbumTrackId>;
52
+ countPlatformUserAlbumTracks: Sequelize.HasManyCountAssociationsMixin;
53
+ static initModel(sequelize: Sequelize.Sequelize): typeof PlatformUserAlbum;
54
+ }
@@ -0,0 +1,121 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.PlatformUserAlbum = void 0;
27
+ const Sequelize = __importStar(require("sequelize"));
28
+ const sequelize_1 = require("sequelize");
29
+ class PlatformUserAlbum extends sequelize_1.Model {
30
+ static initModel(sequelize) {
31
+ return PlatformUserAlbum.init({
32
+ id: {
33
+ type: sequelize_1.DataTypes.UUID,
34
+ allowNull: false,
35
+ defaultValue: sequelize_1.DataTypes.UUIDV4,
36
+ primaryKey: true
37
+ },
38
+ appUserId: {
39
+ type: sequelize_1.DataTypes.UUID,
40
+ allowNull: false,
41
+ references: {
42
+ model: 'app_user',
43
+ key: 'id'
44
+ },
45
+ unique: "platform_user_album_app_user_id_platform_album_id_unique",
46
+ field: 'app_user_id'
47
+ },
48
+ platformId: {
49
+ type: sequelize_1.DataTypes.SMALLINT,
50
+ allowNull: false,
51
+ references: {
52
+ model: 'platform',
53
+ key: 'id'
54
+ },
55
+ field: 'platform_id'
56
+ },
57
+ externalUserAlbumId: {
58
+ type: sequelize_1.DataTypes.STRING(255),
59
+ allowNull: false,
60
+ field: 'external_user_album_id'
61
+ },
62
+ platformAlbumId: {
63
+ type: sequelize_1.DataTypes.UUID,
64
+ allowNull: false,
65
+ references: {
66
+ model: 'platform_album',
67
+ key: 'id'
68
+ },
69
+ unique: "platform_user_album_app_user_id_platform_album_id_unique",
70
+ field: 'platform_album_id'
71
+ },
72
+ createdAt: {
73
+ type: sequelize_1.DataTypes.DATE,
74
+ allowNull: false,
75
+ defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
76
+ field: 'created_at'
77
+ },
78
+ updatedAt: {
79
+ type: sequelize_1.DataTypes.DATE,
80
+ allowNull: false,
81
+ defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
82
+ field: 'updated_at'
83
+ },
84
+ stateId: {
85
+ type: sequelize_1.DataTypes.SMALLINT,
86
+ allowNull: false,
87
+ defaultValue: 0,
88
+ field: 'state_id'
89
+ }
90
+ }, {
91
+ sequelize,
92
+ tableName: 'platform_user_album',
93
+ schema: 'eb',
94
+ timestamps: false,
95
+ indexes: [
96
+ {
97
+ name: "platform_user_album_app_user_id_index",
98
+ fields: [
99
+ { name: "app_user_id" },
100
+ ]
101
+ },
102
+ {
103
+ name: "platform_user_album_app_user_id_platform_album_id_unique",
104
+ unique: true,
105
+ fields: [
106
+ { name: "app_user_id" },
107
+ { name: "platform_album_id" },
108
+ ]
109
+ },
110
+ {
111
+ name: "platform_user_album_pkey",
112
+ unique: true,
113
+ fields: [
114
+ { name: "id" },
115
+ ]
116
+ },
117
+ ]
118
+ });
119
+ }
120
+ }
121
+ exports.PlatformUserAlbum = PlatformUserAlbum;
@@ -0,0 +1,42 @@
1
+ import * as Sequelize from 'sequelize';
2
+ import { Model, Optional } from 'sequelize';
3
+ import type { Platform, PlatformId } from './Platform';
4
+ import type { PlatformTrack, PlatformTrackId } from './PlatformTrack';
5
+ import type { PlatformUserAlbum, PlatformUserAlbumId } from './PlatformUserAlbum';
6
+ export interface PlatformUserAlbumTrackAttributes {
7
+ id: string;
8
+ platformUserAlbumId: string;
9
+ platformId: number;
10
+ externalUserAlbumTrackId: string;
11
+ platformTrackId: string;
12
+ createdAt: Date;
13
+ updatedAt: Date;
14
+ stateId: number;
15
+ }
16
+ export type PlatformUserAlbumTrackPk = "id";
17
+ export type PlatformUserAlbumTrackId = PlatformUserAlbumTrack[PlatformUserAlbumTrackPk];
18
+ export type PlatformUserAlbumTrackOptionalAttributes = "id" | "createdAt" | "updatedAt" | "stateId";
19
+ export type PlatformUserAlbumTrackCreationAttributes = Optional<PlatformUserAlbumTrackAttributes, PlatformUserAlbumTrackOptionalAttributes>;
20
+ export declare class PlatformUserAlbumTrack extends Model<PlatformUserAlbumTrackAttributes, PlatformUserAlbumTrackCreationAttributes> implements PlatformUserAlbumTrackAttributes {
21
+ id: string;
22
+ platformUserAlbumId: string;
23
+ platformId: number;
24
+ externalUserAlbumTrackId: string;
25
+ platformTrackId: string;
26
+ createdAt: Date;
27
+ updatedAt: Date;
28
+ stateId: number;
29
+ platform: Platform;
30
+ getPlatform: Sequelize.BelongsToGetAssociationMixin<Platform>;
31
+ setPlatform: Sequelize.BelongsToSetAssociationMixin<Platform, PlatformId>;
32
+ createPlatform: Sequelize.BelongsToCreateAssociationMixin<Platform>;
33
+ platformTrack: PlatformTrack;
34
+ getPlatformTrack: Sequelize.BelongsToGetAssociationMixin<PlatformTrack>;
35
+ setPlatformTrack: Sequelize.BelongsToSetAssociationMixin<PlatformTrack, PlatformTrackId>;
36
+ createPlatformTrack: Sequelize.BelongsToCreateAssociationMixin<PlatformTrack>;
37
+ platformUserAlbum: PlatformUserAlbum;
38
+ getPlatformUserAlbum: Sequelize.BelongsToGetAssociationMixin<PlatformUserAlbum>;
39
+ setPlatformUserAlbum: Sequelize.BelongsToSetAssociationMixin<PlatformUserAlbum, PlatformUserAlbumId>;
40
+ createPlatformUserAlbum: Sequelize.BelongsToCreateAssociationMixin<PlatformUserAlbum>;
41
+ static initModel(sequelize: Sequelize.Sequelize): typeof PlatformUserAlbumTrack;
42
+ }
@@ -0,0 +1,121 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.PlatformUserAlbumTrack = void 0;
27
+ const Sequelize = __importStar(require("sequelize"));
28
+ const sequelize_1 = require("sequelize");
29
+ class PlatformUserAlbumTrack extends sequelize_1.Model {
30
+ static initModel(sequelize) {
31
+ return PlatformUserAlbumTrack.init({
32
+ id: {
33
+ type: sequelize_1.DataTypes.UUID,
34
+ allowNull: false,
35
+ defaultValue: sequelize_1.DataTypes.UUIDV4,
36
+ primaryKey: true
37
+ },
38
+ platformUserAlbumId: {
39
+ type: sequelize_1.DataTypes.UUID,
40
+ allowNull: false,
41
+ references: {
42
+ model: 'platform_user_album',
43
+ key: 'id'
44
+ },
45
+ unique: "platform_user_album_track_platform_user_album_id_platform_track",
46
+ field: 'platform_user_album_id'
47
+ },
48
+ platformId: {
49
+ type: sequelize_1.DataTypes.SMALLINT,
50
+ allowNull: false,
51
+ references: {
52
+ model: 'platform',
53
+ key: 'id'
54
+ },
55
+ field: 'platform_id'
56
+ },
57
+ externalUserAlbumTrackId: {
58
+ type: sequelize_1.DataTypes.STRING(255),
59
+ allowNull: false,
60
+ field: 'external_user_album_track_id'
61
+ },
62
+ platformTrackId: {
63
+ type: sequelize_1.DataTypes.UUID,
64
+ allowNull: false,
65
+ references: {
66
+ model: 'platform_track',
67
+ key: 'id'
68
+ },
69
+ unique: "platform_user_album_track_platform_user_album_id_platform_track",
70
+ field: 'platform_track_id'
71
+ },
72
+ createdAt: {
73
+ type: sequelize_1.DataTypes.DATE,
74
+ allowNull: false,
75
+ defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
76
+ field: 'created_at'
77
+ },
78
+ updatedAt: {
79
+ type: sequelize_1.DataTypes.DATE,
80
+ allowNull: false,
81
+ defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
82
+ field: 'updated_at'
83
+ },
84
+ stateId: {
85
+ type: sequelize_1.DataTypes.SMALLINT,
86
+ allowNull: false,
87
+ defaultValue: 0,
88
+ field: 'state_id'
89
+ }
90
+ }, {
91
+ sequelize,
92
+ tableName: 'platform_user_album_track',
93
+ schema: 'eb',
94
+ timestamps: false,
95
+ indexes: [
96
+ {
97
+ name: "platform_user_album_track_pkey",
98
+ unique: true,
99
+ fields: [
100
+ { name: "id" },
101
+ ]
102
+ },
103
+ {
104
+ name: "platform_user_album_track_platform_user_album_id_index",
105
+ fields: [
106
+ { name: "platform_user_album_id" },
107
+ ]
108
+ },
109
+ {
110
+ name: "platform_user_album_track_platform_user_album_id_platform_track",
111
+ unique: true,
112
+ fields: [
113
+ { name: "platform_user_album_id" },
114
+ { name: "platform_track_id" },
115
+ ]
116
+ },
117
+ ]
118
+ });
119
+ }
120
+ }
121
+ exports.PlatformUserAlbumTrack = PlatformUserAlbumTrack;
@@ -0,0 +1,62 @@
1
+ import * as Sequelize from 'sequelize';
2
+ import { Model, Optional } from 'sequelize';
3
+ import type { AppUser, AppUserId } from './AppUser';
4
+ import type { Platform, PlatformId } from './Platform';
5
+ import type { PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId } from './PlatformUserPlaylistTrack';
6
+ import type { State, StateId } from './State';
7
+ export interface PlatformUserPlaylistAttributes {
8
+ id: string;
9
+ appUserId: string;
10
+ platformId: number;
11
+ externalPlaylistId: string;
12
+ name: string;
13
+ description?: string;
14
+ public?: boolean;
15
+ snapshotId: string;
16
+ collaborative: boolean;
17
+ createDate: Date;
18
+ updateDate: Date;
19
+ stateId: number;
20
+ }
21
+ export type PlatformUserPlaylistPk = "id";
22
+ export type PlatformUserPlaylistId = PlatformUserPlaylist[PlatformUserPlaylistPk];
23
+ export type PlatformUserPlaylistOptionalAttributes = "id" | "description" | "public" | "createDate" | "updateDate" | "stateId";
24
+ export type PlatformUserPlaylistCreationAttributes = Optional<PlatformUserPlaylistAttributes, PlatformUserPlaylistOptionalAttributes>;
25
+ export declare class PlatformUserPlaylist extends Model<PlatformUserPlaylistAttributes, PlatformUserPlaylistCreationAttributes> implements PlatformUserPlaylistAttributes {
26
+ id: string;
27
+ appUserId: string;
28
+ platformId: number;
29
+ externalPlaylistId: string;
30
+ name: string;
31
+ description?: string;
32
+ public?: boolean;
33
+ snapshotId: string;
34
+ collaborative: boolean;
35
+ createDate: Date;
36
+ updateDate: Date;
37
+ stateId: number;
38
+ appUser: AppUser;
39
+ getAppUser: Sequelize.BelongsToGetAssociationMixin<AppUser>;
40
+ setAppUser: Sequelize.BelongsToSetAssociationMixin<AppUser, AppUserId>;
41
+ createAppUser: Sequelize.BelongsToCreateAssociationMixin<AppUser>;
42
+ platform: Platform;
43
+ getPlatform: Sequelize.BelongsToGetAssociationMixin<Platform>;
44
+ setPlatform: Sequelize.BelongsToSetAssociationMixin<Platform, PlatformId>;
45
+ createPlatform: Sequelize.BelongsToCreateAssociationMixin<Platform>;
46
+ platformUserPlaylistTracks: PlatformUserPlaylistTrack[];
47
+ getPlatformUserPlaylistTracks: Sequelize.HasManyGetAssociationsMixin<PlatformUserPlaylistTrack>;
48
+ setPlatformUserPlaylistTracks: Sequelize.HasManySetAssociationsMixin<PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId>;
49
+ addPlatformUserPlaylistTrack: Sequelize.HasManyAddAssociationMixin<PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId>;
50
+ addPlatformUserPlaylistTracks: Sequelize.HasManyAddAssociationsMixin<PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId>;
51
+ createPlatformUserPlaylistTrack: Sequelize.HasManyCreateAssociationMixin<PlatformUserPlaylistTrack>;
52
+ removePlatformUserPlaylistTrack: Sequelize.HasManyRemoveAssociationMixin<PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId>;
53
+ removePlatformUserPlaylistTracks: Sequelize.HasManyRemoveAssociationsMixin<PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId>;
54
+ hasPlatformUserPlaylistTrack: Sequelize.HasManyHasAssociationMixin<PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId>;
55
+ hasPlatformUserPlaylistTracks: Sequelize.HasManyHasAssociationsMixin<PlatformUserPlaylistTrack, PlatformUserPlaylistTrackId>;
56
+ countPlatformUserPlaylistTracks: Sequelize.HasManyCountAssociationsMixin;
57
+ state: State;
58
+ getState: Sequelize.BelongsToGetAssociationMixin<State>;
59
+ setState: Sequelize.BelongsToSetAssociationMixin<State, StateId>;
60
+ createState: Sequelize.BelongsToCreateAssociationMixin<State>;
61
+ static initModel(sequelize: Sequelize.Sequelize): typeof PlatformUserPlaylist;
62
+ }
@@ -0,0 +1,135 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.PlatformUserPlaylist = void 0;
27
+ const Sequelize = __importStar(require("sequelize"));
28
+ const sequelize_1 = require("sequelize");
29
+ class PlatformUserPlaylist extends sequelize_1.Model {
30
+ static initModel(sequelize) {
31
+ return PlatformUserPlaylist.init({
32
+ id: {
33
+ type: sequelize_1.DataTypes.UUID,
34
+ allowNull: false,
35
+ defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
36
+ primaryKey: true
37
+ },
38
+ appUserId: {
39
+ type: sequelize_1.DataTypes.UUID,
40
+ allowNull: false,
41
+ references: {
42
+ model: 'app_user',
43
+ key: 'id'
44
+ },
45
+ unique: "uk_app_user_platform_playlist",
46
+ field: 'app_user_id'
47
+ },
48
+ platformId: {
49
+ type: sequelize_1.DataTypes.SMALLINT,
50
+ allowNull: false,
51
+ references: {
52
+ model: 'platform',
53
+ key: 'id'
54
+ },
55
+ unique: "uk_app_user_platform_playlist",
56
+ field: 'platform_id'
57
+ },
58
+ externalPlaylistId: {
59
+ type: sequelize_1.DataTypes.TEXT,
60
+ allowNull: false,
61
+ unique: "uk_app_user_platform_playlist",
62
+ field: 'external_playlist_id'
63
+ },
64
+ name: {
65
+ type: sequelize_1.DataTypes.TEXT,
66
+ allowNull: false
67
+ },
68
+ description: {
69
+ type: sequelize_1.DataTypes.TEXT,
70
+ allowNull: true
71
+ },
72
+ public: {
73
+ type: sequelize_1.DataTypes.BOOLEAN,
74
+ allowNull: true,
75
+ defaultValue: false
76
+ },
77
+ snapshotId: {
78
+ type: sequelize_1.DataTypes.TEXT,
79
+ allowNull: false,
80
+ field: 'snapshot_id'
81
+ },
82
+ collaborative: {
83
+ type: sequelize_1.DataTypes.BOOLEAN,
84
+ allowNull: false,
85
+ defaultValue: false
86
+ },
87
+ createDate: {
88
+ type: sequelize_1.DataTypes.DATE,
89
+ allowNull: false,
90
+ defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
91
+ field: 'create_date'
92
+ },
93
+ updateDate: {
94
+ type: sequelize_1.DataTypes.DATE,
95
+ allowNull: false,
96
+ defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
97
+ field: 'update_date'
98
+ },
99
+ stateId: {
100
+ type: sequelize_1.DataTypes.SMALLINT,
101
+ allowNull: false,
102
+ defaultValue: 0,
103
+ references: {
104
+ model: 'state',
105
+ key: 'id'
106
+ },
107
+ field: 'state_id'
108
+ }
109
+ }, {
110
+ sequelize,
111
+ tableName: 'platform_user_playlist',
112
+ schema: 'eb',
113
+ timestamps: false,
114
+ indexes: [
115
+ {
116
+ name: "playlist_pkey",
117
+ unique: true,
118
+ fields: [
119
+ { name: "id" },
120
+ ]
121
+ },
122
+ {
123
+ name: "uk_app_user_platform_playlist",
124
+ unique: true,
125
+ fields: [
126
+ { name: "app_user_id" },
127
+ { name: "platform_id" },
128
+ { name: "external_playlist_id" },
129
+ ]
130
+ },
131
+ ]
132
+ });
133
+ }
134
+ }
135
+ exports.PlatformUserPlaylist = PlatformUserPlaylist;
@@ -0,0 +1,48 @@
1
+ import * as Sequelize from 'sequelize';
2
+ import { Model, Optional } from 'sequelize';
3
+ import type { PlatformTrack, PlatformTrackId } from './PlatformTrack';
4
+ import type { PlatformUserPlaylist, PlatformUserPlaylistId } from './PlatformUserPlaylist';
5
+ import type { State, StateId } from './State';
6
+ export interface PlatformUserPlaylistTrackAttributes {
7
+ id: string;
8
+ platformTrackId: string;
9
+ platformUserPlaylistId: string;
10
+ trackPosition: number;
11
+ addedDate?: Date;
12
+ addedByPlatformUserId?: string;
13
+ isLocal: boolean;
14
+ createDate: Date;
15
+ updateDate: Date;
16
+ stateId: number;
17
+ externalPlaylistTrackId: string;
18
+ }
19
+ export type PlatformUserPlaylistTrackPk = "id";
20
+ export type PlatformUserPlaylistTrackId = PlatformUserPlaylistTrack[PlatformUserPlaylistTrackPk];
21
+ export type PlatformUserPlaylistTrackOptionalAttributes = "id" | "trackPosition" | "addedDate" | "addedByPlatformUserId" | "createDate" | "updateDate" | "stateId";
22
+ export type PlatformUserPlaylistTrackCreationAttributes = Optional<PlatformUserPlaylistTrackAttributes, PlatformUserPlaylistTrackOptionalAttributes>;
23
+ export declare class PlatformUserPlaylistTrack extends Model<PlatformUserPlaylistTrackAttributes, PlatformUserPlaylistTrackCreationAttributes> implements PlatformUserPlaylistTrackAttributes {
24
+ id: string;
25
+ platformTrackId: string;
26
+ platformUserPlaylistId: string;
27
+ trackPosition: number;
28
+ addedDate?: Date;
29
+ addedByPlatformUserId?: string;
30
+ isLocal: boolean;
31
+ createDate: Date;
32
+ updateDate: Date;
33
+ stateId: number;
34
+ externalPlaylistTrackId: string;
35
+ platformTrack: PlatformTrack;
36
+ getPlatformTrack: Sequelize.BelongsToGetAssociationMixin<PlatformTrack>;
37
+ setPlatformTrack: Sequelize.BelongsToSetAssociationMixin<PlatformTrack, PlatformTrackId>;
38
+ createPlatformTrack: Sequelize.BelongsToCreateAssociationMixin<PlatformTrack>;
39
+ platformUserPlaylist: PlatformUserPlaylist;
40
+ getPlatformUserPlaylist: Sequelize.BelongsToGetAssociationMixin<PlatformUserPlaylist>;
41
+ setPlatformUserPlaylist: Sequelize.BelongsToSetAssociationMixin<PlatformUserPlaylist, PlatformUserPlaylistId>;
42
+ createPlatformUserPlaylist: Sequelize.BelongsToCreateAssociationMixin<PlatformUserPlaylist>;
43
+ state: State;
44
+ getState: Sequelize.BelongsToGetAssociationMixin<State>;
45
+ setState: Sequelize.BelongsToSetAssociationMixin<State, StateId>;
46
+ createState: Sequelize.BelongsToCreateAssociationMixin<State>;
47
+ static initModel(sequelize: Sequelize.Sequelize): typeof PlatformUserPlaylistTrack;
48
+ }