@reachu/database 1.0.212 → 1.0.214

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 (38) hide show
  1. package/dist/entity/index.d.ts +2 -1
  2. package/dist/entity/index.js +6 -3
  3. package/dist/entity/index.js.map +1 -1
  4. package/dist/entity/modules/liveshow/LiveShow.d.ts +18 -0
  5. package/dist/entity/modules/liveshow/LiveShow.js +84 -0
  6. package/dist/entity/modules/liveshow/LiveShow.js.map +1 -0
  7. package/dist/migrations/1747777929517-new-prod.d.ts +6 -0
  8. package/dist/migrations/1747777929517-new-prod.js +44 -0
  9. package/dist/migrations/1747777929517-new-prod.js.map +1 -0
  10. package/dist/migrations/1747783183804-new-qa.d.ts +6 -0
  11. package/dist/migrations/1747783183804-new-qa.js +105 -0
  12. package/dist/migrations/1747783183804-new-qa.js.map +1 -0
  13. package/dist/migrations/1747783948794-new-qa-2.d.ts +6 -0
  14. package/dist/migrations/1747783948794-new-qa-2.js +43 -0
  15. package/dist/migrations/1747783948794-new-qa-2.js.map +1 -0
  16. package/dist/migrations/1758571354123-liveshow.d.ts +6 -0
  17. package/dist/migrations/1758571354123-liveshow.js +31 -0
  18. package/dist/migrations/1758571354123-liveshow.js.map +1 -0
  19. package/dist/migrations/1758573787467-liveshow2.d.ts +6 -0
  20. package/dist/migrations/1758573787467-liveshow2.js +39 -0
  21. package/dist/migrations/1758573787467-liveshow2.js.map +1 -0
  22. package/dist/repositories/index.d.ts +2 -0
  23. package/dist/repositories/index.js +3 -1
  24. package/dist/repositories/index.js.map +1 -1
  25. package/dist/repositories/liveshow/index.d.ts +4 -0
  26. package/dist/repositories/liveshow/index.js +21 -0
  27. package/dist/repositories/liveshow/index.js.map +1 -0
  28. package/dist/tsconfig.tsbuildinfo +97 -4
  29. package/package.json +3 -3
  30. package/src/entity/index.ts +4 -0
  31. package/src/entity/modules/liveshow/LiveShow.ts +59 -0
  32. package/src/migrations/1747777929517-new-prod.ts +56 -0
  33. package/src/migrations/1747783183804-new-qa.ts +178 -0
  34. package/src/migrations/1747783948794-new-qa-2.ts +28 -0
  35. package/src/migrations/1758571354123-liveshow.ts +21 -0
  36. package/src/migrations/1758573787467-liveshow2.ts +25 -0
  37. package/src/repositories/index.ts +4 -0
  38. package/src/repositories/liveshow/index.ts +6 -0
@@ -0,0 +1,28 @@
1
+ import {MigrationInterface, QueryRunner} from "typeorm";
2
+
3
+ export class newQa21747783948794 implements MigrationInterface {
4
+ name = 'newQa21747783948794'
5
+
6
+ public async up(queryRunner: QueryRunner): Promise<void> {
7
+ await queryRunner.query(`ALTER TABLE \`channel_user\` ADD CONSTRAINT \`FK_7e330764fdf1dc12dd5ba35dece\` FOREIGN KEY (\`channel_user_settings_id\`) REFERENCES \`channel_user_settings\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
8
+ await queryRunner.query(`ALTER TABLE \`order\` ADD CONSTRAINT \`FK_d1254e4dc50ab0aca711d375fb6\` FOREIGN KEY (\`channel_user_id\`) REFERENCES \`channel_user\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
9
+ await queryRunner.query(`ALTER TABLE \`cart\` ADD CONSTRAINT \`FK_a52dfc052d7bf74ad101c711217\` FOREIGN KEY (\`channel_user_id\`) REFERENCES \`channel_user\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
10
+ await queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD CONSTRAINT \`FK_635d9f7bf7582fca6e2b961bdbe\` FOREIGN KEY (\`channel_user_id\`) REFERENCES \`channel_user\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
11
+ await queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD CONSTRAINT \`FK_ef37d3e38597aa6352c51ca2d57\` FOREIGN KEY (\`product_id\`) REFERENCES \`product\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
12
+ await queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD CONSTRAINT \`FK_6a15e1ba4f071b0fa85f8188756\` FOREIGN KEY (\`collection_id\`) REFERENCES \`collection\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
13
+ await queryRunner.query(`ALTER TABLE \`discount\` ADD CONSTRAINT \`FK_8e291dd48c120ebe1e1a4a9062e\` FOREIGN KEY (\`channel_user_id\`) REFERENCES \`channel_user\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
14
+ await queryRunner.query(`ALTER TABLE \`product_scraping\` ADD CONSTRAINT \`FK_e8c2061ff40e510e6fb8e89a184\` FOREIGN KEY (\`user_id\`) REFERENCES \`user\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
15
+ }
16
+
17
+ public async down(queryRunner: QueryRunner): Promise<void> {
18
+ await queryRunner.query(`ALTER TABLE \`product_scraping\` DROP FOREIGN KEY \`FK_e8c2061ff40e510e6fb8e89a184\``);
19
+ await queryRunner.query(`ALTER TABLE \`discount\` DROP FOREIGN KEY \`FK_8e291dd48c120ebe1e1a4a9062e\``);
20
+ await queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP FOREIGN KEY \`FK_6a15e1ba4f071b0fa85f8188756\``);
21
+ await queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP FOREIGN KEY \`FK_ef37d3e38597aa6352c51ca2d57\``);
22
+ await queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP FOREIGN KEY \`FK_635d9f7bf7582fca6e2b961bdbe\``);
23
+ await queryRunner.query(`ALTER TABLE \`cart\` DROP FOREIGN KEY \`FK_a52dfc052d7bf74ad101c711217\``);
24
+ await queryRunner.query(`ALTER TABLE \`order\` DROP FOREIGN KEY \`FK_d1254e4dc50ab0aca711d375fb6\``);
25
+ await queryRunner.query(`ALTER TABLE \`channel_user\` DROP FOREIGN KEY \`FK_7e330764fdf1dc12dd5ba35dece\``);
26
+ }
27
+
28
+ }
@@ -0,0 +1,21 @@
1
+ import { MigrationInterface, QueryRunner } from 'typeorm';
2
+
3
+ export class liveshow1758571354123 implements MigrationInterface {
4
+ name = 'liveshow1758571354123';
5
+
6
+ public async up(queryRunner: QueryRunner): Promise<void> {
7
+ await queryRunner.query(
8
+ `CREATE TABLE \`live_show\` (\`created_at\` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), \`updated_at\` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), \`id\` varchar(36) NOT NULL, \`deleted_at\` datetime(6) NULL, \`title\` varchar(255) NULL, \`description\` varchar(255) NULL, \`start_date\` timestamp NULL, \`end_date\` timestamp NULL, \`thumbnail\` varchar(21844) NULL, \`channel_user_id\` int NULL, PRIMARY KEY (\`id\`)) ENGINE=InnoDB`,
9
+ );
10
+ await queryRunner.query(
11
+ `ALTER TABLE \`live_show\` ADD CONSTRAINT \`FK_baebcae77d1d0c7f6e5a0e6550f\` FOREIGN KEY (\`channel_user_id\`) REFERENCES \`channel_user\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`,
12
+ );
13
+ }
14
+
15
+ public async down(queryRunner: QueryRunner): Promise<void> {
16
+ await queryRunner.query(
17
+ `ALTER TABLE \`live_show\` DROP FOREIGN KEY \`FK_baebcae77d1d0c7f6e5a0e6550f\``,
18
+ );
19
+ await queryRunner.query(`DROP TABLE \`live_show\``);
20
+ }
21
+ }
@@ -0,0 +1,25 @@
1
+ import { MigrationInterface, QueryRunner } from 'typeorm';
2
+
3
+ export class liveshow21758573787467 implements MigrationInterface {
4
+ name = 'liveshow21758573787467';
5
+
6
+ public async up(queryRunner: QueryRunner): Promise<void> {
7
+ await queryRunner.query(`ALTER TABLE \`live_show\` ADD \`event_id\` varchar(255) NULL`);
8
+ await queryRunner.query(`ALTER TABLE \`live_show\` ADD \`video_id\` varchar(255) NULL`);
9
+ await queryRunner.query(`ALTER TABLE \`live_show\` ADD \`live_end\` tinyint NULL DEFAULT 0`);
10
+ await queryRunner.query(
11
+ `ALTER TABLE \`live_show\` ADD \`broadcasting\` tinyint NULL DEFAULT 0`,
12
+ );
13
+ await queryRunner.query(`ALTER TABLE \`live_show\` ADD \`hls\` varchar(255) NULL`);
14
+ await queryRunner.query(`ALTER TABLE \`live_show\` ADD \`stream_key\` varchar(255) NULL`);
15
+ }
16
+
17
+ public async down(queryRunner: QueryRunner): Promise<void> {
18
+ await queryRunner.query(`ALTER TABLE \`live_show\` DROP COLUMN \`stream_key\``);
19
+ await queryRunner.query(`ALTER TABLE \`live_show\` DROP COLUMN \`hls\``);
20
+ await queryRunner.query(`ALTER TABLE \`live_show\` DROP COLUMN \`broadcasting\``);
21
+ await queryRunner.query(`ALTER TABLE \`live_show\` DROP COLUMN \`live_end\``);
22
+ await queryRunner.query(`ALTER TABLE \`live_show\` DROP COLUMN \`video_id\``);
23
+ await queryRunner.query(`ALTER TABLE \`live_show\` DROP COLUMN \`event_id\``);
24
+ }
25
+ }
@@ -111,6 +111,8 @@ import {
111
111
  DiscountTypeRepository,
112
112
  } from './discount';
113
113
 
114
+ import { LiveShowRepository } from './liveshow';
115
+
114
116
  import { PlanRepository, SubscriptionRepository, UserCountPlanRepository } from './subscriptions';
115
117
 
116
118
  import { Repository, EntityRepository } from 'typeorm';
@@ -351,6 +353,8 @@ export {
351
353
  DiscountTypeRepository,
352
354
  };
353
355
 
356
+ export { LiveShowRepository };
357
+
354
358
  export { ProductShippingRepository, ShippingCountryRepository, ShippingRepository };
355
359
 
356
360
  export { PlanRepository, SubscriptionRepository, UserCountPlanRepository };
@@ -0,0 +1,6 @@
1
+ import { Repository, EntityRepository } from 'typeorm';
2
+
3
+ import LiveShow from '../../entity/modules/liveshow/LiveShow';
4
+
5
+ @EntityRepository(LiveShow)
6
+ export class LiveShowRepository extends Repository<LiveShow> {}