@earbug/db-models 0.0.7 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/dist/AppUser.d.ts +5 -5
  2. package/dist/AppUser.js +13 -13
  3. package/dist/AppUserDevice.d.ts +4 -4
  4. package/dist/AppUserDevice.js +8 -8
  5. package/dist/AppUserFollowRelation.d.ts +3 -3
  6. package/dist/AppUserFollowRelation.js +6 -6
  7. package/dist/AppUserPlatformRelation.d.ts +7 -7
  8. package/dist/AppUserPlatformRelation.js +18 -18
  9. package/dist/CanonAlbum.d.ts +5 -5
  10. package/dist/CanonAlbum.js +10 -10
  11. package/dist/CanonAlbumImageHarvested.d.ts +9 -9
  12. package/dist/CanonAlbumImageHarvested.js +24 -32
  13. package/dist/CanonArtist.d.ts +3 -3
  14. package/dist/CanonArtist.js +6 -6
  15. package/dist/CanonArtistImageHarvested.d.ts +9 -9
  16. package/dist/CanonArtistImageHarvested.js +24 -24
  17. package/dist/CanonGenre.d.ts +3 -3
  18. package/dist/CanonGenre.js +6 -6
  19. package/dist/CanonLabel.d.ts +2 -2
  20. package/dist/CanonLabel.js +6 -6
  21. package/dist/CanonMember.d.ts +3 -3
  22. package/dist/CanonMember.js +6 -6
  23. package/dist/CanonMemberExternalReferenceRelation.d.ts +2 -2
  24. package/dist/CanonMemberExternalReferenceRelation.js +5 -5
  25. package/dist/CanonTrack.d.ts +5 -5
  26. package/dist/CanonTrack.js +11 -11
  27. package/dist/ConfigParam.d.ts +2 -2
  28. package/dist/ConfigParam.js +5 -5
  29. package/dist/ExternalReference.d.ts +2 -2
  30. package/dist/ExternalReference.js +5 -5
  31. package/dist/JukeboxAccessType.d.ts +2 -2
  32. package/dist/JukeboxAccessType.js +4 -4
  33. package/dist/JukeboxCanonGenreRelation.d.ts +2 -2
  34. package/dist/JukeboxCanonGenreRelation.js +6 -6
  35. package/dist/JukeboxInvite.d.ts +3 -3
  36. package/dist/JukeboxInvite.js +6 -6
  37. package/dist/JukeboxQueueEntry.d.ts +10 -10
  38. package/dist/JukeboxQueueEntry.js +12 -12
  39. package/dist/JukeboxQueueMode.d.ts +2 -2
  40. package/dist/JukeboxQueueMode.js +4 -4
  41. package/dist/JukeboxSession.d.ts +9 -9
  42. package/dist/JukeboxSession.js +20 -20
  43. package/dist/JukeboxTerminationCondition.d.ts +2 -2
  44. package/dist/JukeboxTerminationCondition.js +4 -4
  45. package/dist/JukeboxType.d.ts +2 -2
  46. package/dist/JukeboxType.js +4 -4
  47. package/dist/JukeboxUser.d.ts +7 -7
  48. package/dist/JukeboxUser.js +20 -20
  49. package/dist/KnexMigrations.d.ts +3 -3
  50. package/dist/KnexMigrations.js +6 -6
  51. package/dist/KnexMigrationsLock.d.ts +3 -3
  52. package/dist/KnexMigrationsLock.js +5 -5
  53. package/dist/MetricsDaily.d.ts +3 -3
  54. package/dist/MetricsDaily.js +4 -4
  55. package/dist/NewsSite.d.ts +3 -3
  56. package/dist/NewsSite.js +6 -6
  57. package/dist/Platform.d.ts +2 -2
  58. package/dist/Platform.js +7 -7
  59. package/dist/PlatformAlbum.d.ts +5 -5
  60. package/dist/PlatformAlbum.js +10 -10
  61. package/dist/PlatformArtist.d.ts +5 -5
  62. package/dist/PlatformArtist.js +10 -10
  63. package/dist/PlatformGenre.d.ts +2 -2
  64. package/dist/PlatformGenre.js +6 -6
  65. package/dist/PlatformTrack.d.ts +3 -3
  66. package/dist/PlatformTrack.js +6 -6
  67. package/dist/PlatformUserAlbum.d.ts +2 -2
  68. package/dist/PlatformUserAlbum.js +6 -6
  69. package/dist/PlatformUserAlbumTrack.d.ts +4 -4
  70. package/dist/PlatformUserAlbumTrack.js +11 -11
  71. package/dist/PlatformUserPlaylist.d.ts +5 -5
  72. package/dist/PlatformUserPlaylist.js +11 -11
  73. package/dist/PlatformUserPlaylistTrack.d.ts +7 -7
  74. package/dist/PlatformUserPlaylistTrack.js +17 -17
  75. package/dist/PlaybackStatus.d.ts +2 -14
  76. package/dist/PlaybackStatus.js +4 -4
  77. package/dist/PlaybackStatusType.d.ts +12 -0
  78. package/dist/State.d.ts +2 -2
  79. package/dist/State.js +4 -4
  80. package/dist/UnmatchedAlbum.d.ts +2 -2
  81. package/dist/UnmatchedAlbum.js +6 -6
  82. package/dist/UnmatchedArtist.d.ts +2 -2
  83. package/dist/UnmatchedArtist.js +6 -6
  84. package/dist/UserContacts.d.ts +3 -3
  85. package/dist/UserContacts.js +7 -7
  86. package/dist/init-models.js +2 -2
  87. package/models/AppUser.ts +18 -18
  88. package/models/AppUserDevice.ts +12 -12
  89. package/models/AppUserFollowRelation.ts +9 -9
  90. package/models/AppUserPlatformRelation.ts +25 -25
  91. package/models/CanonAlbum.ts +15 -15
  92. package/models/CanonAlbumImageHarvested.ts +33 -41
  93. package/models/CanonArtist.ts +9 -9
  94. package/models/CanonArtistImageHarvested.ts +33 -33
  95. package/models/CanonGenre.ts +9 -9
  96. package/models/CanonLabel.ts +8 -8
  97. package/models/CanonMember.ts +9 -9
  98. package/models/CanonMemberExternalReferenceRelation.ts +7 -7
  99. package/models/CanonTrack.ts +16 -16
  100. package/models/ConfigParam.ts +7 -7
  101. package/models/ExternalReference.ts +7 -7
  102. package/models/JukeboxAccessType.ts +6 -6
  103. package/models/JukeboxCanonGenreRelation.ts +8 -8
  104. package/models/JukeboxInvite.ts +9 -9
  105. package/models/JukeboxQueueEntry.ts +23 -23
  106. package/models/JukeboxQueueMode.ts +6 -6
  107. package/models/JukeboxSession.ts +29 -29
  108. package/models/JukeboxTerminationCondition.ts +6 -6
  109. package/models/JukeboxType.ts +6 -6
  110. package/models/JukeboxUser.ts +27 -27
  111. package/models/KnexMigrations.ts +9 -9
  112. package/models/KnexMigrationsLock.ts +8 -8
  113. package/models/MetricsDaily.ts +7 -7
  114. package/models/NewsSite.ts +9 -9
  115. package/models/Platform.ts +9 -9
  116. package/models/PlatformAlbum.ts +15 -15
  117. package/models/PlatformArtist.ts +15 -15
  118. package/models/PlatformGenre.ts +8 -8
  119. package/models/PlatformTrack.ts +9 -9
  120. package/models/PlatformUserAlbum.ts +8 -8
  121. package/models/PlatformUserAlbumTrack.ts +15 -15
  122. package/models/PlatformUserPlaylist.ts +16 -16
  123. package/models/PlatformUserPlaylistTrack.ts +24 -24
  124. package/models/PlaybackStatus.ts +6 -19
  125. package/models/PlaybackStatusType.ts +13 -0
  126. package/models/State.ts +6 -6
  127. package/models/UnmatchedAlbum.ts +8 -8
  128. package/models/UnmatchedArtist.ts +8 -8
  129. package/models/UserContacts.ts +10 -10
  130. package/models/init-models.ts +2 -2
  131. package/package.json +1 -1
@@ -5,16 +5,16 @@ const sequelize_1 = require("sequelize");
5
5
  class JukeboxQueueMode extends sequelize_1.Model {
6
6
  static initModel(sequelize) {
7
7
  return JukeboxQueueMode.init({
8
+ description: {
9
+ type: sequelize_1.DataTypes.TEXT,
10
+ allowNull: false
11
+ },
8
12
  id: {
9
13
  autoIncrement: true,
10
14
  autoIncrementIdentity: true,
11
15
  type: sequelize_1.DataTypes.SMALLINT,
12
16
  allowNull: false,
13
17
  primaryKey: true
14
- },
15
- description: {
16
- type: sequelize_1.DataTypes.TEXT,
17
- allowNull: false
18
18
  }
19
19
  }, {
20
20
  sequelize,
@@ -10,35 +10,35 @@ import type { JukeboxTerminationCondition, JukeboxTerminationConditionId } from
10
10
  import type { JukeboxType, JukeboxTypeId } from './JukeboxType';
11
11
  import type { JukeboxUser, JukeboxUserId } from './JukeboxUser';
12
12
  export interface JukeboxSessionAttributes {
13
- id: string;
14
13
  typeId: number;
15
14
  accessTypeId: number;
16
15
  terminationConditionId: number;
17
16
  jukeboxQueueModeId: number;
17
+ trackQueue?: string[];
18
+ stateMachineArn?: string;
19
+ id: string;
18
20
  createdAt: Date;
19
21
  updatedAt: Date;
20
- jukeboxStatusId: number;
21
- trackQueue?: string[];
22
22
  description?: string;
23
- stateMachineArn?: string;
23
+ jukeboxStatusId: number;
24
24
  durationMs: number;
25
25
  }
26
26
  export type JukeboxSessionPk = "id";
27
27
  export type JukeboxSessionId = JukeboxSession[JukeboxSessionPk];
28
- export type JukeboxSessionOptionalAttributes = "id" | "createdAt" | "updatedAt" | "jukeboxStatusId" | "trackQueue" | "description" | "stateMachineArn" | "durationMs";
28
+ export type JukeboxSessionOptionalAttributes = "trackQueue" | "stateMachineArn" | "id" | "createdAt" | "updatedAt" | "description" | "jukeboxStatusId" | "durationMs";
29
29
  export type JukeboxSessionCreationAttributes = Optional<JukeboxSessionAttributes, JukeboxSessionOptionalAttributes>;
30
30
  export declare class JukeboxSession extends Model<JukeboxSessionAttributes, JukeboxSessionCreationAttributes> implements JukeboxSessionAttributes {
31
- id: string;
32
31
  typeId: number;
33
32
  accessTypeId: number;
34
33
  terminationConditionId: number;
35
34
  jukeboxQueueModeId: number;
35
+ trackQueue?: string[];
36
+ stateMachineArn?: string;
37
+ id: string;
36
38
  createdAt: Date;
37
39
  updatedAt: Date;
38
- jukeboxStatusId: number;
39
- trackQueue?: string[];
40
40
  description?: string;
41
- stateMachineArn?: string;
41
+ jukeboxStatusId: number;
42
42
  durationMs: number;
43
43
  accessType: JukeboxAccessType;
44
44
  getAccessType: Sequelize.BelongsToGetAssociationMixin<JukeboxAccessType>;
@@ -29,12 +29,6 @@ const sequelize_1 = require("sequelize");
29
29
  class JukeboxSession extends sequelize_1.Model {
30
30
  static initModel(sequelize) {
31
31
  return JukeboxSession.init({
32
- id: {
33
- type: sequelize_1.DataTypes.UUID,
34
- allowNull: false,
35
- defaultValue: sequelize_1.DataTypes.UUIDV4,
36
- primaryKey: true
37
- },
38
32
  typeId: {
39
33
  type: sequelize_1.DataTypes.SMALLINT,
40
34
  allowNull: false,
@@ -71,6 +65,22 @@ class JukeboxSession extends sequelize_1.Model {
71
65
  },
72
66
  field: 'jukebox_queue_mode_id'
73
67
  },
68
+ trackQueue: {
69
+ type: sequelize_1.DataTypes.ARRAY(sequelize_1.DataTypes.TEXT),
70
+ allowNull: true,
71
+ field: 'track_queue'
72
+ },
73
+ stateMachineArn: {
74
+ type: sequelize_1.DataTypes.STRING(255),
75
+ allowNull: true,
76
+ field: 'state_machine_arn'
77
+ },
78
+ id: {
79
+ type: sequelize_1.DataTypes.UUID,
80
+ allowNull: false,
81
+ defaultValue: sequelize_1.DataTypes.UUIDV4,
82
+ primaryKey: true
83
+ },
74
84
  createdAt: {
75
85
  type: sequelize_1.DataTypes.DATE,
76
86
  allowNull: false,
@@ -83,6 +93,10 @@ class JukeboxSession extends sequelize_1.Model {
83
93
  defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
84
94
  field: 'updated_at'
85
95
  },
96
+ description: {
97
+ type: sequelize_1.DataTypes.STRING(512),
98
+ allowNull: true
99
+ },
86
100
  jukeboxStatusId: {
87
101
  type: sequelize_1.DataTypes.SMALLINT,
88
102
  allowNull: false,
@@ -93,20 +107,6 @@ class JukeboxSession extends sequelize_1.Model {
93
107
  },
94
108
  field: 'jukebox_status_id'
95
109
  },
96
- trackQueue: {
97
- type: sequelize_1.DataTypes.ARRAY(sequelize_1.DataTypes.TEXT),
98
- allowNull: true,
99
- field: 'track_queue'
100
- },
101
- description: {
102
- type: sequelize_1.DataTypes.STRING(512),
103
- allowNull: true
104
- },
105
- stateMachineArn: {
106
- type: sequelize_1.DataTypes.STRING(255),
107
- allowNull: true,
108
- field: 'state_machine_arn'
109
- },
110
110
  durationMs: {
111
111
  type: sequelize_1.DataTypes.INTEGER,
112
112
  allowNull: false,
@@ -2,15 +2,15 @@ import * as Sequelize from 'sequelize';
2
2
  import { Model } from 'sequelize';
3
3
  import type { JukeboxSession, JukeboxSessionId } from './JukeboxSession';
4
4
  export interface JukeboxTerminationConditionAttributes {
5
- id: number;
6
5
  description: string;
6
+ id: number;
7
7
  }
8
8
  export type JukeboxTerminationConditionPk = "id";
9
9
  export type JukeboxTerminationConditionId = JukeboxTerminationCondition[JukeboxTerminationConditionPk];
10
10
  export type JukeboxTerminationConditionCreationAttributes = JukeboxTerminationConditionAttributes;
11
11
  export declare class JukeboxTerminationCondition extends Model<JukeboxTerminationConditionAttributes, JukeboxTerminationConditionCreationAttributes> implements JukeboxTerminationConditionAttributes {
12
- id: number;
13
12
  description: string;
13
+ id: number;
14
14
  jukeboxSessions: JukeboxSession[];
15
15
  getJukeboxSessions: Sequelize.HasManyGetAssociationsMixin<JukeboxSession>;
16
16
  setJukeboxSessions: Sequelize.HasManySetAssociationsMixin<JukeboxSession, JukeboxSessionId>;
@@ -5,16 +5,16 @@ const sequelize_1 = require("sequelize");
5
5
  class JukeboxTerminationCondition extends sequelize_1.Model {
6
6
  static initModel(sequelize) {
7
7
  return JukeboxTerminationCondition.init({
8
+ description: {
9
+ type: sequelize_1.DataTypes.TEXT,
10
+ allowNull: false
11
+ },
8
12
  id: {
9
13
  autoIncrement: true,
10
14
  autoIncrementIdentity: true,
11
15
  type: sequelize_1.DataTypes.SMALLINT,
12
16
  allowNull: false,
13
17
  primaryKey: true
14
- },
15
- description: {
16
- type: sequelize_1.DataTypes.TEXT,
17
- allowNull: false
18
18
  }
19
19
  }, {
20
20
  sequelize,
@@ -2,15 +2,15 @@ import * as Sequelize from 'sequelize';
2
2
  import { Model } from 'sequelize';
3
3
  import type { JukeboxSession, JukeboxSessionId } from './JukeboxSession';
4
4
  export interface JukeboxTypeAttributes {
5
- id: number;
6
5
  description: string;
6
+ id: number;
7
7
  }
8
8
  export type JukeboxTypePk = "id";
9
9
  export type JukeboxTypeId = JukeboxType[JukeboxTypePk];
10
10
  export type JukeboxTypeCreationAttributes = JukeboxTypeAttributes;
11
11
  export declare class JukeboxType extends Model<JukeboxTypeAttributes, JukeboxTypeCreationAttributes> implements JukeboxTypeAttributes {
12
- id: number;
13
12
  description: string;
13
+ id: number;
14
14
  jukeboxSessions: JukeboxSession[];
15
15
  getJukeboxSessions: Sequelize.HasManyGetAssociationsMixin<JukeboxSession>;
16
16
  setJukeboxSessions: Sequelize.HasManySetAssociationsMixin<JukeboxSession, JukeboxSessionId>;
@@ -5,16 +5,16 @@ const sequelize_1 = require("sequelize");
5
5
  class JukeboxType extends sequelize_1.Model {
6
6
  static initModel(sequelize) {
7
7
  return JukeboxType.init({
8
+ description: {
9
+ type: sequelize_1.DataTypes.TEXT,
10
+ allowNull: false
11
+ },
8
12
  id: {
9
13
  autoIncrement: true,
10
14
  autoIncrementIdentity: true,
11
15
  type: sequelize_1.DataTypes.SMALLINT,
12
16
  allowNull: false,
13
17
  primaryKey: true
14
- },
15
- description: {
16
- type: sequelize_1.DataTypes.TEXT,
17
- allowNull: false
18
18
  }
19
19
  }, {
20
20
  sequelize,
@@ -6,32 +6,32 @@ import type { JukeboxSession, JukeboxSessionId } from './JukeboxSession';
6
6
  import type { JukeboxUserType, JukeboxUserTypeId } from './JukeboxUserType';
7
7
  import type { PauseStatusType, PauseStatusTypeId } from './PauseStatusType';
8
8
  export interface JukeboxUserAttributes {
9
- id: string;
10
9
  jukeboxSessionId: string;
11
10
  appUserId: string;
11
+ exitDate?: Date;
12
+ pausedQueueEntryId?: string;
13
+ id: string;
12
14
  createdAt: Date;
13
15
  updatedAt: Date;
14
16
  enterDate: Date;
15
- exitDate?: Date;
16
17
  jukeboxUserTypeId: number;
17
18
  pauseStatusTypeId: number;
18
- pausedQueueEntryId?: string;
19
19
  }
20
20
  export type JukeboxUserPk = "id";
21
21
  export type JukeboxUserId = JukeboxUser[JukeboxUserPk];
22
- export type JukeboxUserOptionalAttributes = "id" | "createdAt" | "updatedAt" | "enterDate" | "exitDate" | "jukeboxUserTypeId" | "pauseStatusTypeId" | "pausedQueueEntryId";
22
+ export type JukeboxUserOptionalAttributes = "exitDate" | "pausedQueueEntryId" | "id" | "createdAt" | "updatedAt" | "enterDate" | "jukeboxUserTypeId" | "pauseStatusTypeId";
23
23
  export type JukeboxUserCreationAttributes = Optional<JukeboxUserAttributes, JukeboxUserOptionalAttributes>;
24
24
  export declare class JukeboxUser extends Model<JukeboxUserAttributes, JukeboxUserCreationAttributes> implements JukeboxUserAttributes {
25
- id: string;
26
25
  jukeboxSessionId: string;
27
26
  appUserId: string;
27
+ exitDate?: Date;
28
+ pausedQueueEntryId?: string;
29
+ id: string;
28
30
  createdAt: Date;
29
31
  updatedAt: Date;
30
32
  enterDate: Date;
31
- exitDate?: Date;
32
33
  jukeboxUserTypeId: number;
33
34
  pauseStatusTypeId: number;
34
- pausedQueueEntryId?: string;
35
35
  appUser: AppUser;
36
36
  getAppUser: Sequelize.BelongsToGetAssociationMixin<AppUser>;
37
37
  setAppUser: Sequelize.BelongsToSetAssociationMixin<AppUser, AppUserId>;
@@ -29,12 +29,6 @@ const sequelize_1 = require("sequelize");
29
29
  class JukeboxUser extends sequelize_1.Model {
30
30
  static initModel(sequelize) {
31
31
  return JukeboxUser.init({
32
- id: {
33
- type: sequelize_1.DataTypes.UUID,
34
- allowNull: false,
35
- defaultValue: sequelize_1.DataTypes.UUIDV4,
36
- primaryKey: true
37
- },
38
32
  jukeboxSessionId: {
39
33
  type: sequelize_1.DataTypes.UUID,
40
34
  allowNull: false,
@@ -55,6 +49,26 @@ class JukeboxUser extends sequelize_1.Model {
55
49
  unique: "unique_jukebox_user_id",
56
50
  field: 'app_user_id'
57
51
  },
52
+ exitDate: {
53
+ type: sequelize_1.DataTypes.DATE,
54
+ allowNull: true,
55
+ field: 'exit_date'
56
+ },
57
+ pausedQueueEntryId: {
58
+ type: sequelize_1.DataTypes.UUID,
59
+ allowNull: true,
60
+ references: {
61
+ model: 'jukebox_queue_entry',
62
+ key: 'id'
63
+ },
64
+ field: 'paused_queue_entry_id'
65
+ },
66
+ id: {
67
+ type: sequelize_1.DataTypes.UUID,
68
+ allowNull: false,
69
+ defaultValue: sequelize_1.DataTypes.UUIDV4,
70
+ primaryKey: true
71
+ },
58
72
  createdAt: {
59
73
  type: sequelize_1.DataTypes.DATE,
60
74
  allowNull: false,
@@ -73,11 +87,6 @@ class JukeboxUser extends sequelize_1.Model {
73
87
  defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
74
88
  field: 'enter_date'
75
89
  },
76
- exitDate: {
77
- type: sequelize_1.DataTypes.DATE,
78
- allowNull: true,
79
- field: 'exit_date'
80
- },
81
90
  jukeboxUserTypeId: {
82
91
  type: sequelize_1.DataTypes.SMALLINT,
83
92
  allowNull: false,
@@ -97,15 +106,6 @@ class JukeboxUser extends sequelize_1.Model {
97
106
  key: 'id'
98
107
  },
99
108
  field: 'pause_status_type_id'
100
- },
101
- pausedQueueEntryId: {
102
- type: sequelize_1.DataTypes.UUID,
103
- allowNull: true,
104
- references: {
105
- model: 'jukebox_queue_entry',
106
- key: 'id'
107
- },
108
- field: 'paused_queue_entry_id'
109
109
  }
110
110
  }, {
111
111
  sequelize,
@@ -1,19 +1,19 @@
1
1
  import * as Sequelize from 'sequelize';
2
2
  import { Model, Optional } from 'sequelize';
3
3
  export interface KnexMigrationsAttributes {
4
- id: number;
5
4
  name?: string;
6
5
  batch?: number;
7
6
  migrationTime?: Date;
7
+ id: number;
8
8
  }
9
9
  export type KnexMigrationsPk = "id";
10
10
  export type KnexMigrationsId = KnexMigrations[KnexMigrationsPk];
11
- export type KnexMigrationsOptionalAttributes = "id" | "name" | "batch" | "migrationTime";
11
+ export type KnexMigrationsOptionalAttributes = "name" | "batch" | "migrationTime" | "id";
12
12
  export type KnexMigrationsCreationAttributes = Optional<KnexMigrationsAttributes, KnexMigrationsOptionalAttributes>;
13
13
  export declare class KnexMigrations extends Model<KnexMigrationsAttributes, KnexMigrationsCreationAttributes> implements KnexMigrationsAttributes {
14
- id: number;
15
14
  name?: string;
16
15
  batch?: number;
17
16
  migrationTime?: Date;
17
+ id: number;
18
18
  static initModel(sequelize: Sequelize.Sequelize): typeof KnexMigrations;
19
19
  }
@@ -5,12 +5,6 @@ const sequelize_1 = require("sequelize");
5
5
  class KnexMigrations extends sequelize_1.Model {
6
6
  static initModel(sequelize) {
7
7
  return KnexMigrations.init({
8
- id: {
9
- autoIncrement: true,
10
- type: sequelize_1.DataTypes.INTEGER,
11
- allowNull: false,
12
- primaryKey: true
13
- },
14
8
  name: {
15
9
  type: sequelize_1.DataTypes.STRING(255),
16
10
  allowNull: true
@@ -23,6 +17,12 @@ class KnexMigrations extends sequelize_1.Model {
23
17
  type: sequelize_1.DataTypes.DATE,
24
18
  allowNull: true,
25
19
  field: 'migration_time'
20
+ },
21
+ id: {
22
+ autoIncrement: true,
23
+ type: sequelize_1.DataTypes.INTEGER,
24
+ allowNull: false,
25
+ primaryKey: true
26
26
  }
27
27
  }, {
28
28
  sequelize,
@@ -1,15 +1,15 @@
1
1
  import * as Sequelize from 'sequelize';
2
2
  import { Model, Optional } from 'sequelize';
3
3
  export interface KnexMigrationsLockAttributes {
4
- index: number;
5
4
  isLocked?: number;
5
+ index: number;
6
6
  }
7
7
  export type KnexMigrationsLockPk = "index";
8
8
  export type KnexMigrationsLockId = KnexMigrationsLock[KnexMigrationsLockPk];
9
- export type KnexMigrationsLockOptionalAttributes = "index" | "isLocked";
9
+ export type KnexMigrationsLockOptionalAttributes = "isLocked" | "index";
10
10
  export type KnexMigrationsLockCreationAttributes = Optional<KnexMigrationsLockAttributes, KnexMigrationsLockOptionalAttributes>;
11
11
  export declare class KnexMigrationsLock extends Model<KnexMigrationsLockAttributes, KnexMigrationsLockCreationAttributes> implements KnexMigrationsLockAttributes {
12
- index: number;
13
12
  isLocked?: number;
13
+ index: number;
14
14
  static initModel(sequelize: Sequelize.Sequelize): typeof KnexMigrationsLock;
15
15
  }
@@ -5,16 +5,16 @@ const sequelize_1 = require("sequelize");
5
5
  class KnexMigrationsLock extends sequelize_1.Model {
6
6
  static initModel(sequelize) {
7
7
  return KnexMigrationsLock.init({
8
+ isLocked: {
9
+ type: sequelize_1.DataTypes.INTEGER,
10
+ allowNull: true,
11
+ field: 'is_locked'
12
+ },
8
13
  index: {
9
14
  autoIncrement: true,
10
15
  type: sequelize_1.DataTypes.INTEGER,
11
16
  allowNull: false,
12
17
  primaryKey: true
13
- },
14
- isLocked: {
15
- type: sequelize_1.DataTypes.INTEGER,
16
- allowNull: true,
17
- field: 'is_locked'
18
18
  }
19
19
  }, {
20
20
  sequelize,
@@ -3,17 +3,17 @@ import { Model, Optional } from 'sequelize';
3
3
  export interface MetricsDailyAttributes {
4
4
  day?: string;
5
5
  eventType: string;
6
+ metrics?: object;
6
7
  createdAt: Date;
7
8
  updatedAt: Date;
8
- metrics?: object;
9
9
  }
10
- export type MetricsDailyOptionalAttributes = "day" | "createdAt" | "updatedAt" | "metrics";
10
+ export type MetricsDailyOptionalAttributes = "day" | "metrics" | "createdAt" | "updatedAt";
11
11
  export type MetricsDailyCreationAttributes = Optional<MetricsDailyAttributes, MetricsDailyOptionalAttributes>;
12
12
  export declare class MetricsDaily extends Model<MetricsDailyAttributes, MetricsDailyCreationAttributes> implements MetricsDailyAttributes {
13
13
  day?: string;
14
14
  eventType: string;
15
+ metrics?: object;
15
16
  createdAt: Date;
16
17
  updatedAt: Date;
17
- metrics?: object;
18
18
  static initModel(sequelize: Sequelize.Sequelize): typeof MetricsDaily;
19
19
  }
@@ -38,6 +38,10 @@ class MetricsDaily extends sequelize_1.Model {
38
38
  allowNull: false,
39
39
  field: 'event_type'
40
40
  },
41
+ metrics: {
42
+ type: sequelize_1.DataTypes.JSONB,
43
+ allowNull: true
44
+ },
41
45
  createdAt: {
42
46
  type: sequelize_1.DataTypes.DATE,
43
47
  allowNull: false,
@@ -49,10 +53,6 @@ class MetricsDaily extends sequelize_1.Model {
49
53
  allowNull: false,
50
54
  defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
51
55
  field: 'updated_at'
52
- },
53
- metrics: {
54
- type: sequelize_1.DataTypes.JSONB,
55
- allowNull: true
56
56
  }
57
57
  }, {
58
58
  sequelize,
@@ -1,21 +1,21 @@
1
1
  import * as Sequelize from 'sequelize';
2
2
  import { Model, Optional } from 'sequelize';
3
3
  export interface NewsSiteAttributes {
4
- id: number;
5
4
  name: string;
6
5
  domain?: string;
7
6
  scrapingBaseUrl: string;
7
+ id: number;
8
8
  active?: boolean;
9
9
  }
10
10
  export type NewsSitePk = "id";
11
11
  export type NewsSiteId = NewsSite[NewsSitePk];
12
- export type NewsSiteOptionalAttributes = "id" | "domain" | "active";
12
+ export type NewsSiteOptionalAttributes = "domain" | "id" | "active";
13
13
  export type NewsSiteCreationAttributes = Optional<NewsSiteAttributes, NewsSiteOptionalAttributes>;
14
14
  export declare class NewsSite extends Model<NewsSiteAttributes, NewsSiteCreationAttributes> implements NewsSiteAttributes {
15
- id: number;
16
15
  name: string;
17
16
  domain?: string;
18
17
  scrapingBaseUrl: string;
18
+ id: number;
19
19
  active?: boolean;
20
20
  static initModel(sequelize: Sequelize.Sequelize): typeof NewsSite;
21
21
  }
package/dist/NewsSite.js CHANGED
@@ -5,12 +5,6 @@ const sequelize_1 = require("sequelize");
5
5
  class NewsSite extends sequelize_1.Model {
6
6
  static initModel(sequelize) {
7
7
  return NewsSite.init({
8
- id: {
9
- autoIncrement: true,
10
- type: sequelize_1.DataTypes.INTEGER,
11
- allowNull: false,
12
- primaryKey: true
13
- },
14
8
  name: {
15
9
  type: sequelize_1.DataTypes.STRING(255),
16
10
  allowNull: false,
@@ -25,6 +19,12 @@ class NewsSite extends sequelize_1.Model {
25
19
  allowNull: false,
26
20
  field: 'scraping_base_url'
27
21
  },
22
+ id: {
23
+ autoIncrement: true,
24
+ type: sequelize_1.DataTypes.INTEGER,
25
+ allowNull: false,
26
+ primaryKey: true
27
+ },
28
28
  active: {
29
29
  type: sequelize_1.DataTypes.BOOLEAN,
30
30
  allowNull: true,
@@ -10,20 +10,20 @@ import type { PlatformUserAlbumTrack, PlatformUserAlbumTrackId } from './Platfor
10
10
  import type { PlatformUserPlaylist, PlatformUserPlaylistId } from './PlatformUserPlaylist';
11
11
  import type { UnmatchedArtist, UnmatchedArtistId } from './UnmatchedArtist';
12
12
  export interface PlatformAttributes {
13
- id: number;
14
13
  name: string;
15
14
  createDate: Date;
16
15
  updateDate: Date;
16
+ id: number;
17
17
  }
18
18
  export type PlatformPk = "id";
19
19
  export type PlatformId = Platform[PlatformPk];
20
20
  export type PlatformOptionalAttributes = "createDate" | "updateDate";
21
21
  export type PlatformCreationAttributes = Optional<PlatformAttributes, PlatformOptionalAttributes>;
22
22
  export declare class Platform extends Model<PlatformAttributes, PlatformCreationAttributes> implements PlatformAttributes {
23
- id: number;
24
23
  name: string;
25
24
  createDate: Date;
26
25
  updateDate: Date;
26
+ id: number;
27
27
  appUserPlatformRelations: AppUserPlatformRelation[];
28
28
  getAppUserPlatformRelations: Sequelize.HasManyGetAssociationsMixin<AppUserPlatformRelation>;
29
29
  setAppUserPlatformRelations: Sequelize.HasManySetAssociationsMixin<AppUserPlatformRelation, AppUserPlatformRelationId>;
package/dist/Platform.js CHANGED
@@ -29,13 +29,6 @@ const sequelize_1 = require("sequelize");
29
29
  class Platform extends sequelize_1.Model {
30
30
  static initModel(sequelize) {
31
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
32
  name: {
40
33
  type: sequelize_1.DataTypes.TEXT,
41
34
  allowNull: false,
@@ -52,6 +45,13 @@ class Platform extends sequelize_1.Model {
52
45
  allowNull: false,
53
46
  defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
54
47
  field: 'update_date'
48
+ },
49
+ id: {
50
+ autoIncrement: true,
51
+ autoIncrementIdentity: true,
52
+ type: sequelize_1.DataTypes.SMALLINT,
53
+ allowNull: false,
54
+ primaryKey: true
55
55
  }
56
56
  }, {
57
57
  sequelize,
@@ -18,7 +18,6 @@ import type { PlatformTrack, PlatformTrackId } from './PlatformTrack';
18
18
  import type { PlatformUserAlbum, PlatformUserAlbumId } from './PlatformUserAlbum';
19
19
  import type { UnmatchedAlbum, UnmatchedAlbumId } from './UnmatchedAlbum';
20
20
  export interface PlatformAlbumAttributes {
21
- id: string;
22
21
  platformId: number;
23
22
  externalAlbumId: string;
24
23
  name: string;
@@ -27,18 +26,18 @@ export interface PlatformAlbumAttributes {
27
26
  releaseDate?: string;
28
27
  popularity?: number;
29
28
  recordLabel?: string;
29
+ images?: object;
30
+ id: string;
30
31
  createDate: Date;
31
32
  updateDate: Date;
32
- images?: object;
33
33
  lastHarvestDate?: Date;
34
34
  lastHarvestLog?: string;
35
35
  }
36
36
  export type PlatformAlbumPk = "id";
37
37
  export type PlatformAlbumId = PlatformAlbum[PlatformAlbumPk];
38
- export type PlatformAlbumOptionalAttributes = "id" | "albumType" | "releaseDate" | "popularity" | "recordLabel" | "createDate" | "updateDate" | "images" | "lastHarvestDate" | "lastHarvestLog";
38
+ export type PlatformAlbumOptionalAttributes = "albumType" | "releaseDate" | "popularity" | "recordLabel" | "images" | "id" | "createDate" | "updateDate" | "lastHarvestDate" | "lastHarvestLog";
39
39
  export type PlatformAlbumCreationAttributes = Optional<PlatformAlbumAttributes, PlatformAlbumOptionalAttributes>;
40
40
  export declare class PlatformAlbum extends Model<PlatformAlbumAttributes, PlatformAlbumCreationAttributes> implements PlatformAlbumAttributes {
41
- id: string;
42
41
  platformId: number;
43
42
  externalAlbumId: string;
44
43
  name: string;
@@ -47,9 +46,10 @@ export declare class PlatformAlbum extends Model<PlatformAlbumAttributes, Platfo
47
46
  releaseDate?: string;
48
47
  popularity?: number;
49
48
  recordLabel?: string;
49
+ images?: object;
50
+ id: string;
50
51
  createDate: Date;
51
52
  updateDate: Date;
52
- images?: object;
53
53
  lastHarvestDate?: Date;
54
54
  lastHarvestLog?: string;
55
55
  platform: Platform;
@@ -29,12 +29,6 @@ const sequelize_1 = require("sequelize");
29
29
  class PlatformAlbum extends sequelize_1.Model {
30
30
  static initModel(sequelize) {
31
31
  return PlatformAlbum.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
32
  platformId: {
39
33
  type: sequelize_1.DataTypes.SMALLINT,
40
34
  allowNull: false,
@@ -79,6 +73,16 @@ class PlatformAlbum extends sequelize_1.Model {
79
73
  allowNull: true,
80
74
  field: 'record_label'
81
75
  },
76
+ images: {
77
+ type: sequelize_1.DataTypes.JSONB,
78
+ allowNull: true
79
+ },
80
+ id: {
81
+ type: sequelize_1.DataTypes.UUID,
82
+ allowNull: false,
83
+ defaultValue: Sequelize.Sequelize.fn('uuid_generate_v1'),
84
+ primaryKey: true
85
+ },
82
86
  createDate: {
83
87
  type: sequelize_1.DataTypes.DATE,
84
88
  allowNull: false,
@@ -91,10 +95,6 @@ class PlatformAlbum extends sequelize_1.Model {
91
95
  defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
92
96
  field: 'update_date'
93
97
  },
94
- images: {
95
- type: sequelize_1.DataTypes.JSONB,
96
- allowNull: true
97
- },
98
98
  lastHarvestDate: {
99
99
  type: sequelize_1.DataTypes.DATE,
100
100
  allowNull: true,