@experts_hub/shared 1.0.126 → 1.0.127

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.
@@ -29,6 +29,9 @@ export declare enum Provider {
29
29
  }
30
30
  export declare class User extends BaseEntity {
31
31
  uniqueId: string;
32
+ parentId: number;
33
+ parent: User;
34
+ children: User[];
32
35
  username: string;
33
36
  firstName: string;
34
37
  lastName: string;
package/dist/index.d.mts CHANGED
@@ -505,6 +505,9 @@ declare enum Provider {
505
505
  }
506
506
  declare class User extends BaseEntity {
507
507
  uniqueId: string;
508
+ parentId: number;
509
+ parent: User;
510
+ children: User[];
508
511
  username: string;
509
512
  firstName: string;
510
513
  lastName: string;
package/dist/index.d.ts CHANGED
@@ -505,6 +505,9 @@ declare enum Provider {
505
505
  }
506
506
  declare class User extends BaseEntity {
507
507
  uniqueId: string;
508
+ parentId: number;
509
+ parent: User;
510
+ children: User[];
508
511
  username: string;
509
512
  firstName: string;
510
513
  lastName: string;
package/dist/index.js CHANGED
@@ -1353,6 +1353,17 @@ var User = class extends BaseEntity {
1353
1353
  __decorateClass([
1354
1354
  (0, import_typeorm14.Column)({ name: "unique_id", type: "varchar", unique: true })
1355
1355
  ], User.prototype, "uniqueId", 2);
1356
+ __decorateClass([
1357
+ (0, import_typeorm14.Column)({ name: "parent_id", type: "integer", nullable: true }),
1358
+ (0, import_typeorm14.Index)()
1359
+ ], User.prototype, "parentId", 2);
1360
+ __decorateClass([
1361
+ (0, import_typeorm14.ManyToOne)(() => User, (user) => user.children, { nullable: true }),
1362
+ (0, import_typeorm14.JoinColumn)({ name: "parent_id" })
1363
+ ], User.prototype, "parent", 2);
1364
+ __decorateClass([
1365
+ (0, import_typeorm14.OneToMany)(() => User, (user) => user.parent)
1366
+ ], User.prototype, "children", 2);
1356
1367
  __decorateClass([
1357
1368
  (0, import_typeorm14.Column)({ name: "username", type: "varchar", unique: true, nullable: true })
1358
1369
  ], User.prototype, "username", 2);
package/dist/index.mjs CHANGED
@@ -491,9 +491,9 @@ import {
491
491
  import {
492
492
  Entity as Entity14,
493
493
  Column as Column15,
494
- ManyToOne as ManyToOne12,
495
- JoinColumn as JoinColumn12,
496
- Index as Index10
494
+ ManyToOne as ManyToOne13,
495
+ JoinColumn as JoinColumn13,
496
+ Index as Index11
497
497
  } from "typeorm";
498
498
 
499
499
  // src/entities/base.entity.ts
@@ -541,7 +541,7 @@ __decorateClass([
541
541
  ], BaseEntity.prototype, "deletedAt", 2);
542
542
 
543
543
  // src/entities/user.entity.ts
544
- import { Entity as Entity13, Column as Column14, OneToMany as OneToMany6, OneToOne } from "typeorm";
544
+ import { Entity as Entity13, Column as Column14, OneToMany as OneToMany6, OneToOne, Index as Index10, ManyToOne as ManyToOne12, JoinColumn as JoinColumn12 } from "typeorm";
545
545
 
546
546
  // src/entities/refresh-token.entity.ts
547
547
  import {
@@ -1352,6 +1352,17 @@ var User = class extends BaseEntity {
1352
1352
  __decorateClass([
1353
1353
  Column14({ name: "unique_id", type: "varchar", unique: true })
1354
1354
  ], User.prototype, "uniqueId", 2);
1355
+ __decorateClass([
1356
+ Column14({ name: "parent_id", type: "integer", nullable: true }),
1357
+ Index10()
1358
+ ], User.prototype, "parentId", 2);
1359
+ __decorateClass([
1360
+ ManyToOne12(() => User, (user) => user.children, { nullable: true }),
1361
+ JoinColumn12({ name: "parent_id" })
1362
+ ], User.prototype, "parent", 2);
1363
+ __decorateClass([
1364
+ OneToMany6(() => User, (user) => user.parent)
1365
+ ], User.prototype, "children", 2);
1355
1366
  __decorateClass([
1356
1367
  Column14({ name: "username", type: "varchar", unique: true, nullable: true })
1357
1368
  ], User.prototype, "username", 2);
@@ -1516,11 +1527,11 @@ var CompanyProfile = class extends BaseEntity {
1516
1527
  // individual index to find company profile by user
1517
1528
  __decorateClass([
1518
1529
  Column15({ name: "user_id", type: "integer", nullable: true }),
1519
- Index10()
1530
+ Index11()
1520
1531
  ], CompanyProfile.prototype, "userId", 2);
1521
1532
  __decorateClass([
1522
- ManyToOne12(() => User, (user) => user.otps),
1523
- JoinColumn12({ name: "user_id" })
1533
+ ManyToOne13(() => User, (user) => user.otps),
1534
+ JoinColumn13({ name: "user_id" })
1524
1535
  ], CompanyProfile.prototype, "user", 2);
1525
1536
  __decorateClass([
1526
1537
  Column15({ name: "company_name", type: "varchar", nullable: true })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@experts_hub/shared",
3
- "version": "1.0.126",
3
+ "version": "1.0.127",
4
4
  "description": "Shared DTOs, interfaces, and utilities for experts hub applications",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/",