@ashutoshvohra136/tenant-db-contract 1.0.15 → 1.0.16
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.
|
@@ -3,11 +3,13 @@ import { Users } from './Users';
|
|
|
3
3
|
import { Product } from './Products';
|
|
4
4
|
import { Attachement } from './Attachments';
|
|
5
5
|
import { SalesPunchingAiAnalysis } from './SalesPunchingAIAnalysis';
|
|
6
|
+
import { Stores } from './Stores';
|
|
6
7
|
export declare class SalesPunching extends BaseEntity {
|
|
7
8
|
id: string;
|
|
8
9
|
quantity: number;
|
|
9
10
|
invoice_value: number;
|
|
10
11
|
commission: number;
|
|
12
|
+
storeId?: string | null;
|
|
11
13
|
remark?: string | null;
|
|
12
14
|
ai_validation: number;
|
|
13
15
|
created_at: Date;
|
|
@@ -15,5 +17,6 @@ export declare class SalesPunching extends BaseEntity {
|
|
|
15
17
|
users?: Users[];
|
|
16
18
|
aiAnalysis: SalesPunchingAiAnalysis;
|
|
17
19
|
product?: Product[];
|
|
20
|
+
store?: Stores;
|
|
18
21
|
attachment: Attachement;
|
|
19
22
|
}
|
|
@@ -15,6 +15,7 @@ const Users_1 = require("./Users");
|
|
|
15
15
|
const Products_1 = require("./Products");
|
|
16
16
|
const Attachments_1 = require("./Attachments");
|
|
17
17
|
const SalesPunchingAIAnalysis_1 = require("./SalesPunchingAIAnalysis");
|
|
18
|
+
const Stores_1 = require("./Stores");
|
|
18
19
|
let SalesPunching = class SalesPunching extends typeorm_1.BaseEntity {
|
|
19
20
|
};
|
|
20
21
|
exports.SalesPunching = SalesPunching;
|
|
@@ -34,6 +35,10 @@ __decorate([
|
|
|
34
35
|
(0, typeorm_1.Column)({ type: 'int', default: 0 }),
|
|
35
36
|
__metadata("design:type", Number)
|
|
36
37
|
], SalesPunching.prototype, "commission", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.Column)({ type: 'bigint', name: 'store_id', nullable: true }),
|
|
40
|
+
__metadata("design:type", Object)
|
|
41
|
+
], SalesPunching.prototype, "storeId", void 0);
|
|
37
42
|
__decorate([
|
|
38
43
|
(0, typeorm_1.Column)('varchar', { name: 'remark', default: null }),
|
|
39
44
|
__metadata("design:type", Object)
|
|
@@ -64,6 +69,11 @@ __decorate([
|
|
|
64
69
|
(0, typeorm_1.JoinColumn)({ name: 'product_id' }),
|
|
65
70
|
__metadata("design:type", Array)
|
|
66
71
|
], SalesPunching.prototype, "product", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, typeorm_1.ManyToOne)(() => Stores_1.Stores, (store) => store.salesPunchings),
|
|
74
|
+
(0, typeorm_1.JoinColumn)({ name: 'store_id' }),
|
|
75
|
+
__metadata("design:type", Stores_1.Stores)
|
|
76
|
+
], SalesPunching.prototype, "store", void 0);
|
|
67
77
|
__decorate([
|
|
68
78
|
(0, typeorm_1.OneToMany)(() => Attachments_1.Attachement, (attachement) => attachement.salesPunching),
|
|
69
79
|
__metadata("design:type", Attachments_1.Attachement)
|
|
@@ -4,6 +4,7 @@ import { UserRosters } from './UserRoster';
|
|
|
4
4
|
import { Users } from './Users';
|
|
5
5
|
import { StoreBrandsMappings } from './StoreBrandsMapping';
|
|
6
6
|
import { BeatPlanVisits } from './BeatPlanVisits';
|
|
7
|
+
import { SalesPunching } from './SalesPunch';
|
|
7
8
|
export declare class Stores extends BaseEntity {
|
|
8
9
|
id: string;
|
|
9
10
|
name: string;
|
|
@@ -24,4 +25,5 @@ export declare class Stores extends BaseEntity {
|
|
|
24
25
|
storeBrandsMappings: StoreBrandsMappings[];
|
|
25
26
|
users: Users[];
|
|
26
27
|
beatPlanVisit: BeatPlanVisits[];
|
|
28
|
+
salesPunchings: SalesPunching[];
|
|
27
29
|
}
|
package/dist/entities/Stores.js
CHANGED
|
@@ -16,6 +16,7 @@ const UserRoster_1 = require("./UserRoster");
|
|
|
16
16
|
const Users_1 = require("./Users");
|
|
17
17
|
const StoreBrandsMapping_1 = require("./StoreBrandsMapping");
|
|
18
18
|
const BeatPlanVisits_1 = require("./BeatPlanVisits");
|
|
19
|
+
const SalesPunch_1 = require("./SalesPunch");
|
|
19
20
|
let Stores = class Stores extends typeorm_1.BaseEntity {
|
|
20
21
|
};
|
|
21
22
|
exports.Stores = Stores;
|
|
@@ -95,6 +96,10 @@ __decorate([
|
|
|
95
96
|
(0, typeorm_1.OneToMany)(() => BeatPlanVisits_1.BeatPlanVisits, (visit) => visit.store),
|
|
96
97
|
__metadata("design:type", Array)
|
|
97
98
|
], Stores.prototype, "beatPlanVisit", void 0);
|
|
99
|
+
__decorate([
|
|
100
|
+
(0, typeorm_1.OneToMany)(() => SalesPunch_1.SalesPunching, (salesPunching) => salesPunching.store),
|
|
101
|
+
__metadata("design:type", Array)
|
|
102
|
+
], Stores.prototype, "salesPunchings", void 0);
|
|
98
103
|
exports.Stores = Stores = __decorate([
|
|
99
104
|
(0, typeorm_1.Entity)('stores')
|
|
100
105
|
], Stores);
|
package/package.json
CHANGED
|
@@ -15,6 +15,7 @@ import { Product } from './Products';
|
|
|
15
15
|
import { Attachement } from './Attachments';
|
|
16
16
|
import { SalesPunchingAiAnalysis } from './SalesPunchingAIAnalysis';
|
|
17
17
|
import { Brands } from './Brands';
|
|
18
|
+
import { Stores } from './Stores';
|
|
18
19
|
|
|
19
20
|
@Entity('sales_punching')
|
|
20
21
|
export class SalesPunching extends BaseEntity {
|
|
@@ -33,6 +34,9 @@ export class SalesPunching extends BaseEntity {
|
|
|
33
34
|
@Column({ type: 'int', default: 0 })
|
|
34
35
|
commission!: number;
|
|
35
36
|
|
|
37
|
+
@Column({ type: 'bigint', name: 'store_id', nullable: true })
|
|
38
|
+
storeId?: string | null;
|
|
39
|
+
|
|
36
40
|
@Column('varchar', { name: 'remark', default: null })
|
|
37
41
|
remark?: string | null;
|
|
38
42
|
|
|
@@ -59,6 +63,10 @@ export class SalesPunching extends BaseEntity {
|
|
|
59
63
|
@JoinColumn({ name: 'product_id' })
|
|
60
64
|
product?: Product[];
|
|
61
65
|
|
|
66
|
+
@ManyToOne(() => Stores, (store) => store.salesPunchings)
|
|
67
|
+
@JoinColumn({ name: 'store_id' })
|
|
68
|
+
store?: Stores;
|
|
69
|
+
|
|
62
70
|
@OneToMany(() => Attachement, (attachement) => attachement.salesPunching)
|
|
63
71
|
attachment: Attachement;
|
|
64
72
|
|
package/src/entities/Stores.ts
CHANGED
|
@@ -12,6 +12,7 @@ import { UserRosters } from './UserRoster';
|
|
|
12
12
|
import { Users } from './Users';
|
|
13
13
|
import { StoreBrandsMappings } from './StoreBrandsMapping';
|
|
14
14
|
import { BeatPlanVisits } from './BeatPlanVisits';
|
|
15
|
+
import { SalesPunching } from './SalesPunch';
|
|
15
16
|
|
|
16
17
|
@Entity('stores')
|
|
17
18
|
export class Stores extends BaseEntity {
|
|
@@ -71,4 +72,7 @@ export class Stores extends BaseEntity {
|
|
|
71
72
|
|
|
72
73
|
@OneToMany(() => BeatPlanVisits, (visit) => visit.store)
|
|
73
74
|
beatPlanVisit!: BeatPlanVisits[];
|
|
75
|
+
|
|
76
|
+
@OneToMany(() => SalesPunching, (salesPunching) => salesPunching.store)
|
|
77
|
+
salesPunchings!: SalesPunching[];
|
|
74
78
|
}
|