nc-db-new 1.2.19 → 1.2.21

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.
@@ -20,7 +20,7 @@ const ContentReport = connections_1.default.define('content_reports', {
20
20
  allowNull: false,
21
21
  },
22
22
  prevWatchedSeconds: {
23
- type: sequelize_1.DataTypes.BIGINT,
23
+ type: sequelize_1.DataTypes.NUMBER,
24
24
  allowNull: false,
25
25
  },
26
26
  watchedSeconds: {
@@ -4,56 +4,9 @@ interface IDatabase {
4
4
  DATABASE_URL: string;
5
5
  ENCRYPTION_SECRET_KEY: string;
6
6
  }
7
- interface IBasicContent {
8
- type?: string;
9
- id: string;
10
- userId?: number;
11
- title: string;
12
- publishDate: number;
13
- permalink: string;
14
- nextUpAccRevenue: string;
15
- owedAccRevenue: string;
16
- launchDate?: string;
17
- advance?: number;
18
- feePaid?: number;
19
- filmingCosts?: number;
20
- paidToOwedAmount?: number;
21
- freeToBePaid?: number;
22
- createdBy: number;
23
- updatedBy: number;
24
- runtime: number;
25
- }
26
- interface IVLContent extends IBasicContent {
27
- primaryCategory: {
28
- title: string;
29
- };
30
- }
31
- interface ISubscription {
32
- planIdentifier: string;
33
- offersApplied: [];
34
- }
35
- interface IPurchase {
36
- subscription: ISubscription;
37
- }
38
- interface IVLUser {
39
- email: string[];
40
- purchases: IPurchase[];
41
- }
42
- interface IWatchedStream {
43
- streamId: string;
44
- contentId: string;
45
- duration: number;
46
- content: IVLContent;
47
- user?: IVLUser;
48
- }
49
- interface IDbWatches extends Pick<IWatchedStream, 'streamId' | 'contentId' | 'duration'> {
50
- createdBy: number;
51
- updatedBy: number;
52
- }
53
7
  interface IAccumulatedWatchesDurationPerContent {
54
8
  contentId: string;
55
9
  watchedSeconds: number;
56
- watches: IDbWatches[];
57
10
  revenue: string | Big;
58
11
  reportId?: number;
59
12
  createdBy: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nc-db-new",
3
- "version": "1.2.19",
3
+ "version": "1.2.21",
4
4
  "description": "Database models for NextUp Comedy Website",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",