@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,117 @@
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.MetricsEvent = void 0;
27
+ const Sequelize = __importStar(require("sequelize"));
28
+ const sequelize_1 = require("sequelize");
29
+ class MetricsEvent extends sequelize_1.Model {
30
+ static initModel(sequelize) {
31
+ return MetricsEvent.init({
32
+ eventType: {
33
+ type: sequelize_1.DataTypes.TEXT,
34
+ allowNull: false,
35
+ field: 'event_type'
36
+ },
37
+ appUserId: {
38
+ type: sequelize_1.DataTypes.UUID,
39
+ allowNull: false,
40
+ field: 'app_user_id'
41
+ },
42
+ sessionId: {
43
+ type: sequelize_1.DataTypes.TEXT,
44
+ allowNull: false,
45
+ field: 'session_id'
46
+ },
47
+ devicePlatformId: {
48
+ type: sequelize_1.DataTypes.SMALLINT,
49
+ allowNull: false,
50
+ field: 'device_platform_id'
51
+ },
52
+ createdAt: {
53
+ type: sequelize_1.DataTypes.DATE,
54
+ allowNull: false,
55
+ defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
56
+ field: 'created_at'
57
+ },
58
+ meta: {
59
+ type: sequelize_1.DataTypes.JSONB,
60
+ allowNull: true
61
+ },
62
+ objectId: {
63
+ type: sequelize_1.DataTypes.UUID,
64
+ allowNull: true,
65
+ field: 'object_id'
66
+ }
67
+ }, {
68
+ sequelize,
69
+ tableName: 'metrics_event',
70
+ schema: 'eb',
71
+ timestamps: false,
72
+ indexes: [
73
+ {
74
+ name: "metrics_created_idx",
75
+ fields: [
76
+ { name: "created_at" },
77
+ ]
78
+ },
79
+ {
80
+ name: "metrics_dev_plat_idx",
81
+ fields: [
82
+ { name: "device_platform_id" },
83
+ ]
84
+ },
85
+ {
86
+ name: "metrics_object_idx",
87
+ fields: [
88
+ { name: "object_id" },
89
+ ]
90
+ },
91
+ {
92
+ name: "metrics_session_idx",
93
+ fields: [
94
+ { name: "session_id" },
95
+ ]
96
+ },
97
+ {
98
+ name: "metrics_status_idx",
99
+ fields: []
100
+ },
101
+ {
102
+ name: "metrics_type_idx",
103
+ fields: [
104
+ { name: "event_type" },
105
+ ]
106
+ },
107
+ {
108
+ name: "metrics_user_idx",
109
+ fields: [
110
+ { name: "app_user_id" },
111
+ ]
112
+ },
113
+ ]
114
+ });
115
+ }
116
+ }
117
+ exports.MetricsEvent = MetricsEvent;
@@ -0,0 +1,21 @@
1
+ import * as Sequelize from 'sequelize';
2
+ import { Model, Optional } from 'sequelize';
3
+ export interface NewsSiteAttributes {
4
+ id: number;
5
+ name: string;
6
+ domain?: string;
7
+ scrapingBaseUrl: string;
8
+ active?: boolean;
9
+ }
10
+ export type NewsSitePk = "id";
11
+ export type NewsSiteId = NewsSite[NewsSitePk];
12
+ export type NewsSiteOptionalAttributes = "id" | "domain" | "active";
13
+ export type NewsSiteCreationAttributes = Optional<NewsSiteAttributes, NewsSiteOptionalAttributes>;
14
+ export declare class NewsSite extends Model<NewsSiteAttributes, NewsSiteCreationAttributes> implements NewsSiteAttributes {
15
+ id: number;
16
+ name: string;
17
+ domain?: string;
18
+ scrapingBaseUrl: string;
19
+ active?: boolean;
20
+ static initModel(sequelize: Sequelize.Sequelize): typeof NewsSite;
21
+ }
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NewsSite = void 0;
4
+ const sequelize_1 = require("sequelize");
5
+ class NewsSite extends sequelize_1.Model {
6
+ static initModel(sequelize) {
7
+ return NewsSite.init({
8
+ id: {
9
+ autoIncrement: true,
10
+ type: sequelize_1.DataTypes.INTEGER,
11
+ allowNull: false,
12
+ primaryKey: true
13
+ },
14
+ name: {
15
+ type: sequelize_1.DataTypes.STRING(255),
16
+ allowNull: false,
17
+ unique: "news_site_name_unique"
18
+ },
19
+ domain: {
20
+ type: sequelize_1.DataTypes.STRING(255),
21
+ allowNull: true
22
+ },
23
+ scrapingBaseUrl: {
24
+ type: sequelize_1.DataTypes.STRING(255),
25
+ allowNull: false,
26
+ field: 'scraping_base_url'
27
+ },
28
+ active: {
29
+ type: sequelize_1.DataTypes.BOOLEAN,
30
+ allowNull: true,
31
+ defaultValue: false
32
+ }
33
+ }, {
34
+ sequelize,
35
+ tableName: 'news_site',
36
+ schema: 'eb',
37
+ timestamps: false,
38
+ indexes: [
39
+ {
40
+ name: "news_site_name_unique",
41
+ unique: true,
42
+ fields: [
43
+ { name: "name" },
44
+ ]
45
+ },
46
+ {
47
+ name: "news_site_pkey",
48
+ unique: true,
49
+ fields: [
50
+ { name: "id" },
51
+ ]
52
+ },
53
+ ]
54
+ });
55
+ }
56
+ }
57
+ exports.NewsSite = NewsSite;
@@ -0,0 +1,26 @@
1
+ import * as Sequelize from 'sequelize';
2
+ import { Model } from 'sequelize';
3
+ import type { JukeboxUser, JukeboxUserId } from './JukeboxUser';
4
+ export interface PauseStatusTypeAttributes {
5
+ id: number;
6
+ description: string;
7
+ }
8
+ export type PauseStatusTypePk = "id";
9
+ export type PauseStatusTypeId = PauseStatusType[PauseStatusTypePk];
10
+ export type PauseStatusTypeCreationAttributes = PauseStatusTypeAttributes;
11
+ export declare class PauseStatusType extends Model<PauseStatusTypeAttributes, PauseStatusTypeCreationAttributes> implements PauseStatusTypeAttributes {
12
+ id: number;
13
+ description: string;
14
+ jukeboxUsers: JukeboxUser[];
15
+ getJukeboxUsers: Sequelize.HasManyGetAssociationsMixin<JukeboxUser>;
16
+ setJukeboxUsers: Sequelize.HasManySetAssociationsMixin<JukeboxUser, JukeboxUserId>;
17
+ addJukeboxUser: Sequelize.HasManyAddAssociationMixin<JukeboxUser, JukeboxUserId>;
18
+ addJukeboxUsers: Sequelize.HasManyAddAssociationsMixin<JukeboxUser, JukeboxUserId>;
19
+ createJukeboxUser: Sequelize.HasManyCreateAssociationMixin<JukeboxUser>;
20
+ removeJukeboxUser: Sequelize.HasManyRemoveAssociationMixin<JukeboxUser, JukeboxUserId>;
21
+ removeJukeboxUsers: Sequelize.HasManyRemoveAssociationsMixin<JukeboxUser, JukeboxUserId>;
22
+ hasJukeboxUser: Sequelize.HasManyHasAssociationMixin<JukeboxUser, JukeboxUserId>;
23
+ hasJukeboxUsers: Sequelize.HasManyHasAssociationsMixin<JukeboxUser, JukeboxUserId>;
24
+ countJukeboxUsers: Sequelize.HasManyCountAssociationsMixin;
25
+ static initModel(sequelize: Sequelize.Sequelize): typeof PauseStatusType;
26
+ }
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PauseStatusType = void 0;
4
+ const sequelize_1 = require("sequelize");
5
+ class PauseStatusType extends sequelize_1.Model {
6
+ static initModel(sequelize) {
7
+ return PauseStatusType.init({
8
+ id: {
9
+ type: sequelize_1.DataTypes.SMALLINT,
10
+ allowNull: false,
11
+ primaryKey: true
12
+ },
13
+ description: {
14
+ type: sequelize_1.DataTypes.STRING(255),
15
+ allowNull: false
16
+ }
17
+ }, {
18
+ sequelize,
19
+ tableName: 'pause_status_type',
20
+ schema: 'eb',
21
+ timestamps: false,
22
+ indexes: [
23
+ {
24
+ name: "pause_status_type_pkey",
25
+ unique: true,
26
+ fields: [
27
+ { name: "id" },
28
+ ]
29
+ },
30
+ ]
31
+ });
32
+ }
33
+ }
34
+ exports.PauseStatusType = PauseStatusType;
@@ -0,0 +1,127 @@
1
+ import * as Sequelize from 'sequelize';
2
+ import { Model, Optional } from 'sequelize';
3
+ import type { AppUserPlatformRelation, AppUserPlatformRelationId } from './AppUserPlatformRelation';
4
+ import type { PlatformAlbum, PlatformAlbumId } from './PlatformAlbum';
5
+ import type { PlatformArtist, PlatformArtistId } from './PlatformArtist';
6
+ import type { PlatformGenre, PlatformGenreId } from './PlatformGenre';
7
+ import type { PlatformTrack, PlatformTrackId } from './PlatformTrack';
8
+ import type { PlatformUserAlbum, PlatformUserAlbumId } from './PlatformUserAlbum';
9
+ import type { PlatformUserAlbumTrack, PlatformUserAlbumTrackId } from './PlatformUserAlbumTrack';
10
+ import type { PlatformUserPlaylist, PlatformUserPlaylistId } from './PlatformUserPlaylist';
11
+ import type { UnmatchedArtist, UnmatchedArtistId } from './UnmatchedArtist';
12
+ export interface PlatformAttributes {
13
+ id: number;
14
+ name: string;
15
+ createDate: Date;
16
+ updateDate: Date;
17
+ }
18
+ export type PlatformPk = "id";
19
+ export type PlatformId = Platform[PlatformPk];
20
+ export type PlatformOptionalAttributes = "createDate" | "updateDate";
21
+ export type PlatformCreationAttributes = Optional<PlatformAttributes, PlatformOptionalAttributes>;
22
+ export declare class Platform extends Model<PlatformAttributes, PlatformCreationAttributes> implements PlatformAttributes {
23
+ id: number;
24
+ name: string;
25
+ createDate: Date;
26
+ updateDate: Date;
27
+ appUserPlatformRelations: AppUserPlatformRelation[];
28
+ getAppUserPlatformRelations: Sequelize.HasManyGetAssociationsMixin<AppUserPlatformRelation>;
29
+ setAppUserPlatformRelations: Sequelize.HasManySetAssociationsMixin<AppUserPlatformRelation, AppUserPlatformRelationId>;
30
+ addAppUserPlatformRelation: Sequelize.HasManyAddAssociationMixin<AppUserPlatformRelation, AppUserPlatformRelationId>;
31
+ addAppUserPlatformRelations: Sequelize.HasManyAddAssociationsMixin<AppUserPlatformRelation, AppUserPlatformRelationId>;
32
+ createAppUserPlatformRelation: Sequelize.HasManyCreateAssociationMixin<AppUserPlatformRelation>;
33
+ removeAppUserPlatformRelation: Sequelize.HasManyRemoveAssociationMixin<AppUserPlatformRelation, AppUserPlatformRelationId>;
34
+ removeAppUserPlatformRelations: Sequelize.HasManyRemoveAssociationsMixin<AppUserPlatformRelation, AppUserPlatformRelationId>;
35
+ hasAppUserPlatformRelation: Sequelize.HasManyHasAssociationMixin<AppUserPlatformRelation, AppUserPlatformRelationId>;
36
+ hasAppUserPlatformRelations: Sequelize.HasManyHasAssociationsMixin<AppUserPlatformRelation, AppUserPlatformRelationId>;
37
+ countAppUserPlatformRelations: Sequelize.HasManyCountAssociationsMixin;
38
+ platformAlbums: PlatformAlbum[];
39
+ getPlatformAlbums: Sequelize.HasManyGetAssociationsMixin<PlatformAlbum>;
40
+ setPlatformAlbums: Sequelize.HasManySetAssociationsMixin<PlatformAlbum, PlatformAlbumId>;
41
+ addPlatformAlbum: Sequelize.HasManyAddAssociationMixin<PlatformAlbum, PlatformAlbumId>;
42
+ addPlatformAlbums: Sequelize.HasManyAddAssociationsMixin<PlatformAlbum, PlatformAlbumId>;
43
+ createPlatformAlbum: Sequelize.HasManyCreateAssociationMixin<PlatformAlbum>;
44
+ removePlatformAlbum: Sequelize.HasManyRemoveAssociationMixin<PlatformAlbum, PlatformAlbumId>;
45
+ removePlatformAlbums: Sequelize.HasManyRemoveAssociationsMixin<PlatformAlbum, PlatformAlbumId>;
46
+ hasPlatformAlbum: Sequelize.HasManyHasAssociationMixin<PlatformAlbum, PlatformAlbumId>;
47
+ hasPlatformAlbums: Sequelize.HasManyHasAssociationsMixin<PlatformAlbum, PlatformAlbumId>;
48
+ countPlatformAlbums: Sequelize.HasManyCountAssociationsMixin;
49
+ platformArtists: PlatformArtist[];
50
+ getPlatformArtists: Sequelize.HasManyGetAssociationsMixin<PlatformArtist>;
51
+ setPlatformArtists: Sequelize.HasManySetAssociationsMixin<PlatformArtist, PlatformArtistId>;
52
+ addPlatformArtist: Sequelize.HasManyAddAssociationMixin<PlatformArtist, PlatformArtistId>;
53
+ addPlatformArtists: Sequelize.HasManyAddAssociationsMixin<PlatformArtist, PlatformArtistId>;
54
+ createPlatformArtist: Sequelize.HasManyCreateAssociationMixin<PlatformArtist>;
55
+ removePlatformArtist: Sequelize.HasManyRemoveAssociationMixin<PlatformArtist, PlatformArtistId>;
56
+ removePlatformArtists: Sequelize.HasManyRemoveAssociationsMixin<PlatformArtist, PlatformArtistId>;
57
+ hasPlatformArtist: Sequelize.HasManyHasAssociationMixin<PlatformArtist, PlatformArtistId>;
58
+ hasPlatformArtists: Sequelize.HasManyHasAssociationsMixin<PlatformArtist, PlatformArtistId>;
59
+ countPlatformArtists: Sequelize.HasManyCountAssociationsMixin;
60
+ platformGenres: PlatformGenre[];
61
+ getPlatformGenres: Sequelize.HasManyGetAssociationsMixin<PlatformGenre>;
62
+ setPlatformGenres: Sequelize.HasManySetAssociationsMixin<PlatformGenre, PlatformGenreId>;
63
+ addPlatformGenre: Sequelize.HasManyAddAssociationMixin<PlatformGenre, PlatformGenreId>;
64
+ addPlatformGenres: Sequelize.HasManyAddAssociationsMixin<PlatformGenre, PlatformGenreId>;
65
+ createPlatformGenre: Sequelize.HasManyCreateAssociationMixin<PlatformGenre>;
66
+ removePlatformGenre: Sequelize.HasManyRemoveAssociationMixin<PlatformGenre, PlatformGenreId>;
67
+ removePlatformGenres: Sequelize.HasManyRemoveAssociationsMixin<PlatformGenre, PlatformGenreId>;
68
+ hasPlatformGenre: Sequelize.HasManyHasAssociationMixin<PlatformGenre, PlatformGenreId>;
69
+ hasPlatformGenres: Sequelize.HasManyHasAssociationsMixin<PlatformGenre, PlatformGenreId>;
70
+ countPlatformGenres: Sequelize.HasManyCountAssociationsMixin;
71
+ platformTracks: PlatformTrack[];
72
+ getPlatformTracks: Sequelize.HasManyGetAssociationsMixin<PlatformTrack>;
73
+ setPlatformTracks: Sequelize.HasManySetAssociationsMixin<PlatformTrack, PlatformTrackId>;
74
+ addPlatformTrack: Sequelize.HasManyAddAssociationMixin<PlatformTrack, PlatformTrackId>;
75
+ addPlatformTracks: Sequelize.HasManyAddAssociationsMixin<PlatformTrack, PlatformTrackId>;
76
+ createPlatformTrack: Sequelize.HasManyCreateAssociationMixin<PlatformTrack>;
77
+ removePlatformTrack: Sequelize.HasManyRemoveAssociationMixin<PlatformTrack, PlatformTrackId>;
78
+ removePlatformTracks: Sequelize.HasManyRemoveAssociationsMixin<PlatformTrack, PlatformTrackId>;
79
+ hasPlatformTrack: Sequelize.HasManyHasAssociationMixin<PlatformTrack, PlatformTrackId>;
80
+ hasPlatformTracks: Sequelize.HasManyHasAssociationsMixin<PlatformTrack, PlatformTrackId>;
81
+ countPlatformTracks: Sequelize.HasManyCountAssociationsMixin;
82
+ platformUserAlbums: PlatformUserAlbum[];
83
+ getPlatformUserAlbums: Sequelize.HasManyGetAssociationsMixin<PlatformUserAlbum>;
84
+ setPlatformUserAlbums: Sequelize.HasManySetAssociationsMixin<PlatformUserAlbum, PlatformUserAlbumId>;
85
+ addPlatformUserAlbum: Sequelize.HasManyAddAssociationMixin<PlatformUserAlbum, PlatformUserAlbumId>;
86
+ addPlatformUserAlbums: Sequelize.HasManyAddAssociationsMixin<PlatformUserAlbum, PlatformUserAlbumId>;
87
+ createPlatformUserAlbum: Sequelize.HasManyCreateAssociationMixin<PlatformUserAlbum>;
88
+ removePlatformUserAlbum: Sequelize.HasManyRemoveAssociationMixin<PlatformUserAlbum, PlatformUserAlbumId>;
89
+ removePlatformUserAlbums: Sequelize.HasManyRemoveAssociationsMixin<PlatformUserAlbum, PlatformUserAlbumId>;
90
+ hasPlatformUserAlbum: Sequelize.HasManyHasAssociationMixin<PlatformUserAlbum, PlatformUserAlbumId>;
91
+ hasPlatformUserAlbums: Sequelize.HasManyHasAssociationsMixin<PlatformUserAlbum, PlatformUserAlbumId>;
92
+ countPlatformUserAlbums: Sequelize.HasManyCountAssociationsMixin;
93
+ platformUserAlbumTracks: PlatformUserAlbumTrack[];
94
+ getPlatformUserAlbumTracks: Sequelize.HasManyGetAssociationsMixin<PlatformUserAlbumTrack>;
95
+ setPlatformUserAlbumTracks: Sequelize.HasManySetAssociationsMixin<PlatformUserAlbumTrack, PlatformUserAlbumTrackId>;
96
+ addPlatformUserAlbumTrack: Sequelize.HasManyAddAssociationMixin<PlatformUserAlbumTrack, PlatformUserAlbumTrackId>;
97
+ addPlatformUserAlbumTracks: Sequelize.HasManyAddAssociationsMixin<PlatformUserAlbumTrack, PlatformUserAlbumTrackId>;
98
+ createPlatformUserAlbumTrack: Sequelize.HasManyCreateAssociationMixin<PlatformUserAlbumTrack>;
99
+ removePlatformUserAlbumTrack: Sequelize.HasManyRemoveAssociationMixin<PlatformUserAlbumTrack, PlatformUserAlbumTrackId>;
100
+ removePlatformUserAlbumTracks: Sequelize.HasManyRemoveAssociationsMixin<PlatformUserAlbumTrack, PlatformUserAlbumTrackId>;
101
+ hasPlatformUserAlbumTrack: Sequelize.HasManyHasAssociationMixin<PlatformUserAlbumTrack, PlatformUserAlbumTrackId>;
102
+ hasPlatformUserAlbumTracks: Sequelize.HasManyHasAssociationsMixin<PlatformUserAlbumTrack, PlatformUserAlbumTrackId>;
103
+ countPlatformUserAlbumTracks: Sequelize.HasManyCountAssociationsMixin;
104
+ platformUserPlaylists: PlatformUserPlaylist[];
105
+ getPlatformUserPlaylists: Sequelize.HasManyGetAssociationsMixin<PlatformUserPlaylist>;
106
+ setPlatformUserPlaylists: Sequelize.HasManySetAssociationsMixin<PlatformUserPlaylist, PlatformUserPlaylistId>;
107
+ addPlatformUserPlaylist: Sequelize.HasManyAddAssociationMixin<PlatformUserPlaylist, PlatformUserPlaylistId>;
108
+ addPlatformUserPlaylists: Sequelize.HasManyAddAssociationsMixin<PlatformUserPlaylist, PlatformUserPlaylistId>;
109
+ createPlatformUserPlaylist: Sequelize.HasManyCreateAssociationMixin<PlatformUserPlaylist>;
110
+ removePlatformUserPlaylist: Sequelize.HasManyRemoveAssociationMixin<PlatformUserPlaylist, PlatformUserPlaylistId>;
111
+ removePlatformUserPlaylists: Sequelize.HasManyRemoveAssociationsMixin<PlatformUserPlaylist, PlatformUserPlaylistId>;
112
+ hasPlatformUserPlaylist: Sequelize.HasManyHasAssociationMixin<PlatformUserPlaylist, PlatformUserPlaylistId>;
113
+ hasPlatformUserPlaylists: Sequelize.HasManyHasAssociationsMixin<PlatformUserPlaylist, PlatformUserPlaylistId>;
114
+ countPlatformUserPlaylists: Sequelize.HasManyCountAssociationsMixin;
115
+ unmatchedArtists: UnmatchedArtist[];
116
+ getUnmatchedArtists: Sequelize.HasManyGetAssociationsMixin<UnmatchedArtist>;
117
+ setUnmatchedArtists: Sequelize.HasManySetAssociationsMixin<UnmatchedArtist, UnmatchedArtistId>;
118
+ addUnmatchedArtist: Sequelize.HasManyAddAssociationMixin<UnmatchedArtist, UnmatchedArtistId>;
119
+ addUnmatchedArtists: Sequelize.HasManyAddAssociationsMixin<UnmatchedArtist, UnmatchedArtistId>;
120
+ createUnmatchedArtist: Sequelize.HasManyCreateAssociationMixin<UnmatchedArtist>;
121
+ removeUnmatchedArtist: Sequelize.HasManyRemoveAssociationMixin<UnmatchedArtist, UnmatchedArtistId>;
122
+ removeUnmatchedArtists: Sequelize.HasManyRemoveAssociationsMixin<UnmatchedArtist, UnmatchedArtistId>;
123
+ hasUnmatchedArtist: Sequelize.HasManyHasAssociationMixin<UnmatchedArtist, UnmatchedArtistId>;
124
+ hasUnmatchedArtists: Sequelize.HasManyHasAssociationsMixin<UnmatchedArtist, UnmatchedArtistId>;
125
+ countUnmatchedArtists: Sequelize.HasManyCountAssociationsMixin;
126
+ static initModel(sequelize: Sequelize.Sequelize): typeof Platform;
127
+ }
@@ -0,0 +1,80 @@
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.Platform = void 0;
27
+ const Sequelize = __importStar(require("sequelize"));
28
+ const sequelize_1 = require("sequelize");
29
+ class Platform extends sequelize_1.Model {
30
+ static initModel(sequelize) {
31
+ return Platform.init({
32
+ id: {
33
+ autoIncrement: true,
34
+ autoIncrementIdentity: true,
35
+ type: sequelize_1.DataTypes.SMALLINT,
36
+ allowNull: false,
37
+ primaryKey: true
38
+ },
39
+ name: {
40
+ type: sequelize_1.DataTypes.TEXT,
41
+ allowNull: false,
42
+ unique: "uk_name"
43
+ },
44
+ createDate: {
45
+ type: sequelize_1.DataTypes.DATE,
46
+ allowNull: false,
47
+ defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
48
+ field: 'create_date'
49
+ },
50
+ updateDate: {
51
+ type: sequelize_1.DataTypes.DATE,
52
+ allowNull: false,
53
+ defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
54
+ field: 'update_date'
55
+ }
56
+ }, {
57
+ sequelize,
58
+ tableName: 'platform',
59
+ schema: 'eb',
60
+ timestamps: false,
61
+ indexes: [
62
+ {
63
+ name: "external_source_pkey",
64
+ unique: true,
65
+ fields: [
66
+ { name: "id" },
67
+ ]
68
+ },
69
+ {
70
+ name: "uk_name",
71
+ unique: true,
72
+ fields: [
73
+ { name: "name" },
74
+ ]
75
+ },
76
+ ]
77
+ });
78
+ }
79
+ }
80
+ exports.Platform = Platform;