@imaginamossas/farmabien-common 1.0.21 → 1.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.
@@ -0,0 +1,11 @@
1
+ import { StateEntity } from './state.entity';
2
+ export declare class CityEntity {
3
+ id: number;
4
+ stateId: number;
5
+ name: string;
6
+ daneCode: string | null;
7
+ createdAt: Date;
8
+ updatedAt: Date;
9
+ state: StateEntity;
10
+ addresses: unknown[];
11
+ }
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.CityEntity = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const state_entity_1 = require("./state.entity");
15
+ let CityEntity = class CityEntity {
16
+ id;
17
+ stateId;
18
+ name;
19
+ daneCode;
20
+ createdAt;
21
+ updatedAt;
22
+ state;
23
+ addresses;
24
+ };
25
+ exports.CityEntity = CityEntity;
26
+ __decorate([
27
+ (0, typeorm_1.PrimaryGeneratedColumn)(),
28
+ __metadata("design:type", Number)
29
+ ], CityEntity.prototype, "id", void 0);
30
+ __decorate([
31
+ (0, typeorm_1.Column)({ name: 'state_id', type: 'int' }),
32
+ __metadata("design:type", Number)
33
+ ], CityEntity.prototype, "stateId", void 0);
34
+ __decorate([
35
+ (0, typeorm_1.Column)({ type: 'varchar', length: 100 }),
36
+ __metadata("design:type", String)
37
+ ], CityEntity.prototype, "name", void 0);
38
+ __decorate([
39
+ (0, typeorm_1.Column)({ name: 'dane_code', type: 'varchar', length: 10, nullable: true }),
40
+ __metadata("design:type", Object)
41
+ ], CityEntity.prototype, "daneCode", void 0);
42
+ __decorate([
43
+ (0, typeorm_1.CreateDateColumn)({ name: 'created_at', type: 'timestamptz' }),
44
+ __metadata("design:type", Date)
45
+ ], CityEntity.prototype, "createdAt", void 0);
46
+ __decorate([
47
+ (0, typeorm_1.UpdateDateColumn)({ name: 'updated_at', type: 'timestamptz' }),
48
+ __metadata("design:type", Date)
49
+ ], CityEntity.prototype, "updatedAt", void 0);
50
+ __decorate([
51
+ (0, typeorm_1.ManyToOne)(() => state_entity_1.StateEntity, (state) => state.cities),
52
+ (0, typeorm_1.JoinColumn)({ name: 'state_id' }),
53
+ __metadata("design:type", state_entity_1.StateEntity)
54
+ ], CityEntity.prototype, "state", void 0);
55
+ __decorate([
56
+ (0, typeorm_1.OneToMany)('CustomerAddressEntity', 'city'),
57
+ __metadata("design:type", Array)
58
+ ], CityEntity.prototype, "addresses", void 0);
59
+ exports.CityEntity = CityEntity = __decorate([
60
+ (0, typeorm_1.Entity)('cities'),
61
+ (0, typeorm_1.Index)('idx_cities_state_id', ['stateId'])
62
+ ], CityEntity);
63
+ //# sourceMappingURL=city.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"city.entity.js","sourceRoot":"","sources":["../../src/entities/city.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAUiB;AACjB,iDAA6C;AAiBtC,IAAM,UAAU,GAAhB,MAAM,UAAU;IAKrB,EAAE,CAAS;IAMX,OAAO,CAAS;IAMhB,IAAI,CAAS;IAMb,QAAQ,CAAgB;IAOxB,SAAS,CAAO;IAGhB,SAAS,CAAO;IAWhB,KAAK,CAAc;IAMnB,SAAS,CAAY;CACtB,CAAA;AAnDY,gCAAU;AAKrB;IADC,IAAA,gCAAsB,GAAE;;sCACd;AAMX;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;;2CAC1B;AAMhB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;wCAC5B;AAMb;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACnD;AAOxB;IADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;8BACnD,IAAI;6CAAC;AAGhB;IADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;8BACnD,IAAI;6CAAC;AAWhB;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,0BAAW,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC;IACrD,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;8BAC1B,0BAAW;yCAAC;AAMnB;IADC,IAAA,mBAAS,EAAC,uBAAuB,EAAE,MAAM,CAAC;;6CACtB;qBAlDV,UAAU;IAFtB,IAAA,gBAAM,EAAC,QAAQ,CAAC;IAChB,IAAA,eAAK,EAAC,qBAAqB,EAAE,CAAC,SAAS,CAAC,CAAC;GAC7B,UAAU,CAmDtB"}
@@ -0,0 +1,25 @@
1
+ import { CustomerEntity } from './customer.entity';
2
+ import { CityEntity } from './city.entity';
3
+ export declare class CustomerAddressEntity {
4
+ id: number;
5
+ customerId: number;
6
+ cityId: number;
7
+ countryId: string;
8
+ label: string;
9
+ recipientName: string;
10
+ recipientPhone: string;
11
+ addressLine: string;
12
+ complement: string | null;
13
+ neighborhood: string | null;
14
+ postalCode: string | null;
15
+ latitude: number | null;
16
+ longitude: number | null;
17
+ deliveryInstructions: string | null;
18
+ isMain: boolean;
19
+ isActive: boolean;
20
+ createdAt: Date;
21
+ updatedAt: Date;
22
+ deletedAt: Date | null;
23
+ customer: CustomerEntity;
24
+ city: CityEntity;
25
+ }
@@ -0,0 +1,150 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.CustomerAddressEntity = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const customer_entity_1 = require("./customer.entity");
15
+ const city_entity_1 = require("./city.entity");
16
+ let CustomerAddressEntity = class CustomerAddressEntity {
17
+ id;
18
+ customerId;
19
+ cityId;
20
+ countryId;
21
+ label;
22
+ recipientName;
23
+ recipientPhone;
24
+ addressLine;
25
+ complement;
26
+ neighborhood;
27
+ postalCode;
28
+ latitude;
29
+ longitude;
30
+ deliveryInstructions;
31
+ isMain;
32
+ isActive;
33
+ createdAt;
34
+ updatedAt;
35
+ deletedAt;
36
+ customer;
37
+ city;
38
+ };
39
+ exports.CustomerAddressEntity = CustomerAddressEntity;
40
+ __decorate([
41
+ (0, typeorm_1.PrimaryGeneratedColumn)(),
42
+ __metadata("design:type", Number)
43
+ ], CustomerAddressEntity.prototype, "id", void 0);
44
+ __decorate([
45
+ (0, typeorm_1.Column)({ name: 'customer_id', type: 'int' }),
46
+ __metadata("design:type", Number)
47
+ ], CustomerAddressEntity.prototype, "customerId", void 0);
48
+ __decorate([
49
+ (0, typeorm_1.Column)({ name: 'city_id', type: 'int' }),
50
+ __metadata("design:type", Number)
51
+ ], CustomerAddressEntity.prototype, "cityId", void 0);
52
+ __decorate([
53
+ (0, typeorm_1.Column)({ name: 'country_id', type: 'char', length: 2 }),
54
+ __metadata("design:type", String)
55
+ ], CustomerAddressEntity.prototype, "countryId", void 0);
56
+ __decorate([
57
+ (0, typeorm_1.Column)({ type: 'varchar', length: 60 }),
58
+ __metadata("design:type", String)
59
+ ], CustomerAddressEntity.prototype, "label", void 0);
60
+ __decorate([
61
+ (0, typeorm_1.Column)({ name: 'recipient_name', type: 'varchar', length: 200 }),
62
+ __metadata("design:type", String)
63
+ ], CustomerAddressEntity.prototype, "recipientName", void 0);
64
+ __decorate([
65
+ (0, typeorm_1.Column)({ name: 'recipient_phone', type: 'varchar', length: 25 }),
66
+ __metadata("design:type", String)
67
+ ], CustomerAddressEntity.prototype, "recipientPhone", void 0);
68
+ __decorate([
69
+ (0, typeorm_1.Column)({ name: 'address_line', type: 'varchar', length: 500 }),
70
+ __metadata("design:type", String)
71
+ ], CustomerAddressEntity.prototype, "addressLine", void 0);
72
+ __decorate([
73
+ (0, typeorm_1.Column)({ type: 'varchar', length: 200, nullable: true }),
74
+ __metadata("design:type", Object)
75
+ ], CustomerAddressEntity.prototype, "complement", void 0);
76
+ __decorate([
77
+ (0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
78
+ __metadata("design:type", Object)
79
+ ], CustomerAddressEntity.prototype, "neighborhood", void 0);
80
+ __decorate([
81
+ (0, typeorm_1.Column)({ name: 'postal_code', type: 'varchar', length: 20, nullable: true }),
82
+ __metadata("design:type", Object)
83
+ ], CustomerAddressEntity.prototype, "postalCode", void 0);
84
+ __decorate([
85
+ (0, typeorm_1.Column)({
86
+ type: 'decimal',
87
+ precision: 10,
88
+ scale: 8,
89
+ nullable: true,
90
+ transformer: {
91
+ to: (value) => value,
92
+ from: (value) => (value ? parseFloat(value) : null),
93
+ },
94
+ }),
95
+ __metadata("design:type", Object)
96
+ ], CustomerAddressEntity.prototype, "latitude", void 0);
97
+ __decorate([
98
+ (0, typeorm_1.Column)({
99
+ type: 'decimal',
100
+ precision: 11,
101
+ scale: 8,
102
+ nullable: true,
103
+ transformer: {
104
+ to: (value) => value,
105
+ from: (value) => (value ? parseFloat(value) : null),
106
+ },
107
+ }),
108
+ __metadata("design:type", Object)
109
+ ], CustomerAddressEntity.prototype, "longitude", void 0);
110
+ __decorate([
111
+ (0, typeorm_1.Column)({ name: 'delivery_instructions', type: 'varchar', length: 500, nullable: true }),
112
+ __metadata("design:type", Object)
113
+ ], CustomerAddressEntity.prototype, "deliveryInstructions", void 0);
114
+ __decorate([
115
+ (0, typeorm_1.Column)({ name: 'is_main', type: 'boolean', default: false }),
116
+ __metadata("design:type", Boolean)
117
+ ], CustomerAddressEntity.prototype, "isMain", void 0);
118
+ __decorate([
119
+ (0, typeorm_1.Column)({ name: 'is_active', type: 'boolean', default: true }),
120
+ __metadata("design:type", Boolean)
121
+ ], CustomerAddressEntity.prototype, "isActive", void 0);
122
+ __decorate([
123
+ (0, typeorm_1.CreateDateColumn)({ name: 'created_at', type: 'timestamptz' }),
124
+ __metadata("design:type", Date)
125
+ ], CustomerAddressEntity.prototype, "createdAt", void 0);
126
+ __decorate([
127
+ (0, typeorm_1.UpdateDateColumn)({ name: 'updated_at', type: 'timestamptz' }),
128
+ __metadata("design:type", Date)
129
+ ], CustomerAddressEntity.prototype, "updatedAt", void 0);
130
+ __decorate([
131
+ (0, typeorm_1.DeleteDateColumn)({ name: 'deleted_at', type: 'timestamptz', nullable: true }),
132
+ __metadata("design:type", Object)
133
+ ], CustomerAddressEntity.prototype, "deletedAt", void 0);
134
+ __decorate([
135
+ (0, typeorm_1.ManyToOne)(() => customer_entity_1.CustomerEntity, (customer) => customer.addresses),
136
+ (0, typeorm_1.JoinColumn)({ name: 'customer_id' }),
137
+ __metadata("design:type", customer_entity_1.CustomerEntity)
138
+ ], CustomerAddressEntity.prototype, "customer", void 0);
139
+ __decorate([
140
+ (0, typeorm_1.ManyToOne)(() => city_entity_1.CityEntity, (city) => city.addresses),
141
+ (0, typeorm_1.JoinColumn)({ name: 'city_id' }),
142
+ __metadata("design:type", city_entity_1.CityEntity)
143
+ ], CustomerAddressEntity.prototype, "city", void 0);
144
+ exports.CustomerAddressEntity = CustomerAddressEntity = __decorate([
145
+ (0, typeorm_1.Entity)('customer_addresses'),
146
+ (0, typeorm_1.Index)('idx_customer_addresses_customer_id', ['customerId']),
147
+ (0, typeorm_1.Index)('idx_customer_addresses_city_id', ['cityId']),
148
+ (0, typeorm_1.Index)('idx_customer_addresses_country_id', ['countryId'])
149
+ ], CustomerAddressEntity);
150
+ //# sourceMappingURL=customer-address.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customer-address.entity.js","sourceRoot":"","sources":["../../src/entities/customer-address.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAUiB;AACjB,uDAAmD;AACnD,+CAA2C;AAkBpC,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAKhC,EAAE,CAAS;IAQX,UAAU,CAAS;IAMnB,MAAM,CAAS;IAQf,SAAS,CAAS;IAMlB,KAAK,CAAS;IAOd,aAAa,CAAS;IAOtB,cAAc,CAAS;IAMvB,WAAW,CAAS;IAMpB,UAAU,CAAgB;IAM1B,YAAY,CAAgB;IAM5B,UAAU,CAAgB;IAe1B,QAAQ,CAAgB;IAexB,SAAS,CAAgB;IAMzB,oBAAoB,CAAgB;IAMpC,MAAM,CAAU;IAMhB,QAAQ,CAAU;IAOlB,SAAS,CAAO;IAGhB,SAAS,CAAO;IAGhB,SAAS,CAAc;IAWvB,QAAQ,CAAiB;IAOzB,IAAI,CAAa;CAClB,CAAA;AAvJY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,IAAI;wDAAC;AAGhB;IADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;8BACnD,IAAI;wDAAC;AAGhB;IADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wDACvD;AAWvB;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,gCAAc,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC;IACjE,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;8BAC1B,gCAAc;uDAAC;AAOzB;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,wBAAU,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC;IACrD,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;8BAC1B,wBAAU;mDAAC;gCAtJN,qBAAqB;IAJjC,IAAA,gBAAM,EAAC,oBAAoB,CAAC;IAC5B,IAAA,eAAK,EAAC,oCAAoC,EAAE,CAAC,YAAY,CAAC,CAAC;IAC3D,IAAA,eAAK,EAAC,gCAAgC,EAAE,CAAC,QAAQ,CAAC,CAAC;IACnD,IAAA,eAAK,EAAC,mCAAmC,EAAE,CAAC,WAAW,CAAC,CAAC;GAC7C,qBAAqB,CAuJjC"}
@@ -0,0 +1,12 @@
1
+ import { CustomerEntity } from './customer.entity';
2
+ import { ProvidersCodeEntity } from './providers-code.entity';
3
+ export declare class CustomerProviderEntity {
4
+ customerProviderId: number;
5
+ customerId: number;
6
+ providerId: string;
7
+ providerCustomerId: string | null;
8
+ createdAt: Date;
9
+ updatedAt: Date;
10
+ customer: CustomerEntity;
11
+ provider: ProvidersCodeEntity;
12
+ }
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.CustomerProviderEntity = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const customer_entity_1 = require("./customer.entity");
15
+ const providers_code_entity_1 = require("./providers-code.entity");
16
+ let CustomerProviderEntity = class CustomerProviderEntity {
17
+ customerProviderId;
18
+ customerId;
19
+ providerId;
20
+ providerCustomerId;
21
+ createdAt;
22
+ updatedAt;
23
+ customer;
24
+ provider;
25
+ };
26
+ exports.CustomerProviderEntity = CustomerProviderEntity;
27
+ __decorate([
28
+ (0, typeorm_1.PrimaryGeneratedColumn)({ name: 'customer_provider_id' }),
29
+ __metadata("design:type", Number)
30
+ ], CustomerProviderEntity.prototype, "customerProviderId", void 0);
31
+ __decorate([
32
+ (0, typeorm_1.Column)({ name: 'customer_id', type: 'int', nullable: false }),
33
+ __metadata("design:type", Number)
34
+ ], CustomerProviderEntity.prototype, "customerId", void 0);
35
+ __decorate([
36
+ (0, typeorm_1.Column)({ type: 'char', length: 2, name: 'provider_id', nullable: false }),
37
+ __metadata("design:type", String)
38
+ ], CustomerProviderEntity.prototype, "providerId", void 0);
39
+ __decorate([
40
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, name: 'provider_customer_id', nullable: true }),
41
+ __metadata("design:type", Object)
42
+ ], CustomerProviderEntity.prototype, "providerCustomerId", void 0);
43
+ __decorate([
44
+ (0, typeorm_1.CreateDateColumn)({ type: 'timestamptz', name: 'created_at' }),
45
+ __metadata("design:type", Date)
46
+ ], CustomerProviderEntity.prototype, "createdAt", void 0);
47
+ __decorate([
48
+ (0, typeorm_1.UpdateDateColumn)({ type: 'timestamptz', name: 'updated_at' }),
49
+ __metadata("design:type", Date)
50
+ ], CustomerProviderEntity.prototype, "updatedAt", void 0);
51
+ __decorate([
52
+ (0, typeorm_1.ManyToOne)(() => customer_entity_1.CustomerEntity, { onDelete: 'CASCADE' }),
53
+ (0, typeorm_1.JoinColumn)({ name: 'customer_id' }),
54
+ __metadata("design:type", customer_entity_1.CustomerEntity)
55
+ ], CustomerProviderEntity.prototype, "customer", void 0);
56
+ __decorate([
57
+ (0, typeorm_1.ManyToOne)(() => providers_code_entity_1.ProvidersCodeEntity, { onDelete: 'RESTRICT' }),
58
+ (0, typeorm_1.JoinColumn)({ name: 'provider_id' }),
59
+ __metadata("design:type", providers_code_entity_1.ProvidersCodeEntity)
60
+ ], CustomerProviderEntity.prototype, "provider", void 0);
61
+ exports.CustomerProviderEntity = CustomerProviderEntity = __decorate([
62
+ (0, typeorm_1.Entity)('customer_providers'),
63
+ (0, typeorm_1.Index)('idx_customer_providers_customer', ['customerId']),
64
+ (0, typeorm_1.Index)('idx_customer_providers_provider', ['providerId']),
65
+ (0, typeorm_1.Index)('uk_customer_providers_external', ['providerId', 'providerCustomerId'], {
66
+ unique: true,
67
+ where: 'provider_customer_id IS NOT NULL',
68
+ })
69
+ ], CustomerProviderEntity);
70
+ //# sourceMappingURL=customer-provider.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customer-provider.entity.js","sourceRoot":"","sources":["../../src/entities/customer-provider.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCASiB;AACjB,uDAAmD;AACnD,mEAA8D;AA0BvD,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAKjC,kBAAkB,CAAS;IAM3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,aAAa,EAAE,CAAC;8BAC1B,2CAAmB;wDAAC;iCAvDnB,sBAAsB;IAPlC,IAAA,gBAAM,EAAC,oBAAoB,CAAC;IAC5B,IAAA,eAAK,EAAC,iCAAiC,EAAE,CAAC,YAAY,CAAC,CAAC;IACxD,IAAA,eAAK,EAAC,iCAAiC,EAAE,CAAC,YAAY,CAAC,CAAC;IACxD,IAAA,eAAK,EAAC,gCAAgC,EAAE,CAAC,YAAY,EAAE,oBAAoB,CAAC,EAAE;QAC7E,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE,kCAAkC;KAC1C,CAAC;GACW,sBAAsB,CAwDlC"}
@@ -0,0 +1,21 @@
1
+ export declare class CustomerEntity {
2
+ id: number;
3
+ email: string;
4
+ passwordHash: string;
5
+ emailVerified: boolean;
6
+ emailVerifiedAt: Date | null;
7
+ firstName: string;
8
+ lastName: string;
9
+ idType: string;
10
+ idNumber: string;
11
+ phoneCountryCode: string;
12
+ phoneNumber: string;
13
+ gender: string | null;
14
+ birthdate: Date | null;
15
+ createdAt: Date;
16
+ updatedAt: Date;
17
+ deletedAt: Date | null;
18
+ addresses: unknown[];
19
+ get fullName(): string;
20
+ get fullPhone(): string;
21
+ }
@@ -0,0 +1,114 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.CustomerEntity = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ let CustomerEntity = class CustomerEntity {
15
+ id;
16
+ email;
17
+ passwordHash;
18
+ emailVerified;
19
+ emailVerifiedAt;
20
+ firstName;
21
+ lastName;
22
+ idType;
23
+ idNumber;
24
+ phoneCountryCode;
25
+ phoneNumber;
26
+ gender;
27
+ birthdate;
28
+ createdAt;
29
+ updatedAt;
30
+ deletedAt;
31
+ addresses;
32
+ get fullName() {
33
+ return `${this.firstName} ${this.lastName}`;
34
+ }
35
+ get fullPhone() {
36
+ return `${this.phoneCountryCode}${this.phoneNumber}`;
37
+ }
38
+ };
39
+ exports.CustomerEntity = CustomerEntity;
40
+ __decorate([
41
+ (0, typeorm_1.PrimaryGeneratedColumn)(),
42
+ __metadata("design:type", Number)
43
+ ], CustomerEntity.prototype, "id", void 0);
44
+ __decorate([
45
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, unique: true }),
46
+ __metadata("design:type", String)
47
+ ], CustomerEntity.prototype, "email", void 0);
48
+ __decorate([
49
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, name: 'password_hash' }),
50
+ __metadata("design:type", String)
51
+ ], CustomerEntity.prototype, "passwordHash", void 0);
52
+ __decorate([
53
+ (0, typeorm_1.Column)({ type: 'boolean', default: false, name: 'email_verified' }),
54
+ __metadata("design:type", Boolean)
55
+ ], CustomerEntity.prototype, "emailVerified", void 0);
56
+ __decorate([
57
+ (0, typeorm_1.Column)({ type: 'timestamptz', nullable: true, name: 'email_verified_at' }),
58
+ __metadata("design:type", Object)
59
+ ], CustomerEntity.prototype, "emailVerifiedAt", void 0);
60
+ __decorate([
61
+ (0, typeorm_1.Column)({ type: 'varchar', length: 200, name: 'first_name' }),
62
+ __metadata("design:type", String)
63
+ ], CustomerEntity.prototype, "firstName", void 0);
64
+ __decorate([
65
+ (0, typeorm_1.Column)({ type: 'varchar', length: 200, name: 'last_name' }),
66
+ __metadata("design:type", String)
67
+ ], CustomerEntity.prototype, "lastName", void 0);
68
+ __decorate([
69
+ (0, typeorm_1.Column)({ type: 'varchar', length: 10, name: 'id_type' }),
70
+ __metadata("design:type", String)
71
+ ], CustomerEntity.prototype, "idType", void 0);
72
+ __decorate([
73
+ (0, typeorm_1.Column)({ type: 'varchar', length: 50, name: 'id_number' }),
74
+ __metadata("design:type", String)
75
+ ], CustomerEntity.prototype, "idNumber", void 0);
76
+ __decorate([
77
+ (0, typeorm_1.Column)({ type: 'varchar', length: 5, name: 'phone_country_code' }),
78
+ __metadata("design:type", String)
79
+ ], CustomerEntity.prototype, "phoneCountryCode", void 0);
80
+ __decorate([
81
+ (0, typeorm_1.Column)({ type: 'varchar', length: 20, name: 'phone_number' }),
82
+ __metadata("design:type", String)
83
+ ], CustomerEntity.prototype, "phoneNumber", void 0);
84
+ __decorate([
85
+ (0, typeorm_1.Column)({ type: 'char', length: 1, nullable: true }),
86
+ __metadata("design:type", Object)
87
+ ], CustomerEntity.prototype, "gender", void 0);
88
+ __decorate([
89
+ (0, typeorm_1.Column)({ type: 'date', nullable: true }),
90
+ __metadata("design:type", Object)
91
+ ], CustomerEntity.prototype, "birthdate", void 0);
92
+ __decorate([
93
+ (0, typeorm_1.CreateDateColumn)({ name: 'created_at', type: 'timestamptz' }),
94
+ __metadata("design:type", Date)
95
+ ], CustomerEntity.prototype, "createdAt", void 0);
96
+ __decorate([
97
+ (0, typeorm_1.UpdateDateColumn)({ name: 'updated_at', type: 'timestamptz' }),
98
+ __metadata("design:type", Date)
99
+ ], CustomerEntity.prototype, "updatedAt", void 0);
100
+ __decorate([
101
+ (0, typeorm_1.DeleteDateColumn)({ name: 'deleted_at', type: 'timestamptz', nullable: true }),
102
+ __metadata("design:type", Object)
103
+ ], CustomerEntity.prototype, "deletedAt", void 0);
104
+ __decorate([
105
+ (0, typeorm_1.OneToMany)('CustomerAddressEntity', 'customer'),
106
+ __metadata("design:type", Array)
107
+ ], CustomerEntity.prototype, "addresses", void 0);
108
+ exports.CustomerEntity = CustomerEntity = __decorate([
109
+ (0, typeorm_1.Entity)('customers'),
110
+ (0, typeorm_1.Index)('idx_customers_email', ['email'], { unique: true }),
111
+ (0, typeorm_1.Index)('idx_customers_document', ['idType', 'idNumber'], { unique: true }),
112
+ (0, typeorm_1.Index)('idx_customers_phone', ['phoneCountryCode', 'phoneNumber'], { unique: true })
113
+ ], CustomerEntity);
114
+ //# sourceMappingURL=customer.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customer.entity.js","sourceRoot":"","sources":["../../src/entities/customer.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCASiB;AAwBV,IAAM,cAAc,GAApB,MAAM,cAAc;IAMzB,EAAE,CAAS;IAWX,KAAK,CAAS;IAOd,YAAY,CAAS;IAMrB,aAAa,CAAU;IAMvB,eAAe,CAAc;IAU7B,SAAS,CAAS;IAMlB,QAAQ,CAAS;IAOjB,MAAM,CAAS;IAMf,QAAQ,CAAS;IAMjB,gBAAgB,CAAS;IAMzB,WAAW,CAAS;IAMpB,MAAM,CAAgB;IAMtB,SAAS,CAAc;IAOvB,SAAS,CAAO;IAGhB,SAAS,CAAO;IAGhB,SAAS,CAAc;IAWvB,SAAS,CAAY;IASrB,IAAI,QAAQ;QACV,OAAO,GAAG,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;IAC9C,CAAC;IAKD,IAAI,SAAS;QACX,OAAO,GAAG,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;IACvD,CAAC;CACF,CAAA;AApIY,wCAAc;AAMzB;IADC,IAAA,gCAAsB,GAAE;;0CACd;AAWX;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;6CACzC;AAOd;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,IA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,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDAClB;AAOvB;IADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;8BACnD,IAAI;iDAAC;AAGhB;IADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;8BACnD,IAAI;iDAAC;AAGhB;IADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACvD;AAWvB;IADC,IAAA,mBAAS,EAAC,uBAAuB,EAAE,UAAU,CAAC;;iDAC1B;yBAjHV,cAAc;IAJ1B,IAAA,gBAAM,EAAC,WAAW,CAAC;IACnB,IAAA,eAAK,EAAC,qBAAqB,EAAE,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACzD,IAAA,eAAK,EAAC,wBAAwB,EAAE,CAAC,QAAQ,EAAE,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACzE,IAAA,eAAK,EAAC,qBAAqB,EAAE,CAAC,kBAAkB,EAAE,aAAa,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;GACvE,cAAc,CAoI1B"}
@@ -0,0 +1,15 @@
1
+ import { CustomerEntity } from './customer.entity';
2
+ export declare class EmailVerificationTokenEntity {
3
+ id: number;
4
+ customerId: number;
5
+ token: string;
6
+ expiresAt: Date;
7
+ usedAt: Date | null;
8
+ sendAt: Date;
9
+ createdAt: Date;
10
+ updatedAt: Date;
11
+ customer: CustomerEntity;
12
+ get isExpired(): boolean;
13
+ get isUsed(): boolean;
14
+ get isValid(): boolean;
15
+ }
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.EmailVerificationTokenEntity = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const customer_entity_1 = require("./customer.entity");
15
+ let EmailVerificationTokenEntity = class EmailVerificationTokenEntity {
16
+ id;
17
+ customerId;
18
+ token;
19
+ expiresAt;
20
+ usedAt;
21
+ sendAt;
22
+ createdAt;
23
+ updatedAt;
24
+ customer;
25
+ get isExpired() {
26
+ return new Date() > this.expiresAt;
27
+ }
28
+ get isUsed() {
29
+ return this.usedAt !== null && this.usedAt !== undefined;
30
+ }
31
+ get isValid() {
32
+ return !this.isExpired && !this.isUsed;
33
+ }
34
+ };
35
+ exports.EmailVerificationTokenEntity = EmailVerificationTokenEntity;
36
+ __decorate([
37
+ (0, typeorm_1.PrimaryGeneratedColumn)(),
38
+ __metadata("design:type", Number)
39
+ ], EmailVerificationTokenEntity.prototype, "id", void 0);
40
+ __decorate([
41
+ (0, typeorm_1.Column)({ name: 'customer_id', type: 'int', nullable: false }),
42
+ __metadata("design:type", Number)
43
+ ], EmailVerificationTokenEntity.prototype, "customerId", void 0);
44
+ __decorate([
45
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
46
+ __metadata("design:type", String)
47
+ ], EmailVerificationTokenEntity.prototype, "token", void 0);
48
+ __decorate([
49
+ (0, typeorm_1.Column)({ name: 'expires_at', type: 'timestamptz', nullable: false }),
50
+ __metadata("design:type", Date)
51
+ ], EmailVerificationTokenEntity.prototype, "expiresAt", void 0);
52
+ __decorate([
53
+ (0, typeorm_1.Column)({ name: 'used_at', type: 'timestamptz', nullable: true }),
54
+ __metadata("design:type", Object)
55
+ ], EmailVerificationTokenEntity.prototype, "usedAt", void 0);
56
+ __decorate([
57
+ (0, typeorm_1.Column)({ name: 'send_at', type: 'timestamptz', nullable: false }),
58
+ __metadata("design:type", Date)
59
+ ], EmailVerificationTokenEntity.prototype, "sendAt", void 0);
60
+ __decorate([
61
+ (0, typeorm_1.CreateDateColumn)({ type: 'timestamptz', name: 'created_at' }),
62
+ __metadata("design:type", Date)
63
+ ], EmailVerificationTokenEntity.prototype, "createdAt", void 0);
64
+ __decorate([
65
+ (0, typeorm_1.UpdateDateColumn)({ type: 'timestamptz', name: 'updated_at' }),
66
+ __metadata("design:type", Date)
67
+ ], EmailVerificationTokenEntity.prototype, "updatedAt", void 0);
68
+ __decorate([
69
+ (0, typeorm_1.ManyToOne)(() => customer_entity_1.CustomerEntity, { onDelete: 'CASCADE' }),
70
+ (0, typeorm_1.JoinColumn)({ name: 'customer_id' }),
71
+ __metadata("design:type", customer_entity_1.CustomerEntity)
72
+ ], EmailVerificationTokenEntity.prototype, "customer", void 0);
73
+ exports.EmailVerificationTokenEntity = EmailVerificationTokenEntity = __decorate([
74
+ (0, typeorm_1.Entity)('email_verification_tokens'),
75
+ (0, typeorm_1.Index)('idx_email_verification_tokens_customer_id', ['customerId']),
76
+ (0, typeorm_1.Index)('idx_email_verification_tokens_token', ['token'])
77
+ ], EmailVerificationTokenEntity);
78
+ //# sourceMappingURL=email-verification-token.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"email-verification-token.entity.js","sourceRoot":"","sources":["../../src/entities/email-verification-token.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCASiB;AACjB,uDAAmD;AAoB5C,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IAKvC,EAAE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aAAa,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;8BACnD,IAAI;+DAAC;AAMhB;IADC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;8BACnD,IAAI;+DAAC;AAWhB;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,gCAAc,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IACxD,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;8BAC1B,gCAAc;8DAAC;uCA3Dd,4BAA4B;IAHxC,IAAA,gBAAM,EAAC,2BAA2B,CAAC;IACnC,IAAA,eAAK,EAAC,2CAA2C,EAAE,CAAC,YAAY,CAAC,CAAC;IAClE,IAAA,eAAK,EAAC,qCAAqC,EAAE,CAAC,OAAO,CAAC,CAAC;GAC3C,4BAA4B,CAqFxC"}
@@ -1 +1,8 @@
1
1
  export * from './base.entity';
2
+ export * from './customer.entity';
3
+ export * from './customer-address.entity';
4
+ export * from './state.entity';
5
+ export * from './city.entity';
6
+ export * from './providers-code.entity';
7
+ export * from './customer-provider.entity';
8
+ export * from './email-verification-token.entity';
@@ -15,4 +15,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./base.entity"), exports);
18
+ __exportStar(require("./customer.entity"), exports);
19
+ __exportStar(require("./customer-address.entity"), exports);
20
+ __exportStar(require("./state.entity"), exports);
21
+ __exportStar(require("./city.entity"), exports);
22
+ __exportStar(require("./providers-code.entity"), exports);
23
+ __exportStar(require("./customer-provider.entity"), exports);
24
+ __exportStar(require("./email-verification-token.entity"), exports);
18
25
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/entities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AASA,gDAA8B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/entities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAaA,gDAA8B;AAC9B,oDAAkC;AAClC,4DAA0C;AAC1C,iDAA+B;AAC/B,gDAA8B;AAC9B,0DAAwC;AACxC,6DAA2C;AAC3C,oEAAkD"}
@@ -0,0 +1,6 @@
1
+ export declare class ProvidersCodeEntity {
2
+ providerId: string;
3
+ providerName: string;
4
+ createdAt: Date;
5
+ updatedAt: Date;
6
+ }