@earbug/db-models 0.0.9 → 0.0.11

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.
@@ -0,0 +1,14 @@
1
+ import * as Sequelize from 'sequelize';
2
+ import { Model } from 'sequelize';
3
+ export interface AccessControlPreferenceAttributes {
4
+ id: number;
5
+ name: string;
6
+ }
7
+ export type AccessControlPreferencePk = "id";
8
+ export type AccessControlPreferenceId = AccessControlPreference[AccessControlPreferencePk];
9
+ export type AccessControlPreferenceCreationAttributes = AccessControlPreferenceAttributes;
10
+ export declare class AccessControlPreference extends Model<AccessControlPreferenceAttributes, AccessControlPreferenceCreationAttributes> implements AccessControlPreferenceAttributes {
11
+ id: number;
12
+ name: string;
13
+ static initModel(sequelize: Sequelize.Sequelize): typeof AccessControlPreference;
14
+ }
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AccessControlPreference = void 0;
4
+ const sequelize_1 = require("sequelize");
5
+ class AccessControlPreference extends sequelize_1.Model {
6
+ static initModel(sequelize) {
7
+ return AccessControlPreference.init({
8
+ id: {
9
+ type: sequelize_1.DataTypes.SMALLINT,
10
+ allowNull: false,
11
+ primaryKey: true
12
+ },
13
+ name: {
14
+ type: sequelize_1.DataTypes.TEXT,
15
+ allowNull: false,
16
+ unique: "access_control_preference_name_unique"
17
+ }
18
+ }, {
19
+ sequelize,
20
+ tableName: 'access_control_preference',
21
+ schema: 'eb',
22
+ timestamps: false,
23
+ indexes: [
24
+ {
25
+ name: "access_control_preference_name_unique",
26
+ unique: true,
27
+ fields: [
28
+ { name: "name" },
29
+ ]
30
+ },
31
+ {
32
+ name: "access_control_preference_pkey",
33
+ unique: true,
34
+ fields: [
35
+ { name: "id" },
36
+ ]
37
+ },
38
+ ]
39
+ });
40
+ }
41
+ }
42
+ exports.AccessControlPreference = AccessControlPreference;
package/dist/AppUser.d.ts CHANGED
@@ -9,6 +9,7 @@ import type { JukeboxUser, JukeboxUserId } from './JukeboxUser';
9
9
  import type { Notification, NotificationId } from './Notification';
10
10
  import type { PlatformUserAlbum, PlatformUserAlbumId } from './PlatformUserAlbum';
11
11
  import type { PlatformUserPlaylist, PlatformUserPlaylistId } from './PlatformUserPlaylist';
12
+ import type { RadioShow, RadioShowId } from './RadioShow';
12
13
  import type { State, StateId } from './State';
13
14
  import type { UserContacts, UserContactsId } from './UserContacts';
14
15
  export interface AppUserAttributes {
@@ -23,10 +24,11 @@ export interface AppUserAttributes {
23
24
  autoApproveFollowers: boolean;
24
25
  lastHarvested?: Date;
25
26
  lastHarvestedError?: string;
27
+ earbugAccessControlPreference: string;
26
28
  }
27
29
  export type AppUserPk = "id";
28
30
  export type AppUserId = AppUser[AppUserPk];
29
- export type AppUserOptionalAttributes = "id" | "createDate" | "updateDate" | "syncContacts" | "stateId" | "lastName" | "autoApproveFollowers" | "lastHarvested" | "lastHarvestedError";
31
+ export type AppUserOptionalAttributes = "id" | "createDate" | "updateDate" | "syncContacts" | "stateId" | "lastName" | "autoApproveFollowers" | "lastHarvested" | "lastHarvestedError" | "earbugAccessControlPreference";
30
32
  export type AppUserCreationAttributes = Optional<AppUserAttributes, AppUserOptionalAttributes>;
31
33
  export declare class AppUser extends Model<AppUserAttributes, AppUserCreationAttributes> implements AppUserAttributes {
32
34
  email: string;
@@ -40,6 +42,7 @@ export declare class AppUser extends Model<AppUserAttributes, AppUserCreationAtt
40
42
  autoApproveFollowers: boolean;
41
43
  lastHarvested?: Date;
42
44
  lastHarvestedError?: string;
45
+ earbugAccessControlPreference: string;
43
46
  appUserDevices: AppUserDevice[];
44
47
  getAppUserDevices: Sequelize.HasManyGetAssociationsMixin<AppUserDevice>;
45
48
  setAppUserDevices: Sequelize.HasManySetAssociationsMixin<AppUserDevice, AppUserDeviceId>;
@@ -165,6 +168,17 @@ export declare class AppUser extends Model<AppUserAttributes, AppUserCreationAtt
165
168
  hasPlatformUserPlaylist: Sequelize.HasManyHasAssociationMixin<PlatformUserPlaylist, PlatformUserPlaylistId>;
166
169
  hasPlatformUserPlaylists: Sequelize.HasManyHasAssociationsMixin<PlatformUserPlaylist, PlatformUserPlaylistId>;
167
170
  countPlatformUserPlaylists: Sequelize.HasManyCountAssociationsMixin;
171
+ radioShows: RadioShow[];
172
+ getRadioShows: Sequelize.HasManyGetAssociationsMixin<RadioShow>;
173
+ setRadioShows: Sequelize.HasManySetAssociationsMixin<RadioShow, RadioShowId>;
174
+ addRadioShow: Sequelize.HasManyAddAssociationMixin<RadioShow, RadioShowId>;
175
+ addRadioShows: Sequelize.HasManyAddAssociationsMixin<RadioShow, RadioShowId>;
176
+ createRadioShow: Sequelize.HasManyCreateAssociationMixin<RadioShow>;
177
+ removeRadioShow: Sequelize.HasManyRemoveAssociationMixin<RadioShow, RadioShowId>;
178
+ removeRadioShows: Sequelize.HasManyRemoveAssociationsMixin<RadioShow, RadioShowId>;
179
+ hasRadioShow: Sequelize.HasManyHasAssociationMixin<RadioShow, RadioShowId>;
180
+ hasRadioShows: Sequelize.HasManyHasAssociationsMixin<RadioShow, RadioShowId>;
181
+ countRadioShows: Sequelize.HasManyCountAssociationsMixin;
168
182
  userContacts: UserContacts[];
169
183
  getUserContacts: Sequelize.HasManyGetAssociationsMixin<UserContacts>;
170
184
  setUserContacts: Sequelize.HasManySetAssociationsMixin<UserContacts, UserContactsId>;
package/dist/AppUser.js CHANGED
@@ -93,6 +93,12 @@ class AppUser extends sequelize_1.Model {
93
93
  type: sequelize_1.DataTypes.STRING(512),
94
94
  allowNull: true,
95
95
  field: 'last_harvested_error'
96
+ },
97
+ earbugAccessControlPreference: {
98
+ type: sequelize_1.DataTypes.TEXT,
99
+ allowNull: false,
100
+ defaultValue: "PUBLIC",
101
+ field: 'earbug_access_control_preference'
96
102
  }
97
103
  }, {
98
104
  sequelize,
@@ -9,6 +9,7 @@ import type { JukeboxCanonGenreRelation, JukeboxCanonGenreRelationId } from './J
9
9
  import type { PlatformAlbum, PlatformAlbumId } from './PlatformAlbum';
10
10
  import type { PlatformArtist, PlatformArtistId } from './PlatformArtist';
11
11
  import type { PlatformGenre, PlatformGenreId } from './PlatformGenre';
12
+ import type { RadioShowGenres, RadioShowGenresId } from './RadioShowGenres';
12
13
  export interface CanonGenreAttributes {
13
14
  name: string;
14
15
  asciiName: string;
@@ -129,5 +130,16 @@ export declare class CanonGenre extends Model<CanonGenreAttributes, CanonGenreCr
129
130
  hasPlatformGenreIdPlatformGenre: Sequelize.BelongsToManyHasAssociationMixin<PlatformGenre, PlatformGenreId>;
130
131
  hasPlatformGenreIdPlatformGenres: Sequelize.BelongsToManyHasAssociationsMixin<PlatformGenre, PlatformGenreId>;
131
132
  countPlatformGenreIdPlatformGenres: Sequelize.BelongsToManyCountAssociationsMixin;
133
+ radioShowGenres: RadioShowGenres[];
134
+ getRadioShowGenres: Sequelize.HasManyGetAssociationsMixin<RadioShowGenres>;
135
+ setRadioShowGenres: Sequelize.HasManySetAssociationsMixin<RadioShowGenres, RadioShowGenresId>;
136
+ addRadioShowGenre: Sequelize.HasManyAddAssociationMixin<RadioShowGenres, RadioShowGenresId>;
137
+ addRadioShowGenres: Sequelize.HasManyAddAssociationsMixin<RadioShowGenres, RadioShowGenresId>;
138
+ createRadioShowGenre: Sequelize.HasManyCreateAssociationMixin<RadioShowGenres>;
139
+ removeRadioShowGenre: Sequelize.HasManyRemoveAssociationMixin<RadioShowGenres, RadioShowGenresId>;
140
+ removeRadioShowGenres: Sequelize.HasManyRemoveAssociationsMixin<RadioShowGenres, RadioShowGenresId>;
141
+ hasRadioShowGenre: Sequelize.HasManyHasAssociationMixin<RadioShowGenres, RadioShowGenresId>;
142
+ hasRadioShowGenres: Sequelize.HasManyHasAssociationsMixin<RadioShowGenres, RadioShowGenresId>;
143
+ countRadioShowGenres: Sequelize.HasManyCountAssociationsMixin;
132
144
  static initModel(sequelize: Sequelize.Sequelize): typeof CanonGenre;
133
145
  }
@@ -7,6 +7,7 @@ import type { CanonArtistTrackRelation, CanonArtistTrackRelationId } from './Can
7
7
  import type { CanonToPlatformTrackRelation, CanonToPlatformTrackRelationId } from './CanonToPlatformTrackRelation';
8
8
  import type { JukeboxQueueEntry, JukeboxQueueEntryId } from './JukeboxQueueEntry';
9
9
  import type { PlatformTrack, PlatformTrackId } from './PlatformTrack';
10
+ import type { RadioShowPlacement, RadioShowPlacementId } from './RadioShowPlacement';
10
11
  export interface CanonTrackAttributes {
11
12
  name: string;
12
13
  asciiName: string;
@@ -109,5 +110,16 @@ export declare class CanonTrack extends Model<CanonTrackAttributes, CanonTrackCr
109
110
  hasPlatformTrackIdPlatformTrack: Sequelize.BelongsToManyHasAssociationMixin<PlatformTrack, PlatformTrackId>;
110
111
  hasPlatformTrackIdPlatformTracks: Sequelize.BelongsToManyHasAssociationsMixin<PlatformTrack, PlatformTrackId>;
111
112
  countPlatformTrackIdPlatformTracks: Sequelize.BelongsToManyCountAssociationsMixin;
113
+ radioShowPlacements: RadioShowPlacement[];
114
+ getRadioShowPlacements: Sequelize.HasManyGetAssociationsMixin<RadioShowPlacement>;
115
+ setRadioShowPlacements: Sequelize.HasManySetAssociationsMixin<RadioShowPlacement, RadioShowPlacementId>;
116
+ addRadioShowPlacement: Sequelize.HasManyAddAssociationMixin<RadioShowPlacement, RadioShowPlacementId>;
117
+ addRadioShowPlacements: Sequelize.HasManyAddAssociationsMixin<RadioShowPlacement, RadioShowPlacementId>;
118
+ createRadioShowPlacement: Sequelize.HasManyCreateAssociationMixin<RadioShowPlacement>;
119
+ removeRadioShowPlacement: Sequelize.HasManyRemoveAssociationMixin<RadioShowPlacement, RadioShowPlacementId>;
120
+ removeRadioShowPlacements: Sequelize.HasManyRemoveAssociationsMixin<RadioShowPlacement, RadioShowPlacementId>;
121
+ hasRadioShowPlacement: Sequelize.HasManyHasAssociationMixin<RadioShowPlacement, RadioShowPlacementId>;
122
+ hasRadioShowPlacements: Sequelize.HasManyHasAssociationsMixin<RadioShowPlacement, RadioShowPlacementId>;
123
+ countRadioShowPlacements: Sequelize.HasManyCountAssociationsMixin;
112
124
  static initModel(sequelize: Sequelize.Sequelize): typeof CanonTrack;
113
125
  }
@@ -17,10 +17,11 @@ export interface PlatformUserPlaylistAttributes {
17
17
  createDate: Date;
18
18
  updateDate: Date;
19
19
  stateId: number;
20
+ earbugAccessControlPreference: string;
20
21
  }
21
22
  export type PlatformUserPlaylistPk = "id";
22
23
  export type PlatformUserPlaylistId = PlatformUserPlaylist[PlatformUserPlaylistPk];
23
- export type PlatformUserPlaylistOptionalAttributes = "description" | "id" | "public" | "createDate" | "updateDate" | "stateId";
24
+ export type PlatformUserPlaylistOptionalAttributes = "description" | "id" | "public" | "createDate" | "updateDate" | "stateId" | "earbugAccessControlPreference";
24
25
  export type PlatformUserPlaylistCreationAttributes = Optional<PlatformUserPlaylistAttributes, PlatformUserPlaylistOptionalAttributes>;
25
26
  export declare class PlatformUserPlaylist extends Model<PlatformUserPlaylistAttributes, PlatformUserPlaylistCreationAttributes> implements PlatformUserPlaylistAttributes {
26
27
  appUserId: string;
@@ -35,6 +36,7 @@ export declare class PlatformUserPlaylist extends Model<PlatformUserPlaylistAttr
35
36
  createDate: Date;
36
37
  updateDate: Date;
37
38
  stateId: number;
39
+ earbugAccessControlPreference: string;
38
40
  appUser: AppUser;
39
41
  getAppUser: Sequelize.BelongsToGetAssociationMixin<AppUser>;
40
42
  setAppUser: Sequelize.BelongsToSetAssociationMixin<AppUser, AppUserId>;
@@ -105,6 +105,12 @@ class PlatformUserPlaylist extends sequelize_1.Model {
105
105
  key: 'id'
106
106
  },
107
107
  field: 'state_id'
108
+ },
109
+ earbugAccessControlPreference: {
110
+ type: sequelize_1.DataTypes.TEXT,
111
+ allowNull: false,
112
+ defaultValue: "PRIVATE",
113
+ field: 'earbug_access_control_preference'
108
114
  }
109
115
  }, {
110
116
  sequelize,
@@ -0,0 +1,80 @@
1
+ import * as Sequelize from 'sequelize';
2
+ import { Model, Optional } from 'sequelize';
3
+ import type { AppUser, AppUserId } from './AppUser';
4
+ import type { RadioShowGenres, RadioShowGenresId } from './RadioShowGenres';
5
+ import type { RadioShowMedia, RadioShowMediaId } from './RadioShowMedia';
6
+ import type { RadioShowPlacement, RadioShowPlacementId } from './RadioShowPlacement';
7
+ import type { RadioShowPublishRequests, RadioShowPublishRequestsId } from './RadioShowPublishRequests';
8
+ export interface RadioShowAttributes {
9
+ creatorUserId: string;
10
+ scheduledRelease?: Date;
11
+ title: string;
12
+ description?: string;
13
+ deleted?: boolean;
14
+ id: string;
15
+ createDate: Date;
16
+ updateDate: Date;
17
+ }
18
+ export type RadioShowPk = "id";
19
+ export type RadioShowId = RadioShow[RadioShowPk];
20
+ export type RadioShowOptionalAttributes = "scheduledRelease" | "description" | "deleted" | "id" | "createDate" | "updateDate";
21
+ export type RadioShowCreationAttributes = Optional<RadioShowAttributes, RadioShowOptionalAttributes>;
22
+ export declare class RadioShow extends Model<RadioShowAttributes, RadioShowCreationAttributes> implements RadioShowAttributes {
23
+ creatorUserId: string;
24
+ scheduledRelease?: Date;
25
+ title: string;
26
+ description?: string;
27
+ deleted?: boolean;
28
+ id: string;
29
+ createDate: Date;
30
+ updateDate: Date;
31
+ creatorUser: AppUser;
32
+ getCreatorUser: Sequelize.BelongsToGetAssociationMixin<AppUser>;
33
+ setCreatorUser: Sequelize.BelongsToSetAssociationMixin<AppUser, AppUserId>;
34
+ createCreatorUser: Sequelize.BelongsToCreateAssociationMixin<AppUser>;
35
+ radioShowGenres: RadioShowGenres[];
36
+ getRadioShowGenres: Sequelize.HasManyGetAssociationsMixin<RadioShowGenres>;
37
+ setRadioShowGenres: Sequelize.HasManySetAssociationsMixin<RadioShowGenres, RadioShowGenresId>;
38
+ addRadioShowGenre: Sequelize.HasManyAddAssociationMixin<RadioShowGenres, RadioShowGenresId>;
39
+ addRadioShowGenres: Sequelize.HasManyAddAssociationsMixin<RadioShowGenres, RadioShowGenresId>;
40
+ createRadioShowGenre: Sequelize.HasManyCreateAssociationMixin<RadioShowGenres>;
41
+ removeRadioShowGenre: Sequelize.HasManyRemoveAssociationMixin<RadioShowGenres, RadioShowGenresId>;
42
+ removeRadioShowGenres: Sequelize.HasManyRemoveAssociationsMixin<RadioShowGenres, RadioShowGenresId>;
43
+ hasRadioShowGenre: Sequelize.HasManyHasAssociationMixin<RadioShowGenres, RadioShowGenresId>;
44
+ hasRadioShowGenres: Sequelize.HasManyHasAssociationsMixin<RadioShowGenres, RadioShowGenresId>;
45
+ countRadioShowGenres: Sequelize.HasManyCountAssociationsMixin;
46
+ radioShowMedia: RadioShowMedia[];
47
+ getRadioShowMedia: Sequelize.HasManyGetAssociationsMixin<RadioShowMedia>;
48
+ setRadioShowMedia: Sequelize.HasManySetAssociationsMixin<RadioShowMedia, RadioShowMediaId>;
49
+ addRadioShowMedium: Sequelize.HasManyAddAssociationMixin<RadioShowMedia, RadioShowMediaId>;
50
+ addRadioShowMedia: Sequelize.HasManyAddAssociationsMixin<RadioShowMedia, RadioShowMediaId>;
51
+ createRadioShowMedium: Sequelize.HasManyCreateAssociationMixin<RadioShowMedia>;
52
+ removeRadioShowMedium: Sequelize.HasManyRemoveAssociationMixin<RadioShowMedia, RadioShowMediaId>;
53
+ removeRadioShowMedia: Sequelize.HasManyRemoveAssociationsMixin<RadioShowMedia, RadioShowMediaId>;
54
+ hasRadioShowMedium: Sequelize.HasManyHasAssociationMixin<RadioShowMedia, RadioShowMediaId>;
55
+ hasRadioShowMedia: Sequelize.HasManyHasAssociationsMixin<RadioShowMedia, RadioShowMediaId>;
56
+ countRadioShowMedia: Sequelize.HasManyCountAssociationsMixin;
57
+ radioShowPlacements: RadioShowPlacement[];
58
+ getRadioShowPlacements: Sequelize.HasManyGetAssociationsMixin<RadioShowPlacement>;
59
+ setRadioShowPlacements: Sequelize.HasManySetAssociationsMixin<RadioShowPlacement, RadioShowPlacementId>;
60
+ addRadioShowPlacement: Sequelize.HasManyAddAssociationMixin<RadioShowPlacement, RadioShowPlacementId>;
61
+ addRadioShowPlacements: Sequelize.HasManyAddAssociationsMixin<RadioShowPlacement, RadioShowPlacementId>;
62
+ createRadioShowPlacement: Sequelize.HasManyCreateAssociationMixin<RadioShowPlacement>;
63
+ removeRadioShowPlacement: Sequelize.HasManyRemoveAssociationMixin<RadioShowPlacement, RadioShowPlacementId>;
64
+ removeRadioShowPlacements: Sequelize.HasManyRemoveAssociationsMixin<RadioShowPlacement, RadioShowPlacementId>;
65
+ hasRadioShowPlacement: Sequelize.HasManyHasAssociationMixin<RadioShowPlacement, RadioShowPlacementId>;
66
+ hasRadioShowPlacements: Sequelize.HasManyHasAssociationsMixin<RadioShowPlacement, RadioShowPlacementId>;
67
+ countRadioShowPlacements: Sequelize.HasManyCountAssociationsMixin;
68
+ radioShowPublishRequests: RadioShowPublishRequests[];
69
+ getRadioShowPublishRequests: Sequelize.HasManyGetAssociationsMixin<RadioShowPublishRequests>;
70
+ setRadioShowPublishRequests: Sequelize.HasManySetAssociationsMixin<RadioShowPublishRequests, RadioShowPublishRequestsId>;
71
+ addRadioShowPublishRequest: Sequelize.HasManyAddAssociationMixin<RadioShowPublishRequests, RadioShowPublishRequestsId>;
72
+ addRadioShowPublishRequests: Sequelize.HasManyAddAssociationsMixin<RadioShowPublishRequests, RadioShowPublishRequestsId>;
73
+ createRadioShowPublishRequest: Sequelize.HasManyCreateAssociationMixin<RadioShowPublishRequests>;
74
+ removeRadioShowPublishRequest: Sequelize.HasManyRemoveAssociationMixin<RadioShowPublishRequests, RadioShowPublishRequestsId>;
75
+ removeRadioShowPublishRequests: Sequelize.HasManyRemoveAssociationsMixin<RadioShowPublishRequests, RadioShowPublishRequestsId>;
76
+ hasRadioShowPublishRequest: Sequelize.HasManyHasAssociationMixin<RadioShowPublishRequests, RadioShowPublishRequestsId>;
77
+ hasRadioShowPublishRequests: Sequelize.HasManyHasAssociationsMixin<RadioShowPublishRequests, RadioShowPublishRequestsId>;
78
+ countRadioShowPublishRequests: Sequelize.HasManyCountAssociationsMixin;
79
+ static initModel(sequelize: Sequelize.Sequelize): typeof RadioShow;
80
+ }
@@ -0,0 +1,93 @@
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.RadioShow = void 0;
27
+ const Sequelize = __importStar(require("sequelize"));
28
+ const sequelize_1 = require("sequelize");
29
+ class RadioShow extends sequelize_1.Model {
30
+ static initModel(sequelize) {
31
+ return RadioShow.init({
32
+ creatorUserId: {
33
+ type: sequelize_1.DataTypes.UUID,
34
+ allowNull: false,
35
+ references: {
36
+ model: 'app_user',
37
+ key: 'id'
38
+ },
39
+ field: 'creator_user_id'
40
+ },
41
+ scheduledRelease: {
42
+ type: sequelize_1.DataTypes.DATE,
43
+ allowNull: true,
44
+ field: 'scheduled_release'
45
+ },
46
+ title: {
47
+ type: sequelize_1.DataTypes.STRING(40),
48
+ allowNull: false
49
+ },
50
+ description: {
51
+ type: sequelize_1.DataTypes.STRING(512),
52
+ allowNull: true
53
+ },
54
+ deleted: {
55
+ type: sequelize_1.DataTypes.BOOLEAN,
56
+ allowNull: true
57
+ },
58
+ id: {
59
+ type: sequelize_1.DataTypes.UUID,
60
+ allowNull: false,
61
+ defaultValue: sequelize_1.DataTypes.UUIDV4,
62
+ primaryKey: true
63
+ },
64
+ createDate: {
65
+ type: sequelize_1.DataTypes.DATE,
66
+ allowNull: false,
67
+ defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
68
+ field: 'create_date'
69
+ },
70
+ updateDate: {
71
+ type: sequelize_1.DataTypes.DATE,
72
+ allowNull: false,
73
+ defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
74
+ field: 'update_date'
75
+ }
76
+ }, {
77
+ sequelize,
78
+ tableName: 'radio_show',
79
+ schema: 'eb',
80
+ timestamps: false,
81
+ indexes: [
82
+ {
83
+ name: "radio_show_pkey",
84
+ unique: true,
85
+ fields: [
86
+ { name: "id" },
87
+ ]
88
+ },
89
+ ]
90
+ });
91
+ }
92
+ }
93
+ exports.RadioShow = RadioShow;
@@ -0,0 +1,29 @@
1
+ import * as Sequelize from 'sequelize';
2
+ import { Model, Optional } from 'sequelize';
3
+ import type { CanonGenre, CanonGenreId } from './CanonGenre';
4
+ import type { RadioShow, RadioShowId } from './RadioShow';
5
+ export interface RadioShowGenresAttributes {
6
+ canonGenreId: string;
7
+ radioShowId: string;
8
+ title: string;
9
+ id: string;
10
+ }
11
+ export type RadioShowGenresPk = "id";
12
+ export type RadioShowGenresId = RadioShowGenres[RadioShowGenresPk];
13
+ export type RadioShowGenresOptionalAttributes = "id";
14
+ export type RadioShowGenresCreationAttributes = Optional<RadioShowGenresAttributes, RadioShowGenresOptionalAttributes>;
15
+ export declare class RadioShowGenres extends Model<RadioShowGenresAttributes, RadioShowGenresCreationAttributes> implements RadioShowGenresAttributes {
16
+ canonGenreId: string;
17
+ radioShowId: string;
18
+ title: string;
19
+ id: string;
20
+ canonGenre: CanonGenre;
21
+ getCanonGenre: Sequelize.BelongsToGetAssociationMixin<CanonGenre>;
22
+ setCanonGenre: Sequelize.BelongsToSetAssociationMixin<CanonGenre, CanonGenreId>;
23
+ createCanonGenre: Sequelize.BelongsToCreateAssociationMixin<CanonGenre>;
24
+ radioShow: RadioShow;
25
+ getRadioShow: Sequelize.BelongsToGetAssociationMixin<RadioShow>;
26
+ setRadioShow: Sequelize.BelongsToSetAssociationMixin<RadioShow, RadioShowId>;
27
+ createRadioShow: Sequelize.BelongsToCreateAssociationMixin<RadioShow>;
28
+ static initModel(sequelize: Sequelize.Sequelize): typeof RadioShowGenres;
29
+ }
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RadioShowGenres = void 0;
4
+ const sequelize_1 = require("sequelize");
5
+ class RadioShowGenres extends sequelize_1.Model {
6
+ static initModel(sequelize) {
7
+ return RadioShowGenres.init({
8
+ canonGenreId: {
9
+ type: sequelize_1.DataTypes.UUID,
10
+ allowNull: false,
11
+ references: {
12
+ model: 'canon_genre',
13
+ key: 'id'
14
+ },
15
+ field: 'canon_genre_id'
16
+ },
17
+ radioShowId: {
18
+ type: sequelize_1.DataTypes.UUID,
19
+ allowNull: false,
20
+ references: {
21
+ model: 'radio_show',
22
+ key: 'id'
23
+ },
24
+ field: 'radio_show_id'
25
+ },
26
+ title: {
27
+ type: sequelize_1.DataTypes.STRING(40),
28
+ allowNull: false
29
+ },
30
+ id: {
31
+ type: sequelize_1.DataTypes.UUID,
32
+ allowNull: false,
33
+ defaultValue: sequelize_1.DataTypes.UUIDV4,
34
+ primaryKey: true
35
+ }
36
+ }, {
37
+ sequelize,
38
+ tableName: 'radio_show_genres',
39
+ schema: 'eb',
40
+ timestamps: false,
41
+ indexes: [
42
+ {
43
+ name: "radio_show_genres_pkey",
44
+ unique: true,
45
+ fields: [
46
+ { name: "id" },
47
+ ]
48
+ },
49
+ ]
50
+ });
51
+ }
52
+ }
53
+ exports.RadioShowGenres = RadioShowGenres;
@@ -0,0 +1,30 @@
1
+ import * as Sequelize from 'sequelize';
2
+ import { Model, Optional } from 'sequelize';
3
+ import type { RadioShow, RadioShowId } from './RadioShow';
4
+ export interface RadioShowMediaAttributes {
5
+ radioShowId: string;
6
+ originalMediaType?: number;
7
+ s3VideoUrl?: string;
8
+ s3AudioUrl: string;
9
+ approved?: boolean;
10
+ id: string;
11
+ createDate: Date;
12
+ }
13
+ export type RadioShowMediaPk = "id";
14
+ export type RadioShowMediaId = RadioShowMedia[RadioShowMediaPk];
15
+ export type RadioShowMediaOptionalAttributes = "originalMediaType" | "s3VideoUrl" | "approved" | "id" | "createDate";
16
+ export type RadioShowMediaCreationAttributes = Optional<RadioShowMediaAttributes, RadioShowMediaOptionalAttributes>;
17
+ export declare class RadioShowMedia extends Model<RadioShowMediaAttributes, RadioShowMediaCreationAttributes> implements RadioShowMediaAttributes {
18
+ radioShowId: string;
19
+ originalMediaType?: number;
20
+ s3VideoUrl?: string;
21
+ s3AudioUrl: string;
22
+ approved?: boolean;
23
+ id: string;
24
+ createDate: Date;
25
+ radioShow: RadioShow;
26
+ getRadioShow: Sequelize.BelongsToGetAssociationMixin<RadioShow>;
27
+ setRadioShow: Sequelize.BelongsToSetAssociationMixin<RadioShow, RadioShowId>;
28
+ createRadioShow: Sequelize.BelongsToCreateAssociationMixin<RadioShow>;
29
+ static initModel(sequelize: Sequelize.Sequelize): typeof RadioShowMedia;
30
+ }
@@ -0,0 +1,89 @@
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.RadioShowMedia = void 0;
27
+ const Sequelize = __importStar(require("sequelize"));
28
+ const sequelize_1 = require("sequelize");
29
+ class RadioShowMedia extends sequelize_1.Model {
30
+ static initModel(sequelize) {
31
+ return RadioShowMedia.init({
32
+ radioShowId: {
33
+ type: sequelize_1.DataTypes.UUID,
34
+ allowNull: false,
35
+ references: {
36
+ model: 'radio_show',
37
+ key: 'id'
38
+ },
39
+ field: 'radio_show_id'
40
+ },
41
+ originalMediaType: {
42
+ type: sequelize_1.DataTypes.INTEGER,
43
+ allowNull: true,
44
+ field: 'original_media_type'
45
+ },
46
+ s3VideoUrl: {
47
+ type: sequelize_1.DataTypes.TEXT,
48
+ allowNull: true,
49
+ field: 's3_video_url'
50
+ },
51
+ s3AudioUrl: {
52
+ type: sequelize_1.DataTypes.TEXT,
53
+ allowNull: false,
54
+ field: 's3_audio_url'
55
+ },
56
+ approved: {
57
+ type: sequelize_1.DataTypes.BOOLEAN,
58
+ allowNull: true
59
+ },
60
+ id: {
61
+ type: sequelize_1.DataTypes.UUID,
62
+ allowNull: false,
63
+ defaultValue: sequelize_1.DataTypes.UUIDV4,
64
+ primaryKey: true
65
+ },
66
+ createDate: {
67
+ type: sequelize_1.DataTypes.DATE,
68
+ allowNull: false,
69
+ defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
70
+ field: 'create_date'
71
+ }
72
+ }, {
73
+ sequelize,
74
+ tableName: 'radio_show_media',
75
+ schema: 'eb',
76
+ timestamps: false,
77
+ indexes: [
78
+ {
79
+ name: "radio_show_media_pkey",
80
+ unique: true,
81
+ fields: [
82
+ { name: "id" },
83
+ ]
84
+ },
85
+ ]
86
+ });
87
+ }
88
+ }
89
+ exports.RadioShowMedia = RadioShowMedia;
@@ -0,0 +1,35 @@
1
+ import * as Sequelize from 'sequelize';
2
+ import { Model, Optional } from 'sequelize';
3
+ import type { CanonTrack, CanonTrackId } from './CanonTrack';
4
+ import type { RadioShow, RadioShowId } from './RadioShow';
5
+ export interface RadioShowPlacementAttributes {
6
+ radioShowId: string;
7
+ canonTrackId?: string;
8
+ radioShowMediaId?: string;
9
+ seqNum: number;
10
+ startTime?: string;
11
+ endTime?: string;
12
+ id: string;
13
+ }
14
+ export type RadioShowPlacementPk = "id";
15
+ export type RadioShowPlacementId = RadioShowPlacement[RadioShowPlacementPk];
16
+ export type RadioShowPlacementOptionalAttributes = "canonTrackId" | "radioShowMediaId" | "startTime" | "endTime" | "id";
17
+ export type RadioShowPlacementCreationAttributes = Optional<RadioShowPlacementAttributes, RadioShowPlacementOptionalAttributes>;
18
+ export declare class RadioShowPlacement extends Model<RadioShowPlacementAttributes, RadioShowPlacementCreationAttributes> implements RadioShowPlacementAttributes {
19
+ radioShowId: string;
20
+ canonTrackId?: string;
21
+ radioShowMediaId?: string;
22
+ seqNum: number;
23
+ startTime?: string;
24
+ endTime?: string;
25
+ id: string;
26
+ canonTrack: CanonTrack;
27
+ getCanonTrack: Sequelize.BelongsToGetAssociationMixin<CanonTrack>;
28
+ setCanonTrack: Sequelize.BelongsToSetAssociationMixin<CanonTrack, CanonTrackId>;
29
+ createCanonTrack: Sequelize.BelongsToCreateAssociationMixin<CanonTrack>;
30
+ radioShow: RadioShow;
31
+ getRadioShow: Sequelize.BelongsToGetAssociationMixin<RadioShow>;
32
+ setRadioShow: Sequelize.BelongsToSetAssociationMixin<RadioShow, RadioShowId>;
33
+ createRadioShow: Sequelize.BelongsToCreateAssociationMixin<RadioShow>;
34
+ static initModel(sequelize: Sequelize.Sequelize): typeof RadioShowPlacement;
35
+ }