@earbug/db-models 0.0.21 → 0.0.23
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.
- package/dist/AffinityRelationshipType.d.ts +35 -0
- package/dist/AffinityRelationshipType.js +87 -0
- package/dist/AppUser.d.ts +24 -0
- package/dist/FeedConfig.d.ts +19 -0
- package/dist/FeedConfig.js +73 -0
- package/dist/FeedContentType.d.ts +43 -0
- package/dist/FeedContentType.js +107 -0
- package/dist/UserAffinity.d.ts +33 -0
- package/dist/UserAffinity.js +109 -0
- package/dist/UserEngagementFactor.d.ts +33 -0
- package/dist/UserEngagementFactor.js +101 -0
- package/dist/init-models.d.ts +17 -2
- package/dist/init-models.js +30 -2
- package/models/AffinityRelationshipType.ts +96 -0
- package/models/AppUser.ts +26 -0
- package/models/FeedConfig.ts +65 -0
- package/models/FeedContentType.ts +124 -0
- package/models/UserAffinity.ts +117 -0
- package/models/UserEngagementFactor.ts +109 -0
- package/models/init-models.ts +43 -0
- package/package.json +1 -1
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { Model, Optional } from 'sequelize';
|
|
3
|
+
import type { UserAffinity, UserAffinityId } from './UserAffinity';
|
|
4
|
+
export interface AffinityRelationshipTypeAttributes {
|
|
5
|
+
name: string;
|
|
6
|
+
category: string;
|
|
7
|
+
tier: string;
|
|
8
|
+
id: string;
|
|
9
|
+
createDate?: Date;
|
|
10
|
+
updateDate?: Date;
|
|
11
|
+
}
|
|
12
|
+
export type AffinityRelationshipTypePk = "id";
|
|
13
|
+
export type AffinityRelationshipTypeId = AffinityRelationshipType[AffinityRelationshipTypePk];
|
|
14
|
+
export type AffinityRelationshipTypeOptionalAttributes = "id" | "createDate" | "updateDate";
|
|
15
|
+
export type AffinityRelationshipTypeCreationAttributes = Optional<AffinityRelationshipTypeAttributes, AffinityRelationshipTypeOptionalAttributes>;
|
|
16
|
+
export declare class AffinityRelationshipType extends Model<AffinityRelationshipTypeAttributes, AffinityRelationshipTypeCreationAttributes> implements AffinityRelationshipTypeAttributes {
|
|
17
|
+
name: string;
|
|
18
|
+
category: string;
|
|
19
|
+
tier: string;
|
|
20
|
+
id: string;
|
|
21
|
+
createDate?: Date;
|
|
22
|
+
updateDate?: Date;
|
|
23
|
+
userAffinities: UserAffinity[];
|
|
24
|
+
getUserAffinities: Sequelize.HasManyGetAssociationsMixin<UserAffinity>;
|
|
25
|
+
setUserAffinities: Sequelize.HasManySetAssociationsMixin<UserAffinity, UserAffinityId>;
|
|
26
|
+
addUserAffinity: Sequelize.HasManyAddAssociationMixin<UserAffinity, UserAffinityId>;
|
|
27
|
+
addUserAffinities: Sequelize.HasManyAddAssociationsMixin<UserAffinity, UserAffinityId>;
|
|
28
|
+
createUserAffinity: Sequelize.HasManyCreateAssociationMixin<UserAffinity>;
|
|
29
|
+
removeUserAffinity: Sequelize.HasManyRemoveAssociationMixin<UserAffinity, UserAffinityId>;
|
|
30
|
+
removeUserAffinities: Sequelize.HasManyRemoveAssociationsMixin<UserAffinity, UserAffinityId>;
|
|
31
|
+
hasUserAffinity: Sequelize.HasManyHasAssociationMixin<UserAffinity, UserAffinityId>;
|
|
32
|
+
hasUserAffinities: Sequelize.HasManyHasAssociationsMixin<UserAffinity, UserAffinityId>;
|
|
33
|
+
countUserAffinities: Sequelize.HasManyCountAssociationsMixin;
|
|
34
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof AffinityRelationshipType;
|
|
35
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
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.AffinityRelationshipType = void 0;
|
|
27
|
+
const Sequelize = __importStar(require("sequelize"));
|
|
28
|
+
const sequelize_1 = require("sequelize");
|
|
29
|
+
class AffinityRelationshipType extends sequelize_1.Model {
|
|
30
|
+
static initModel(sequelize) {
|
|
31
|
+
return AffinityRelationshipType.init({
|
|
32
|
+
name: {
|
|
33
|
+
type: sequelize_1.DataTypes.STRING(50),
|
|
34
|
+
allowNull: false,
|
|
35
|
+
unique: "affinity_relationship_type_name_unique"
|
|
36
|
+
},
|
|
37
|
+
category: {
|
|
38
|
+
type: sequelize_1.DataTypes.STRING(20),
|
|
39
|
+
allowNull: false
|
|
40
|
+
},
|
|
41
|
+
tier: {
|
|
42
|
+
type: sequelize_1.DataTypes.STRING(20),
|
|
43
|
+
allowNull: false
|
|
44
|
+
},
|
|
45
|
+
id: {
|
|
46
|
+
type: sequelize_1.DataTypes.UUID,
|
|
47
|
+
allowNull: false,
|
|
48
|
+
defaultValue: sequelize_1.DataTypes.UUIDV4,
|
|
49
|
+
primaryKey: true
|
|
50
|
+
},
|
|
51
|
+
createDate: {
|
|
52
|
+
type: sequelize_1.DataTypes.DATE,
|
|
53
|
+
allowNull: true,
|
|
54
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
55
|
+
field: 'create_date'
|
|
56
|
+
},
|
|
57
|
+
updateDate: {
|
|
58
|
+
type: sequelize_1.DataTypes.DATE,
|
|
59
|
+
allowNull: true,
|
|
60
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
61
|
+
field: 'update_date'
|
|
62
|
+
}
|
|
63
|
+
}, {
|
|
64
|
+
sequelize,
|
|
65
|
+
tableName: 'affinity_relationship_type',
|
|
66
|
+
schema: 'eb',
|
|
67
|
+
timestamps: false,
|
|
68
|
+
indexes: [
|
|
69
|
+
{
|
|
70
|
+
name: "affinity_relationship_type_name_unique",
|
|
71
|
+
unique: true,
|
|
72
|
+
fields: [
|
|
73
|
+
{ name: "name" },
|
|
74
|
+
]
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
name: "affinity_relationship_type_pkey",
|
|
78
|
+
unique: true,
|
|
79
|
+
fields: [
|
|
80
|
+
{ name: "id" },
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
]
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
exports.AffinityRelationshipType = AffinityRelationshipType;
|
package/dist/AppUser.d.ts
CHANGED
|
@@ -11,8 +11,10 @@ import type { PlatformUserAlbum, PlatformUserAlbumId } from './PlatformUserAlbum
|
|
|
11
11
|
import type { PlatformUserPlaylist, PlatformUserPlaylistId } from './PlatformUserPlaylist';
|
|
12
12
|
import type { RadioShow, RadioShowId } from './RadioShow';
|
|
13
13
|
import type { State, StateId } from './State';
|
|
14
|
+
import type { UserAffinity, UserAffinityId } from './UserAffinity';
|
|
14
15
|
import type { UserComments, UserCommentsId } from './UserComments';
|
|
15
16
|
import type { UserContacts, UserContactsId } from './UserContacts';
|
|
17
|
+
import type { UserEngagementFactor, UserEngagementFactorId } from './UserEngagementFactor';
|
|
16
18
|
import type { UserLikes, UserLikesId } from './UserLikes';
|
|
17
19
|
export interface AppUserAttributes {
|
|
18
20
|
email: string;
|
|
@@ -181,6 +183,17 @@ export declare class AppUser extends Model<AppUserAttributes, AppUserCreationAtt
|
|
|
181
183
|
hasRadioShow: Sequelize.HasManyHasAssociationMixin<RadioShow, RadioShowId>;
|
|
182
184
|
hasRadioShows: Sequelize.HasManyHasAssociationsMixin<RadioShow, RadioShowId>;
|
|
183
185
|
countRadioShows: Sequelize.HasManyCountAssociationsMixin;
|
|
186
|
+
userAffinities: UserAffinity[];
|
|
187
|
+
getUserAffinities: Sequelize.HasManyGetAssociationsMixin<UserAffinity>;
|
|
188
|
+
setUserAffinities: Sequelize.HasManySetAssociationsMixin<UserAffinity, UserAffinityId>;
|
|
189
|
+
addUserAffinity: Sequelize.HasManyAddAssociationMixin<UserAffinity, UserAffinityId>;
|
|
190
|
+
addUserAffinities: Sequelize.HasManyAddAssociationsMixin<UserAffinity, UserAffinityId>;
|
|
191
|
+
createUserAffinity: Sequelize.HasManyCreateAssociationMixin<UserAffinity>;
|
|
192
|
+
removeUserAffinity: Sequelize.HasManyRemoveAssociationMixin<UserAffinity, UserAffinityId>;
|
|
193
|
+
removeUserAffinities: Sequelize.HasManyRemoveAssociationsMixin<UserAffinity, UserAffinityId>;
|
|
194
|
+
hasUserAffinity: Sequelize.HasManyHasAssociationMixin<UserAffinity, UserAffinityId>;
|
|
195
|
+
hasUserAffinities: Sequelize.HasManyHasAssociationsMixin<UserAffinity, UserAffinityId>;
|
|
196
|
+
countUserAffinities: Sequelize.HasManyCountAssociationsMixin;
|
|
184
197
|
userComments: UserComments[];
|
|
185
198
|
getUserComments: Sequelize.HasManyGetAssociationsMixin<UserComments>;
|
|
186
199
|
setUserComments: Sequelize.HasManySetAssociationsMixin<UserComments, UserCommentsId>;
|
|
@@ -203,6 +216,17 @@ export declare class AppUser extends Model<AppUserAttributes, AppUserCreationAtt
|
|
|
203
216
|
hasUserContact: Sequelize.HasManyHasAssociationMixin<UserContacts, UserContactsId>;
|
|
204
217
|
hasUserContacts: Sequelize.HasManyHasAssociationsMixin<UserContacts, UserContactsId>;
|
|
205
218
|
countUserContacts: Sequelize.HasManyCountAssociationsMixin;
|
|
219
|
+
userEngagementFactors: UserEngagementFactor[];
|
|
220
|
+
getUserEngagementFactors: Sequelize.HasManyGetAssociationsMixin<UserEngagementFactor>;
|
|
221
|
+
setUserEngagementFactors: Sequelize.HasManySetAssociationsMixin<UserEngagementFactor, UserEngagementFactorId>;
|
|
222
|
+
addUserEngagementFactor: Sequelize.HasManyAddAssociationMixin<UserEngagementFactor, UserEngagementFactorId>;
|
|
223
|
+
addUserEngagementFactors: Sequelize.HasManyAddAssociationsMixin<UserEngagementFactor, UserEngagementFactorId>;
|
|
224
|
+
createUserEngagementFactor: Sequelize.HasManyCreateAssociationMixin<UserEngagementFactor>;
|
|
225
|
+
removeUserEngagementFactor: Sequelize.HasManyRemoveAssociationMixin<UserEngagementFactor, UserEngagementFactorId>;
|
|
226
|
+
removeUserEngagementFactors: Sequelize.HasManyRemoveAssociationsMixin<UserEngagementFactor, UserEngagementFactorId>;
|
|
227
|
+
hasUserEngagementFactor: Sequelize.HasManyHasAssociationMixin<UserEngagementFactor, UserEngagementFactorId>;
|
|
228
|
+
hasUserEngagementFactors: Sequelize.HasManyHasAssociationsMixin<UserEngagementFactor, UserEngagementFactorId>;
|
|
229
|
+
countUserEngagementFactors: Sequelize.HasManyCountAssociationsMixin;
|
|
206
230
|
userLikes: UserLikes[];
|
|
207
231
|
getUserLikes: Sequelize.HasManyGetAssociationsMixin<UserLikes>;
|
|
208
232
|
setUserLikes: Sequelize.HasManySetAssociationsMixin<UserLikes, UserLikesId>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { Model, Optional } from 'sequelize';
|
|
3
|
+
export interface FeedConfigAttributes {
|
|
4
|
+
id: string;
|
|
5
|
+
resultsCount: number;
|
|
6
|
+
createDate?: Date;
|
|
7
|
+
updateDate?: Date;
|
|
8
|
+
}
|
|
9
|
+
export type FeedConfigPk = "id";
|
|
10
|
+
export type FeedConfigId = FeedConfig[FeedConfigPk];
|
|
11
|
+
export type FeedConfigOptionalAttributes = "id" | "resultsCount" | "createDate" | "updateDate";
|
|
12
|
+
export type FeedConfigCreationAttributes = Optional<FeedConfigAttributes, FeedConfigOptionalAttributes>;
|
|
13
|
+
export declare class FeedConfig extends Model<FeedConfigAttributes, FeedConfigCreationAttributes> implements FeedConfigAttributes {
|
|
14
|
+
id: string;
|
|
15
|
+
resultsCount: number;
|
|
16
|
+
createDate?: Date;
|
|
17
|
+
updateDate?: Date;
|
|
18
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof FeedConfig;
|
|
19
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
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.FeedConfig = void 0;
|
|
27
|
+
const Sequelize = __importStar(require("sequelize"));
|
|
28
|
+
const sequelize_1 = require("sequelize");
|
|
29
|
+
class FeedConfig extends sequelize_1.Model {
|
|
30
|
+
static initModel(sequelize) {
|
|
31
|
+
return FeedConfig.init({
|
|
32
|
+
id: {
|
|
33
|
+
type: sequelize_1.DataTypes.UUID,
|
|
34
|
+
allowNull: false,
|
|
35
|
+
defaultValue: sequelize_1.DataTypes.UUIDV4,
|
|
36
|
+
primaryKey: true
|
|
37
|
+
},
|
|
38
|
+
resultsCount: {
|
|
39
|
+
type: sequelize_1.DataTypes.INTEGER,
|
|
40
|
+
allowNull: false,
|
|
41
|
+
defaultValue: 100,
|
|
42
|
+
field: 'results_count'
|
|
43
|
+
},
|
|
44
|
+
createDate: {
|
|
45
|
+
type: sequelize_1.DataTypes.DATE,
|
|
46
|
+
allowNull: true,
|
|
47
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
48
|
+
field: 'create_date'
|
|
49
|
+
},
|
|
50
|
+
updateDate: {
|
|
51
|
+
type: sequelize_1.DataTypes.DATE,
|
|
52
|
+
allowNull: true,
|
|
53
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
54
|
+
field: 'update_date'
|
|
55
|
+
}
|
|
56
|
+
}, {
|
|
57
|
+
sequelize,
|
|
58
|
+
tableName: 'feed_config',
|
|
59
|
+
schema: 'eb',
|
|
60
|
+
timestamps: false,
|
|
61
|
+
indexes: [
|
|
62
|
+
{
|
|
63
|
+
name: "feed_config_pkey",
|
|
64
|
+
unique: true,
|
|
65
|
+
fields: [
|
|
66
|
+
{ name: "id" },
|
|
67
|
+
]
|
|
68
|
+
},
|
|
69
|
+
]
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
exports.FeedConfig = FeedConfig;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { Model, Optional } from 'sequelize';
|
|
3
|
+
import type { UserEngagementFactor, UserEngagementFactorId } from './UserEngagementFactor';
|
|
4
|
+
export interface FeedContentTypeAttributes {
|
|
5
|
+
name: string;
|
|
6
|
+
id: string;
|
|
7
|
+
mixPercentage: number;
|
|
8
|
+
affinityMixHigh: number;
|
|
9
|
+
affinityMixMedium: number;
|
|
10
|
+
affinityMixLow: number;
|
|
11
|
+
apiEndpoint?: string;
|
|
12
|
+
isActive: boolean;
|
|
13
|
+
createDate?: Date;
|
|
14
|
+
updateDate?: Date;
|
|
15
|
+
}
|
|
16
|
+
export type FeedContentTypePk = "id";
|
|
17
|
+
export type FeedContentTypeId = FeedContentType[FeedContentTypePk];
|
|
18
|
+
export type FeedContentTypeOptionalAttributes = "id" | "mixPercentage" | "affinityMixHigh" | "affinityMixMedium" | "affinityMixLow" | "apiEndpoint" | "isActive" | "createDate" | "updateDate";
|
|
19
|
+
export type FeedContentTypeCreationAttributes = Optional<FeedContentTypeAttributes, FeedContentTypeOptionalAttributes>;
|
|
20
|
+
export declare class FeedContentType extends Model<FeedContentTypeAttributes, FeedContentTypeCreationAttributes> implements FeedContentTypeAttributes {
|
|
21
|
+
name: string;
|
|
22
|
+
id: string;
|
|
23
|
+
mixPercentage: number;
|
|
24
|
+
affinityMixHigh: number;
|
|
25
|
+
affinityMixMedium: number;
|
|
26
|
+
affinityMixLow: number;
|
|
27
|
+
apiEndpoint?: string;
|
|
28
|
+
isActive: boolean;
|
|
29
|
+
createDate?: Date;
|
|
30
|
+
updateDate?: Date;
|
|
31
|
+
userEngagementFactors: UserEngagementFactor[];
|
|
32
|
+
getUserEngagementFactors: Sequelize.HasManyGetAssociationsMixin<UserEngagementFactor>;
|
|
33
|
+
setUserEngagementFactors: Sequelize.HasManySetAssociationsMixin<UserEngagementFactor, UserEngagementFactorId>;
|
|
34
|
+
addUserEngagementFactor: Sequelize.HasManyAddAssociationMixin<UserEngagementFactor, UserEngagementFactorId>;
|
|
35
|
+
addUserEngagementFactors: Sequelize.HasManyAddAssociationsMixin<UserEngagementFactor, UserEngagementFactorId>;
|
|
36
|
+
createUserEngagementFactor: Sequelize.HasManyCreateAssociationMixin<UserEngagementFactor>;
|
|
37
|
+
removeUserEngagementFactor: Sequelize.HasManyRemoveAssociationMixin<UserEngagementFactor, UserEngagementFactorId>;
|
|
38
|
+
removeUserEngagementFactors: Sequelize.HasManyRemoveAssociationsMixin<UserEngagementFactor, UserEngagementFactorId>;
|
|
39
|
+
hasUserEngagementFactor: Sequelize.HasManyHasAssociationMixin<UserEngagementFactor, UserEngagementFactorId>;
|
|
40
|
+
hasUserEngagementFactors: Sequelize.HasManyHasAssociationsMixin<UserEngagementFactor, UserEngagementFactorId>;
|
|
41
|
+
countUserEngagementFactors: Sequelize.HasManyCountAssociationsMixin;
|
|
42
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof FeedContentType;
|
|
43
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
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.FeedContentType = void 0;
|
|
27
|
+
const Sequelize = __importStar(require("sequelize"));
|
|
28
|
+
const sequelize_1 = require("sequelize");
|
|
29
|
+
class FeedContentType extends sequelize_1.Model {
|
|
30
|
+
static initModel(sequelize) {
|
|
31
|
+
return FeedContentType.init({
|
|
32
|
+
name: {
|
|
33
|
+
type: sequelize_1.DataTypes.STRING(50),
|
|
34
|
+
allowNull: false
|
|
35
|
+
},
|
|
36
|
+
id: {
|
|
37
|
+
type: sequelize_1.DataTypes.UUID,
|
|
38
|
+
allowNull: false,
|
|
39
|
+
defaultValue: sequelize_1.DataTypes.UUIDV4,
|
|
40
|
+
primaryKey: true
|
|
41
|
+
},
|
|
42
|
+
mixPercentage: {
|
|
43
|
+
type: sequelize_1.DataTypes.DECIMAL,
|
|
44
|
+
allowNull: false,
|
|
45
|
+
defaultValue: 20,
|
|
46
|
+
field: 'mix_percentage'
|
|
47
|
+
},
|
|
48
|
+
affinityMixHigh: {
|
|
49
|
+
type: sequelize_1.DataTypes.DECIMAL,
|
|
50
|
+
allowNull: false,
|
|
51
|
+
defaultValue: 30,
|
|
52
|
+
field: 'affinity_mix_high'
|
|
53
|
+
},
|
|
54
|
+
affinityMixMedium: {
|
|
55
|
+
type: sequelize_1.DataTypes.DECIMAL,
|
|
56
|
+
allowNull: false,
|
|
57
|
+
defaultValue: 50,
|
|
58
|
+
field: 'affinity_mix_medium'
|
|
59
|
+
},
|
|
60
|
+
affinityMixLow: {
|
|
61
|
+
type: sequelize_1.DataTypes.DECIMAL,
|
|
62
|
+
allowNull: false,
|
|
63
|
+
defaultValue: 20,
|
|
64
|
+
field: 'affinity_mix_low'
|
|
65
|
+
},
|
|
66
|
+
apiEndpoint: {
|
|
67
|
+
type: sequelize_1.DataTypes.STRING(255),
|
|
68
|
+
allowNull: true,
|
|
69
|
+
defaultValue: "",
|
|
70
|
+
field: 'api_endpoint'
|
|
71
|
+
},
|
|
72
|
+
isActive: {
|
|
73
|
+
type: sequelize_1.DataTypes.BOOLEAN,
|
|
74
|
+
allowNull: false,
|
|
75
|
+
defaultValue: true,
|
|
76
|
+
field: 'is_active'
|
|
77
|
+
},
|
|
78
|
+
createDate: {
|
|
79
|
+
type: sequelize_1.DataTypes.DATE,
|
|
80
|
+
allowNull: true,
|
|
81
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
82
|
+
field: 'create_date'
|
|
83
|
+
},
|
|
84
|
+
updateDate: {
|
|
85
|
+
type: sequelize_1.DataTypes.DATE,
|
|
86
|
+
allowNull: true,
|
|
87
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
88
|
+
field: 'update_date'
|
|
89
|
+
}
|
|
90
|
+
}, {
|
|
91
|
+
sequelize,
|
|
92
|
+
tableName: 'feed_content_type',
|
|
93
|
+
schema: 'eb',
|
|
94
|
+
timestamps: false,
|
|
95
|
+
indexes: [
|
|
96
|
+
{
|
|
97
|
+
name: "feed_content_type_pkey",
|
|
98
|
+
unique: true,
|
|
99
|
+
fields: [
|
|
100
|
+
{ name: "id" },
|
|
101
|
+
]
|
|
102
|
+
},
|
|
103
|
+
]
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
exports.FeedContentType = FeedContentType;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { Model, Optional } from 'sequelize';
|
|
3
|
+
import type { AffinityRelationshipType, AffinityRelationshipTypeId } from './AffinityRelationshipType';
|
|
4
|
+
import type { AppUser, AppUserId } from './AppUser';
|
|
5
|
+
export interface UserAffinityAttributes {
|
|
6
|
+
userId: string;
|
|
7
|
+
affinityRelationshipTypeId: string;
|
|
8
|
+
relatedId: string;
|
|
9
|
+
id: string;
|
|
10
|
+
createDate?: Date;
|
|
11
|
+
updateDate?: Date;
|
|
12
|
+
}
|
|
13
|
+
export type UserAffinityPk = "id";
|
|
14
|
+
export type UserAffinityId = UserAffinity[UserAffinityPk];
|
|
15
|
+
export type UserAffinityOptionalAttributes = "id" | "createDate" | "updateDate";
|
|
16
|
+
export type UserAffinityCreationAttributes = Optional<UserAffinityAttributes, UserAffinityOptionalAttributes>;
|
|
17
|
+
export declare class UserAffinity extends Model<UserAffinityAttributes, UserAffinityCreationAttributes> implements UserAffinityAttributes {
|
|
18
|
+
userId: string;
|
|
19
|
+
affinityRelationshipTypeId: string;
|
|
20
|
+
relatedId: string;
|
|
21
|
+
id: string;
|
|
22
|
+
createDate?: Date;
|
|
23
|
+
updateDate?: Date;
|
|
24
|
+
affinityRelationshipType: AffinityRelationshipType;
|
|
25
|
+
getAffinityRelationshipType: Sequelize.BelongsToGetAssociationMixin<AffinityRelationshipType>;
|
|
26
|
+
setAffinityRelationshipType: Sequelize.BelongsToSetAssociationMixin<AffinityRelationshipType, AffinityRelationshipTypeId>;
|
|
27
|
+
createAffinityRelationshipType: Sequelize.BelongsToCreateAssociationMixin<AffinityRelationshipType>;
|
|
28
|
+
user: AppUser;
|
|
29
|
+
getUser: Sequelize.BelongsToGetAssociationMixin<AppUser>;
|
|
30
|
+
setUser: Sequelize.BelongsToSetAssociationMixin<AppUser, AppUserId>;
|
|
31
|
+
createUser: Sequelize.BelongsToCreateAssociationMixin<AppUser>;
|
|
32
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof UserAffinity;
|
|
33
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
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.UserAffinity = void 0;
|
|
27
|
+
const Sequelize = __importStar(require("sequelize"));
|
|
28
|
+
const sequelize_1 = require("sequelize");
|
|
29
|
+
class UserAffinity extends sequelize_1.Model {
|
|
30
|
+
static initModel(sequelize) {
|
|
31
|
+
return UserAffinity.init({
|
|
32
|
+
userId: {
|
|
33
|
+
type: sequelize_1.DataTypes.UUID,
|
|
34
|
+
allowNull: false,
|
|
35
|
+
references: {
|
|
36
|
+
model: 'app_user',
|
|
37
|
+
key: 'id'
|
|
38
|
+
},
|
|
39
|
+
unique: "user_affinity_user_id_affinity_relationship_type_id_related_id_",
|
|
40
|
+
field: 'user_id'
|
|
41
|
+
},
|
|
42
|
+
affinityRelationshipTypeId: {
|
|
43
|
+
type: sequelize_1.DataTypes.UUID,
|
|
44
|
+
allowNull: false,
|
|
45
|
+
references: {
|
|
46
|
+
model: 'affinity_relationship_type',
|
|
47
|
+
key: 'id'
|
|
48
|
+
},
|
|
49
|
+
unique: "user_affinity_user_id_affinity_relationship_type_id_related_id_",
|
|
50
|
+
field: 'affinity_relationship_type_id'
|
|
51
|
+
},
|
|
52
|
+
relatedId: {
|
|
53
|
+
type: sequelize_1.DataTypes.UUID,
|
|
54
|
+
allowNull: false,
|
|
55
|
+
unique: "user_affinity_user_id_affinity_relationship_type_id_related_id_",
|
|
56
|
+
field: 'related_id'
|
|
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: true,
|
|
67
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
68
|
+
field: 'create_date'
|
|
69
|
+
},
|
|
70
|
+
updateDate: {
|
|
71
|
+
type: sequelize_1.DataTypes.DATE,
|
|
72
|
+
allowNull: true,
|
|
73
|
+
defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
|
|
74
|
+
field: 'update_date'
|
|
75
|
+
}
|
|
76
|
+
}, {
|
|
77
|
+
sequelize,
|
|
78
|
+
tableName: 'user_affinity',
|
|
79
|
+
schema: 'eb',
|
|
80
|
+
timestamps: false,
|
|
81
|
+
indexes: [
|
|
82
|
+
{
|
|
83
|
+
name: "user_affinity_pkey",
|
|
84
|
+
unique: true,
|
|
85
|
+
fields: [
|
|
86
|
+
{ name: "id" },
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: "user_affinity_user_id_affinity_relationship_type_id_index",
|
|
91
|
+
fields: [
|
|
92
|
+
{ name: "user_id" },
|
|
93
|
+
{ name: "affinity_relationship_type_id" },
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
name: "user_affinity_user_id_affinity_relationship_type_id_related_id_",
|
|
98
|
+
unique: true,
|
|
99
|
+
fields: [
|
|
100
|
+
{ name: "user_id" },
|
|
101
|
+
{ name: "affinity_relationship_type_id" },
|
|
102
|
+
{ name: "related_id" },
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
]
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
exports.UserAffinity = UserAffinity;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as Sequelize from 'sequelize';
|
|
2
|
+
import { Model, Optional } from 'sequelize';
|
|
3
|
+
import type { AppUser, AppUserId } from './AppUser';
|
|
4
|
+
import type { FeedContentType, FeedContentTypeId } from './FeedContentType';
|
|
5
|
+
export interface UserEngagementFactorAttributes {
|
|
6
|
+
userId: string;
|
|
7
|
+
contentTypeId: string;
|
|
8
|
+
id: string;
|
|
9
|
+
engagementFactor: number;
|
|
10
|
+
createDate?: Date;
|
|
11
|
+
updateDate?: Date;
|
|
12
|
+
}
|
|
13
|
+
export type UserEngagementFactorPk = "id";
|
|
14
|
+
export type UserEngagementFactorId = UserEngagementFactor[UserEngagementFactorPk];
|
|
15
|
+
export type UserEngagementFactorOptionalAttributes = "id" | "engagementFactor" | "createDate" | "updateDate";
|
|
16
|
+
export type UserEngagementFactorCreationAttributes = Optional<UserEngagementFactorAttributes, UserEngagementFactorOptionalAttributes>;
|
|
17
|
+
export declare class UserEngagementFactor extends Model<UserEngagementFactorAttributes, UserEngagementFactorCreationAttributes> implements UserEngagementFactorAttributes {
|
|
18
|
+
userId: string;
|
|
19
|
+
contentTypeId: string;
|
|
20
|
+
id: string;
|
|
21
|
+
engagementFactor: number;
|
|
22
|
+
createDate?: Date;
|
|
23
|
+
updateDate?: Date;
|
|
24
|
+
user: AppUser;
|
|
25
|
+
getUser: Sequelize.BelongsToGetAssociationMixin<AppUser>;
|
|
26
|
+
setUser: Sequelize.BelongsToSetAssociationMixin<AppUser, AppUserId>;
|
|
27
|
+
createUser: Sequelize.BelongsToCreateAssociationMixin<AppUser>;
|
|
28
|
+
contentType: FeedContentType;
|
|
29
|
+
getContentType: Sequelize.BelongsToGetAssociationMixin<FeedContentType>;
|
|
30
|
+
setContentType: Sequelize.BelongsToSetAssociationMixin<FeedContentType, FeedContentTypeId>;
|
|
31
|
+
createContentType: Sequelize.BelongsToCreateAssociationMixin<FeedContentType>;
|
|
32
|
+
static initModel(sequelize: Sequelize.Sequelize): typeof UserEngagementFactor;
|
|
33
|
+
}
|