@sildeswj/thechium-schema 1.0.0

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 (47) hide show
  1. package/dist/collectionCompany.schema.d.ts +18 -0
  2. package/dist/collectionCompany.schema.d.ts.map +1 -0
  3. package/dist/collectionCompany.schema.js +55 -0
  4. package/dist/collectionCompany.schema.js.map +1 -0
  5. package/dist/collectionCompanyEmployee.schema.d.ts +19 -0
  6. package/dist/collectionCompanyEmployee.schema.d.ts.map +1 -0
  7. package/dist/collectionCompanyEmployee.schema.js +57 -0
  8. package/dist/collectionCompanyEmployee.schema.js.map +1 -0
  9. package/dist/collectionOrder.schema.d.ts +22 -0
  10. package/dist/collectionOrder.schema.d.ts.map +1 -0
  11. package/dist/collectionOrder.schema.js +94 -0
  12. package/dist/collectionOrder.schema.js.map +1 -0
  13. package/dist/deliveryMan.schema.d.ts +19 -0
  14. package/dist/deliveryMan.schema.d.ts.map +1 -0
  15. package/dist/deliveryMan.schema.js +57 -0
  16. package/dist/deliveryMan.schema.js.map +1 -0
  17. package/dist/index.d.ts +8 -0
  18. package/dist/index.d.ts.map +1 -0
  19. package/dist/index.js +26 -0
  20. package/dist/index.js.map +1 -0
  21. package/dist/options.d.ts +3 -0
  22. package/dist/options.d.ts.map +1 -0
  23. package/dist/options.js +7 -0
  24. package/dist/options.js.map +1 -0
  25. package/dist/retailBrand.schema.d.ts +16 -0
  26. package/dist/retailBrand.schema.d.ts.map +1 -0
  27. package/dist/retailBrand.schema.js +45 -0
  28. package/dist/retailBrand.schema.js.map +1 -0
  29. package/dist/retailStore.schema.d.ts +22 -0
  30. package/dist/retailStore.schema.d.ts.map +1 -0
  31. package/dist/retailStore.schema.js +73 -0
  32. package/dist/retailStore.schema.js.map +1 -0
  33. package/dist/retailStoreEmployee.schema.d.ts +19 -0
  34. package/dist/retailStoreEmployee.schema.d.ts.map +1 -0
  35. package/dist/retailStoreEmployee.schema.js +57 -0
  36. package/dist/retailStoreEmployee.schema.js.map +1 -0
  37. package/package.json +27 -0
  38. package/src/collectionCompany.schema.ts +35 -0
  39. package/src/collectionCompanyEmployee.schema.ts +35 -0
  40. package/src/collectionOrder.schema.ts +57 -0
  41. package/src/deliveryMan.schema.ts +36 -0
  42. package/src/index.ts +10 -0
  43. package/src/options.ts +5 -0
  44. package/src/retailBrand.schema.ts +24 -0
  45. package/src/retailStore.schema.ts +55 -0
  46. package/src/retailStoreEmployee.schema.ts +37 -0
  47. package/tsconfig.json +20 -0
@@ -0,0 +1,18 @@
1
+ import mongoose from 'mongoose';
2
+ export declare class CollectionCompany {
3
+ name: string;
4
+ parentCollectionCompany?: mongoose.Schema.Types.ObjectId;
5
+ contact?: mongoose.Schema.Types.ObjectId;
6
+ code: string;
7
+ status: string;
8
+ }
9
+ export declare const CollectionCompanySchema: mongoose.Schema<CollectionCompany, mongoose.Model<CollectionCompany, any, any, any, mongoose.Document<unknown, any, CollectionCompany> & CollectionCompany & {
10
+ _id: mongoose.Types.ObjectId;
11
+ } & {
12
+ __v: number;
13
+ }, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, CollectionCompany, mongoose.Document<unknown, {}, mongoose.FlatRecord<CollectionCompany>> & mongoose.FlatRecord<CollectionCompany> & {
14
+ _id: mongoose.Types.ObjectId;
15
+ } & {
16
+ __v: number;
17
+ }>;
18
+ //# sourceMappingURL=collectionCompany.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collectionCompany.schema.d.ts","sourceRoot":"","sources":["../src/collectionCompany.schema.ts"],"names":[],"mappings":"AAEA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAGhC,qBACa,iBAAiB;IAE5B,IAAI,EAAE,MAAM,CAAC;IAMb,uBAAuB,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC;IAMzD,OAAO,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC;IAGzC,IAAI,EAAE,MAAM,CAAC;IAOb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,uBAAuB;;;;;;;;EACa,CAAC"}
@@ -0,0 +1,55 @@
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
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.CollectionCompanySchema = exports.CollectionCompany = void 0;
16
+ const mongoose_1 = require("@nestjs/mongoose");
17
+ const options_1 = require("./options");
18
+ const mongoose_2 = __importDefault(require("mongoose"));
19
+ // 좌상 (배송지사)
20
+ let CollectionCompany = class CollectionCompany {
21
+ };
22
+ exports.CollectionCompany = CollectionCompany;
23
+ __decorate([
24
+ (0, mongoose_1.Prop)({ required: true }),
25
+ __metadata("design:type", String)
26
+ ], CollectionCompany.prototype, "name", void 0);
27
+ __decorate([
28
+ (0, mongoose_1.Prop)({
29
+ type: mongoose_2.default.Schema.Types.ObjectId,
30
+ }),
31
+ __metadata("design:type", mongoose_2.default.Schema.Types.ObjectId)
32
+ ], CollectionCompany.prototype, "parentCollectionCompany", void 0);
33
+ __decorate([
34
+ (0, mongoose_1.Prop)({
35
+ type: mongoose_2.default.Schema.Types.ObjectId,
36
+ }),
37
+ __metadata("design:type", mongoose_2.default.Schema.Types.ObjectId)
38
+ ], CollectionCompany.prototype, "contact", void 0);
39
+ __decorate([
40
+ (0, mongoose_1.Prop)({ required: true, unique: true }),
41
+ __metadata("design:type", String)
42
+ ], CollectionCompany.prototype, "code", void 0);
43
+ __decorate([
44
+ (0, mongoose_1.Prop)({
45
+ required: true,
46
+ enum: ['active', 'deleted'],
47
+ default: 'active',
48
+ }),
49
+ __metadata("design:type", String)
50
+ ], CollectionCompany.prototype, "status", void 0);
51
+ exports.CollectionCompany = CollectionCompany = __decorate([
52
+ (0, mongoose_1.Schema)(options_1.options)
53
+ ], CollectionCompany);
54
+ exports.CollectionCompanySchema = mongoose_1.SchemaFactory.createForClass(CollectionCompany);
55
+ //# sourceMappingURL=collectionCompany.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collectionCompany.schema.js","sourceRoot":"","sources":["../src/collectionCompany.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+CAA+D;AAC/D,uCAAoC;AACpC,wDAAgC;AAEhC,YAAY;AAEL,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;CAyB7B,CAAA;AAzBY,8CAAiB;AAE5B;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACZ;AAMb;IAHC,IAAA,eAAI,EAAC;QACJ,IAAI,EAAE,kBAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ;KACrC,CAAC;8BACwB,kBAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ;kEAAC;AAMzD;IAHC,IAAA,eAAI,EAAC;QACJ,IAAI,EAAE,kBAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ;KACrC,CAAC;8BACQ,kBAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ;kDAAC;AAGzC;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;+CAC1B;AAOb;IALC,IAAA,eAAI,EAAC;QACJ,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC;QAC3B,OAAO,EAAE,QAAQ;KAClB,CAAC;;iDACa;4BAxBJ,iBAAiB;IAD7B,IAAA,iBAAM,EAAC,iBAAO,CAAC;GACH,iBAAiB,CAyB7B;AAEY,QAAA,uBAAuB,GAClC,wBAAa,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAC"}
@@ -0,0 +1,19 @@
1
+ import mongoose from 'mongoose';
2
+ export declare class CollectionCompanyEmployee {
3
+ name: string;
4
+ email: string;
5
+ password: string;
6
+ phoneNumber?: string;
7
+ collectionCompany: mongoose.Schema.Types.ObjectId;
8
+ status: string;
9
+ }
10
+ export declare const CollectionCompanyEmployeeSchema: mongoose.Schema<CollectionCompanyEmployee, mongoose.Model<CollectionCompanyEmployee, any, any, any, mongoose.Document<unknown, any, CollectionCompanyEmployee> & CollectionCompanyEmployee & {
11
+ _id: mongoose.Types.ObjectId;
12
+ } & {
13
+ __v: number;
14
+ }, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, CollectionCompanyEmployee, mongoose.Document<unknown, {}, mongoose.FlatRecord<CollectionCompanyEmployee>> & mongoose.FlatRecord<CollectionCompanyEmployee> & {
15
+ _id: mongoose.Types.ObjectId;
16
+ } & {
17
+ __v: number;
18
+ }>;
19
+ //# sourceMappingURL=collectionCompanyEmployee.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collectionCompanyEmployee.schema.d.ts","sourceRoot":"","sources":["../src/collectionCompanyEmployee.schema.ts"],"names":[],"mappings":"AAEA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAEhC,qBACa,yBAAyB;IAEpC,IAAI,EAAE,MAAM,CAAC;IAGb,KAAK,EAAE,MAAM,CAAC;IAGd,QAAQ,EAAE,MAAM,CAAC;IAGjB,WAAW,CAAC,EAAE,MAAM,CAAC;IAMrB,iBAAiB,EAAE,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC;IAOlD,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,+BAA+B;;;;;;;;EAE3C,CAAC"}
@@ -0,0 +1,57 @@
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
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.CollectionCompanyEmployeeSchema = exports.CollectionCompanyEmployee = void 0;
16
+ const mongoose_1 = require("@nestjs/mongoose");
17
+ const options_1 = require("./options");
18
+ const mongoose_2 = __importDefault(require("mongoose"));
19
+ let CollectionCompanyEmployee = class CollectionCompanyEmployee {
20
+ };
21
+ exports.CollectionCompanyEmployee = CollectionCompanyEmployee;
22
+ __decorate([
23
+ (0, mongoose_1.Prop)({ required: true }),
24
+ __metadata("design:type", String)
25
+ ], CollectionCompanyEmployee.prototype, "name", void 0);
26
+ __decorate([
27
+ (0, mongoose_1.Prop)({ required: true, unique: true }),
28
+ __metadata("design:type", String)
29
+ ], CollectionCompanyEmployee.prototype, "email", void 0);
30
+ __decorate([
31
+ (0, mongoose_1.Prop)({ required: true }),
32
+ __metadata("design:type", String)
33
+ ], CollectionCompanyEmployee.prototype, "password", void 0);
34
+ __decorate([
35
+ (0, mongoose_1.Prop)(),
36
+ __metadata("design:type", String)
37
+ ], CollectionCompanyEmployee.prototype, "phoneNumber", void 0);
38
+ __decorate([
39
+ (0, mongoose_1.Prop)({
40
+ required: true,
41
+ type: mongoose_2.default.Schema.Types.ObjectId,
42
+ }),
43
+ __metadata("design:type", mongoose_2.default.Schema.Types.ObjectId)
44
+ ], CollectionCompanyEmployee.prototype, "collectionCompany", void 0);
45
+ __decorate([
46
+ (0, mongoose_1.Prop)({
47
+ required: true,
48
+ enum: ['active', 'deleted'],
49
+ default: 'active',
50
+ }),
51
+ __metadata("design:type", String)
52
+ ], CollectionCompanyEmployee.prototype, "status", void 0);
53
+ exports.CollectionCompanyEmployee = CollectionCompanyEmployee = __decorate([
54
+ (0, mongoose_1.Schema)(options_1.options)
55
+ ], CollectionCompanyEmployee);
56
+ exports.CollectionCompanyEmployeeSchema = mongoose_1.SchemaFactory.createForClass(CollectionCompanyEmployee);
57
+ //# sourceMappingURL=collectionCompanyEmployee.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collectionCompanyEmployee.schema.js","sourceRoot":"","sources":["../src/collectionCompanyEmployee.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+CAA+D;AAC/D,uCAAoC;AACpC,wDAAgC;AAGzB,IAAM,yBAAyB,GAA/B,MAAM,yBAAyB;CAyBrC,CAAA;AAzBY,8DAAyB;AAEpC;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uDACZ;AAGb;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;wDACzB;AAGd;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2DACR;AAGjB;IADC,IAAA,eAAI,GAAE;;8DACc;AAMrB;IAJC,IAAA,eAAI,EAAC;QACJ,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,kBAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ;KACrC,CAAC;8BACiB,kBAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ;oEAAC;AAOlD;IALC,IAAA,eAAI,EAAC;QACJ,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC;QAC3B,OAAO,EAAE,QAAQ;KAClB,CAAC;;yDACa;oCAxBJ,yBAAyB;IADrC,IAAA,iBAAM,EAAC,iBAAO,CAAC;GACH,yBAAyB,CAyBrC;AAEY,QAAA,+BAA+B,GAAG,wBAAa,CAAC,cAAc,CACzE,yBAAyB,CAC1B,CAAC"}
@@ -0,0 +1,22 @@
1
+ import mongoose, { Document } from 'mongoose';
2
+ export declare class CollectionOrder extends Document {
3
+ requestMemo?: string;
4
+ collectionVolume: string;
5
+ actualCollectionVolume?: string;
6
+ pickupDate?: Date;
7
+ pickupRequestDate: Date;
8
+ signature?: string;
9
+ status: 'active' | 'deleted' | 'completed' | 'booking' | 'canceled';
10
+ deliveryMan: mongoose.Schema.Types.ObjectId;
11
+ retailStore: mongoose.Schema.Types.ObjectId;
12
+ }
13
+ export declare const CollectionOrderSchema: mongoose.Schema<CollectionOrder, mongoose.Model<CollectionOrder, any, any, any, mongoose.Document<unknown, any, CollectionOrder> & CollectionOrder & Required<{
14
+ _id: unknown;
15
+ }> & {
16
+ __v: number;
17
+ }, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, CollectionOrder, mongoose.Document<unknown, {}, mongoose.FlatRecord<CollectionOrder>> & mongoose.FlatRecord<CollectionOrder> & Required<{
18
+ _id: unknown;
19
+ }> & {
20
+ __v: number;
21
+ }>;
22
+ //# sourceMappingURL=collectionOrder.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collectionOrder.schema.d.ts","sourceRoot":"","sources":["../src/collectionOrder.schema.ts"],"names":[],"mappings":"AAEA,OAAO,QAAQ,EAAE,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAE9C,qBACa,eAAgB,SAAQ,QAAQ;IAG3C,WAAW,CAAC,EAAE,MAAM,CAAC;IAIrB,gBAAgB,EAAE,MAAM,CAAC;IAIzB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAIhC,UAAU,CAAC,EAAE,IAAI,CAAC;IAIlB,iBAAiB,EAAE,IAAI,CAAC;IAIxB,SAAS,CAAC,EAAE,MAAM,CAAC;IAQnB,MAAM,EAAE,QAAQ,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,UAAU,CAAC;IAQpE,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC;IAQ5C,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC;CAC7C;AAED,eAAO,MAAM,qBAAqB;;;;;;;;EACa,CAAC"}
@@ -0,0 +1,94 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
19
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
20
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
21
+ 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;
22
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
23
+ };
24
+ var __importStar = (this && this.__importStar) || function (mod) {
25
+ if (mod && mod.__esModule) return mod;
26
+ var result = {};
27
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
28
+ __setModuleDefault(result, mod);
29
+ return result;
30
+ };
31
+ var __metadata = (this && this.__metadata) || function (k, v) {
32
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
33
+ };
34
+ Object.defineProperty(exports, "__esModule", { value: true });
35
+ exports.CollectionOrderSchema = exports.CollectionOrder = void 0;
36
+ const mongoose_1 = require("@nestjs/mongoose");
37
+ const options_1 = require("./options");
38
+ const mongoose_2 = __importStar(require("mongoose"));
39
+ let CollectionOrder = class CollectionOrder extends mongoose_2.Document {
40
+ };
41
+ exports.CollectionOrder = CollectionOrder;
42
+ __decorate([
43
+ (0, mongoose_1.Prop)({ required: false, maxlength: 500 }),
44
+ __metadata("design:type", String)
45
+ ], CollectionOrder.prototype, "requestMemo", void 0);
46
+ __decorate([
47
+ (0, mongoose_1.Prop)({ required: true }),
48
+ __metadata("design:type", String)
49
+ ], CollectionOrder.prototype, "collectionVolume", void 0);
50
+ __decorate([
51
+ (0, mongoose_1.Prop)(),
52
+ __metadata("design:type", String)
53
+ ], CollectionOrder.prototype, "actualCollectionVolume", void 0);
54
+ __decorate([
55
+ (0, mongoose_1.Prop)(),
56
+ __metadata("design:type", Date)
57
+ ], CollectionOrder.prototype, "pickupDate", void 0);
58
+ __decorate([
59
+ (0, mongoose_1.Prop)({ required: true, type: Date }),
60
+ __metadata("design:type", Date)
61
+ ], CollectionOrder.prototype, "pickupRequestDate", void 0);
62
+ __decorate([
63
+ (0, mongoose_1.Prop)(),
64
+ __metadata("design:type", String)
65
+ ], CollectionOrder.prototype, "signature", void 0);
66
+ __decorate([
67
+ (0, mongoose_1.Prop)({
68
+ required: true,
69
+ enum: ['active', 'deleted', 'completed', 'booking', 'canceled'],
70
+ default: 'booking',
71
+ }),
72
+ __metadata("design:type", String)
73
+ ], CollectionOrder.prototype, "status", void 0);
74
+ __decorate([
75
+ (0, mongoose_1.Prop)({
76
+ required: true,
77
+ type: mongoose_2.default.Schema.Types.ObjectId,
78
+ ref: 'DeliveryMan',
79
+ }),
80
+ __metadata("design:type", mongoose_2.default.Schema.Types.ObjectId)
81
+ ], CollectionOrder.prototype, "deliveryMan", void 0);
82
+ __decorate([
83
+ (0, mongoose_1.Prop)({
84
+ required: true,
85
+ type: mongoose_2.default.Schema.Types.ObjectId,
86
+ ref: 'RetailStore',
87
+ }),
88
+ __metadata("design:type", mongoose_2.default.Schema.Types.ObjectId)
89
+ ], CollectionOrder.prototype, "retailStore", void 0);
90
+ exports.CollectionOrder = CollectionOrder = __decorate([
91
+ (0, mongoose_1.Schema)(options_1.options)
92
+ ], CollectionOrder);
93
+ exports.CollectionOrderSchema = mongoose_1.SchemaFactory.createForClass(CollectionOrder);
94
+ //# sourceMappingURL=collectionOrder.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collectionOrder.schema.js","sourceRoot":"","sources":["../src/collectionOrder.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA+D;AAC/D,uCAAoC;AACpC,qDAA8C;AAGvC,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,mBAAQ;CAgD5C,CAAA;AAhDY,0CAAe;AAG1B;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC;;oDACrB;AAIrB;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yDACA;AAIzB;IADC,IAAA,eAAI,GAAE;;+DACyB;AAIhC;IADC,IAAA,eAAI,GAAE;8BACM,IAAI;mDAAC;AAIlB;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;8BAClB,IAAI;0DAAC;AAIxB;IADC,IAAA,eAAI,GAAE;;kDACY;AAQnB;IALC,IAAA,eAAI,EAAC;QACJ,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,CAAC;QAC/D,OAAO,EAAE,SAAS;KACnB,CAAC;;+CACkE;AAQpE;IALC,IAAA,eAAI,EAAC;QACJ,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,kBAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ;QACpC,GAAG,EAAE,aAAa;KACnB,CAAC;8BACW,kBAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ;oDAAC;AAQ5C;IALC,IAAA,eAAI,EAAC;QACJ,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,kBAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ;QACpC,GAAG,EAAE,aAAa;KACnB,CAAC;8BACW,kBAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ;oDAAC;0BA/CjC,eAAe;IAD3B,IAAA,iBAAM,EAAC,iBAAO,CAAC;GACH,eAAe,CAgD3B;AAEY,QAAA,qBAAqB,GAChC,wBAAa,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC"}
@@ -0,0 +1,19 @@
1
+ import mongoose from 'mongoose';
2
+ export declare class DeliveryMan {
3
+ name: string;
4
+ phoneNumber: string;
5
+ password: string;
6
+ expoPushToken: string[];
7
+ collectionCompany: mongoose.Schema.Types.ObjectId;
8
+ status: string;
9
+ }
10
+ export declare const DeliveryManSchema: mongoose.Schema<DeliveryMan, mongoose.Model<DeliveryMan, any, any, any, mongoose.Document<unknown, any, DeliveryMan> & DeliveryMan & {
11
+ _id: mongoose.Types.ObjectId;
12
+ } & {
13
+ __v: number;
14
+ }, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, DeliveryMan, mongoose.Document<unknown, {}, mongoose.FlatRecord<DeliveryMan>> & mongoose.FlatRecord<DeliveryMan> & {
15
+ _id: mongoose.Types.ObjectId;
16
+ } & {
17
+ __v: number;
18
+ }>;
19
+ //# sourceMappingURL=deliveryMan.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deliveryMan.schema.d.ts","sourceRoot":"","sources":["../src/deliveryMan.schema.ts"],"names":[],"mappings":"AAEA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAEhC,qBACa,WAAW;IAEtB,IAAI,EAAE,MAAM,CAAC;IAGb,WAAW,EAAE,MAAM,CAAC;IAGpB,QAAQ,EAAE,MAAM,CAAC;IAGjB,aAAa,EAAE,MAAM,EAAE,CAAC;IAMxB,iBAAiB,EAAE,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC;IAUlD,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,iBAAiB;;;;;;;;EAA4C,CAAC"}
@@ -0,0 +1,57 @@
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
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.DeliveryManSchema = exports.DeliveryMan = void 0;
16
+ const mongoose_1 = require("@nestjs/mongoose");
17
+ const options_1 = require("./options");
18
+ const mongoose_2 = __importDefault(require("mongoose"));
19
+ let DeliveryMan = class DeliveryMan {
20
+ };
21
+ exports.DeliveryMan = DeliveryMan;
22
+ __decorate([
23
+ (0, mongoose_1.Prop)({ required: true }),
24
+ __metadata("design:type", String)
25
+ ], DeliveryMan.prototype, "name", void 0);
26
+ __decorate([
27
+ (0, mongoose_1.Prop)({ required: true, unique: true }),
28
+ __metadata("design:type", String)
29
+ ], DeliveryMan.prototype, "phoneNumber", void 0);
30
+ __decorate([
31
+ (0, mongoose_1.Prop)({ required: true }),
32
+ __metadata("design:type", String)
33
+ ], DeliveryMan.prototype, "password", void 0);
34
+ __decorate([
35
+ (0, mongoose_1.Prop)({ required: false }),
36
+ __metadata("design:type", Array)
37
+ ], DeliveryMan.prototype, "expoPushToken", void 0);
38
+ __decorate([
39
+ (0, mongoose_1.Prop)({
40
+ required: true,
41
+ type: mongoose_2.default.Schema.Types.ObjectId,
42
+ }),
43
+ __metadata("design:type", mongoose_2.default.Schema.Types.ObjectId)
44
+ ], DeliveryMan.prototype, "collectionCompany", void 0);
45
+ __decorate([
46
+ (0, mongoose_1.Prop)({
47
+ required: true,
48
+ enum: ['active', 'deleted'],
49
+ default: 'active',
50
+ }),
51
+ __metadata("design:type", String)
52
+ ], DeliveryMan.prototype, "status", void 0);
53
+ exports.DeliveryMan = DeliveryMan = __decorate([
54
+ (0, mongoose_1.Schema)(options_1.options)
55
+ ], DeliveryMan);
56
+ exports.DeliveryManSchema = mongoose_1.SchemaFactory.createForClass(DeliveryMan);
57
+ //# sourceMappingURL=deliveryMan.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deliveryMan.schema.js","sourceRoot":"","sources":["../src/deliveryMan.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+CAA+D;AAC/D,uCAAoC;AACpC,wDAAgC;AAGzB,IAAM,WAAW,GAAjB,MAAM,WAAW;CA4BvB,CAAA;AA5BY,kCAAW;AAEtB;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCACZ;AAGb;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;gDACnB;AAGpB;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACR;AAGjB;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;kDACF;AAMxB;IAJC,IAAA,eAAI,EAAC;QACJ,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,kBAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ;KACrC,CAAC;8BACiB,kBAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ;sDAAC;AAUlD;IALC,IAAA,eAAI,EAAC;QACJ,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC;QAC3B,OAAO,EAAE,QAAQ;KAClB,CAAC;;2CACa;sBA3BJ,WAAW;IADvB,IAAA,iBAAM,EAAC,iBAAO,CAAC;GACH,WAAW,CA4BvB;AAEY,QAAA,iBAAiB,GAAG,wBAAa,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ export * from "./collectionCompany.schema";
2
+ export * from "./collectionCompanyEmployee.schema";
3
+ export * from "./collectionOrder.schema";
4
+ export * from "./deliveryMan.schema";
5
+ export * from "./retailBrand.schema";
6
+ export * from "./retailStore.schema";
7
+ export * from "./retailStoreEmployee.schema";
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,4BAA4B,CAAA;AAC1C,cAAc,oCAAoC,CAAA;AAClD,cAAc,0BAA0B,CAAA;AACxC,cAAc,sBAAsB,CAAA;AACpC,cAAc,sBAAsB,CAAA;AACpC,cAAc,sBAAsB,CAAA;AACpC,cAAc,8BAA8B,CAAA"}
package/dist/index.js ADDED
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ // export * from './thechium-schema.module';
3
+ // export * from './thechium-schema.service';
4
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5
+ if (k2 === undefined) k2 = k;
6
+ var desc = Object.getOwnPropertyDescriptor(m, k);
7
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
8
+ desc = { enumerable: true, get: function() { return m[k]; } };
9
+ }
10
+ Object.defineProperty(o, k2, desc);
11
+ }) : (function(o, m, k, k2) {
12
+ if (k2 === undefined) k2 = k;
13
+ o[k2] = m[k];
14
+ }));
15
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
17
+ };
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ __exportStar(require("./collectionCompany.schema"), exports);
20
+ __exportStar(require("./collectionCompanyEmployee.schema"), exports);
21
+ __exportStar(require("./collectionOrder.schema"), exports);
22
+ __exportStar(require("./deliveryMan.schema"), exports);
23
+ __exportStar(require("./retailBrand.schema"), exports);
24
+ __exportStar(require("./retailStore.schema"), exports);
25
+ __exportStar(require("./retailStoreEmployee.schema"), exports);
26
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,4CAA4C;AAC5C,6CAA6C;;;;;;;;;;;;;;;;AAE7C,6DAA0C;AAC1C,qEAAkD;AAClD,2DAAwC;AACxC,uDAAoC;AACpC,uDAAoC;AACpC,uDAAoC;AACpC,+DAA4C"}
@@ -0,0 +1,3 @@
1
+ import { SchemaOptions } from '@nestjs/mongoose';
2
+ export declare const options: SchemaOptions;
3
+ //# sourceMappingURL=options.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,eAAO,MAAM,OAAO,EAAE,aAErB,CAAC"}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.options = void 0;
4
+ exports.options = {
5
+ timestamps: true,
6
+ };
7
+ //# sourceMappingURL=options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"options.js","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":";;;AAEa,QAAA,OAAO,GAAkB;IACpC,UAAU,EAAE,IAAI;CACjB,CAAC"}
@@ -0,0 +1,16 @@
1
+ import mongoose from 'mongoose';
2
+ export declare class RetailBrand {
3
+ name: string;
4
+ collectionCompany: mongoose.Schema.Types.ObjectId;
5
+ status: string;
6
+ }
7
+ export declare const RetailBrandSchema: mongoose.Schema<RetailBrand, mongoose.Model<RetailBrand, any, any, any, mongoose.Document<unknown, any, RetailBrand> & RetailBrand & {
8
+ _id: mongoose.Types.ObjectId;
9
+ } & {
10
+ __v: number;
11
+ }, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, RetailBrand, mongoose.Document<unknown, {}, mongoose.FlatRecord<RetailBrand>> & mongoose.FlatRecord<RetailBrand> & {
12
+ _id: mongoose.Types.ObjectId;
13
+ } & {
14
+ __v: number;
15
+ }>;
16
+ //# sourceMappingURL=retailBrand.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"retailBrand.schema.d.ts","sourceRoot":"","sources":["../src/retailBrand.schema.ts"],"names":[],"mappings":"AAEA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAEhC,qBACa,WAAW;IAEtB,IAAI,EAAE,MAAM,CAAC;IAMb,iBAAiB,EAAE,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC;IAOlD,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,iBAAiB;;;;;;;;EAA4C,CAAC"}
@@ -0,0 +1,45 @@
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
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.RetailBrandSchema = exports.RetailBrand = void 0;
16
+ const mongoose_1 = require("@nestjs/mongoose");
17
+ const options_1 = require("./options");
18
+ const mongoose_2 = __importDefault(require("mongoose"));
19
+ let RetailBrand = class RetailBrand {
20
+ };
21
+ exports.RetailBrand = RetailBrand;
22
+ __decorate([
23
+ (0, mongoose_1.Prop)({ required: true, maxlength: 150, minlength: 2 }),
24
+ __metadata("design:type", String)
25
+ ], RetailBrand.prototype, "name", void 0);
26
+ __decorate([
27
+ (0, mongoose_1.Prop)({
28
+ required: true,
29
+ type: mongoose_2.default.Schema.Types.ObjectId,
30
+ }),
31
+ __metadata("design:type", mongoose_2.default.Schema.Types.ObjectId)
32
+ ], RetailBrand.prototype, "collectionCompany", void 0);
33
+ __decorate([
34
+ (0, mongoose_1.Prop)({
35
+ required: true,
36
+ enum: ['active', 'deleted'],
37
+ default: 'active',
38
+ }),
39
+ __metadata("design:type", String)
40
+ ], RetailBrand.prototype, "status", void 0);
41
+ exports.RetailBrand = RetailBrand = __decorate([
42
+ (0, mongoose_1.Schema)(options_1.options)
43
+ ], RetailBrand);
44
+ exports.RetailBrandSchema = mongoose_1.SchemaFactory.createForClass(RetailBrand);
45
+ //# sourceMappingURL=retailBrand.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"retailBrand.schema.js","sourceRoot":"","sources":["../src/retailBrand.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+CAA+D;AAC/D,uCAAoC;AACpC,wDAAgC;AAGzB,IAAM,WAAW,GAAjB,MAAM,WAAW;CAgBvB,CAAA;AAhBY,kCAAW;AAEtB;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;;yCAC1C;AAMb;IAJC,IAAA,eAAI,EAAC;QACJ,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,kBAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ;KACrC,CAAC;8BACiB,kBAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ;sDAAC;AAOlD;IALC,IAAA,eAAI,EAAC;QACJ,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC;QAC3B,OAAO,EAAE,QAAQ;KAClB,CAAC;;2CACa;sBAfJ,WAAW;IADvB,IAAA,iBAAM,EAAC,iBAAO,CAAC;GACH,WAAW,CAgBvB;AAEY,QAAA,iBAAiB,GAAG,wBAAa,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC"}
@@ -0,0 +1,22 @@
1
+ import mongoose from 'mongoose';
2
+ export declare class RetailStore {
3
+ retailBrand: mongoose.Schema.Types.ObjectId;
4
+ name: string;
5
+ code: string;
6
+ address: string;
7
+ addressDetails: string;
8
+ region: string;
9
+ collectionCompany?: mongoose.Schema.Types.ObjectId;
10
+ deliveryMan?: mongoose.Schema.Types.ObjectId;
11
+ status: string;
12
+ }
13
+ export declare const RetailStoreSchema: mongoose.Schema<RetailStore, mongoose.Model<RetailStore, any, any, any, mongoose.Document<unknown, any, RetailStore> & RetailStore & {
14
+ _id: mongoose.Types.ObjectId;
15
+ } & {
16
+ __v: number;
17
+ }, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, RetailStore, mongoose.Document<unknown, {}, mongoose.FlatRecord<RetailStore>> & mongoose.FlatRecord<RetailStore> & {
18
+ _id: mongoose.Types.ObjectId;
19
+ } & {
20
+ __v: number;
21
+ }>;
22
+ //# sourceMappingURL=retailStore.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"retailStore.schema.d.ts","sourceRoot":"","sources":["../src/retailStore.schema.ts"],"names":[],"mappings":"AAEA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAEhC,qBACa,WAAW;IAKtB,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC;IAG5C,IAAI,EAAE,MAAM,CAAC;IAGb,IAAI,EAAE,MAAM,CAAC;IAGb,OAAO,EAAE,MAAM,CAAC;IAGhB,cAAc,EAAE,MAAM,CAAC;IAGvB,MAAM,EAAE,MAAM,CAAC;IAKf,iBAAiB,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC;IAKnD,WAAW,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC;IAgB7C,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,iBAAiB;;;;;;;;EAA4C,CAAC"}
@@ -0,0 +1,73 @@
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
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.RetailStoreSchema = exports.RetailStore = void 0;
16
+ const mongoose_1 = require("@nestjs/mongoose");
17
+ const options_1 = require("./options");
18
+ const mongoose_2 = __importDefault(require("mongoose"));
19
+ let RetailStore = class RetailStore {
20
+ };
21
+ exports.RetailStore = RetailStore;
22
+ __decorate([
23
+ (0, mongoose_1.Prop)({
24
+ required: true,
25
+ type: mongoose_2.default.Schema.Types.ObjectId,
26
+ }),
27
+ __metadata("design:type", mongoose_2.default.Schema.Types.ObjectId)
28
+ ], RetailStore.prototype, "retailBrand", void 0);
29
+ __decorate([
30
+ (0, mongoose_1.Prop)({ required: true, maxlength: 150, minlength: 2 }),
31
+ __metadata("design:type", String)
32
+ ], RetailStore.prototype, "name", void 0);
33
+ __decorate([
34
+ (0, mongoose_1.Prop)({ required: true, maxlength: 50, minlength: 2 }),
35
+ __metadata("design:type", String)
36
+ ], RetailStore.prototype, "code", void 0);
37
+ __decorate([
38
+ (0, mongoose_1.Prop)({ required: true }),
39
+ __metadata("design:type", String)
40
+ ], RetailStore.prototype, "address", void 0);
41
+ __decorate([
42
+ (0, mongoose_1.Prop)({ maxlength: 50 }),
43
+ __metadata("design:type", String)
44
+ ], RetailStore.prototype, "addressDetails", void 0);
45
+ __decorate([
46
+ (0, mongoose_1.Prop)({ required: true }),
47
+ __metadata("design:type", String)
48
+ ], RetailStore.prototype, "region", void 0);
49
+ __decorate([
50
+ (0, mongoose_1.Prop)({
51
+ type: mongoose_2.default.Schema.Types.ObjectId,
52
+ }),
53
+ __metadata("design:type", mongoose_2.default.Schema.Types.ObjectId)
54
+ ], RetailStore.prototype, "collectionCompany", void 0);
55
+ __decorate([
56
+ (0, mongoose_1.Prop)({
57
+ type: mongoose_2.default.Schema.Types.ObjectId,
58
+ }),
59
+ __metadata("design:type", mongoose_2.default.Schema.Types.ObjectId)
60
+ ], RetailStore.prototype, "deliveryMan", void 0);
61
+ __decorate([
62
+ (0, mongoose_1.Prop)({
63
+ required: true,
64
+ enum: ['active', 'deleted'],
65
+ default: 'active',
66
+ }),
67
+ __metadata("design:type", String)
68
+ ], RetailStore.prototype, "status", void 0);
69
+ exports.RetailStore = RetailStore = __decorate([
70
+ (0, mongoose_1.Schema)(options_1.options)
71
+ ], RetailStore);
72
+ exports.RetailStoreSchema = mongoose_1.SchemaFactory.createForClass(RetailStore);
73
+ //# sourceMappingURL=retailStore.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"retailStore.schema.js","sourceRoot":"","sources":["../src/retailStore.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+CAA+D;AAC/D,uCAAoC;AACpC,wDAAgC;AAGzB,IAAM,WAAW,GAAjB,MAAM,WAAW;CA+CvB,CAAA;AA/CY,kCAAW;AAKtB;IAJC,IAAA,eAAI,EAAC;QACJ,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,kBAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ;KACrC,CAAC;8BACW,kBAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ;gDAAC;AAG5C;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;;yCAC1C;AAGb;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;;yCACzC;AAGb;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACT;AAGhB;IADC,IAAA,eAAI,EAAC,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC;;mDACD;AAGvB;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACV;AAKf;IAHC,IAAA,eAAI,EAAC;QACJ,IAAI,EAAE,kBAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ;KACrC,CAAC;8BACkB,kBAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ;sDAAC;AAKnD;IAHC,IAAA,eAAI,EAAC;QACJ,IAAI,EAAE,kBAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ;KACrC,CAAC;8BACY,kBAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ;gDAAC;AAgB7C;IALC,IAAA,eAAI,EAAC;QACJ,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC;QAC3B,OAAO,EAAE,QAAQ;KAClB,CAAC;;2CACa;sBA9CJ,WAAW;IADvB,IAAA,iBAAM,EAAC,iBAAO,CAAC;GACH,WAAW,CA+CvB;AAEY,QAAA,iBAAiB,GAAG,wBAAa,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC"}
@@ -0,0 +1,19 @@
1
+ import mongoose from 'mongoose';
2
+ export declare class RetailStoreEmployee {
3
+ name: string;
4
+ phoneNumber: string;
5
+ password: string;
6
+ expoPushToken: string[];
7
+ retailStore: mongoose.Schema.Types.ObjectId;
8
+ status: string;
9
+ }
10
+ export declare const RetailStoreEmployeeSchema: mongoose.Schema<RetailStoreEmployee, mongoose.Model<RetailStoreEmployee, any, any, any, mongoose.Document<unknown, any, RetailStoreEmployee> & RetailStoreEmployee & {
11
+ _id: mongoose.Types.ObjectId;
12
+ } & {
13
+ __v: number;
14
+ }, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, RetailStoreEmployee, mongoose.Document<unknown, {}, mongoose.FlatRecord<RetailStoreEmployee>> & mongoose.FlatRecord<RetailStoreEmployee> & {
15
+ _id: mongoose.Types.ObjectId;
16
+ } & {
17
+ __v: number;
18
+ }>;
19
+ //# sourceMappingURL=retailStoreEmployee.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"retailStoreEmployee.schema.d.ts","sourceRoot":"","sources":["../src/retailStoreEmployee.schema.ts"],"names":[],"mappings":"AAEA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAEhC,qBACa,mBAAmB;IAE9B,IAAI,EAAE,MAAM,CAAC;IAGb,WAAW,EAAE,MAAM,CAAC;IAGpB,QAAQ,EAAE,MAAM,CAAC;IAGjB,aAAa,EAAE,MAAM,EAAE,CAAC;IAMxB,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC;IAU5C,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,yBAAyB;;;;;;;;EACa,CAAC"}
@@ -0,0 +1,57 @@
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
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.RetailStoreEmployeeSchema = exports.RetailStoreEmployee = void 0;
16
+ const mongoose_1 = require("@nestjs/mongoose");
17
+ const options_1 = require("./options");
18
+ const mongoose_2 = __importDefault(require("mongoose"));
19
+ let RetailStoreEmployee = class RetailStoreEmployee {
20
+ };
21
+ exports.RetailStoreEmployee = RetailStoreEmployee;
22
+ __decorate([
23
+ (0, mongoose_1.Prop)({ required: true }),
24
+ __metadata("design:type", String)
25
+ ], RetailStoreEmployee.prototype, "name", void 0);
26
+ __decorate([
27
+ (0, mongoose_1.Prop)({ required: true, unique: true }),
28
+ __metadata("design:type", String)
29
+ ], RetailStoreEmployee.prototype, "phoneNumber", void 0);
30
+ __decorate([
31
+ (0, mongoose_1.Prop)({ required: true }),
32
+ __metadata("design:type", String)
33
+ ], RetailStoreEmployee.prototype, "password", void 0);
34
+ __decorate([
35
+ (0, mongoose_1.Prop)({ required: false }),
36
+ __metadata("design:type", Array)
37
+ ], RetailStoreEmployee.prototype, "expoPushToken", void 0);
38
+ __decorate([
39
+ (0, mongoose_1.Prop)({
40
+ required: true,
41
+ type: mongoose_2.default.Schema.Types.ObjectId,
42
+ }),
43
+ __metadata("design:type", mongoose_2.default.Schema.Types.ObjectId)
44
+ ], RetailStoreEmployee.prototype, "retailStore", void 0);
45
+ __decorate([
46
+ (0, mongoose_1.Prop)({
47
+ required: true,
48
+ enum: ['active', 'deleted'],
49
+ default: 'active',
50
+ }),
51
+ __metadata("design:type", String)
52
+ ], RetailStoreEmployee.prototype, "status", void 0);
53
+ exports.RetailStoreEmployee = RetailStoreEmployee = __decorate([
54
+ (0, mongoose_1.Schema)(options_1.options)
55
+ ], RetailStoreEmployee);
56
+ exports.RetailStoreEmployeeSchema = mongoose_1.SchemaFactory.createForClass(RetailStoreEmployee);
57
+ //# sourceMappingURL=retailStoreEmployee.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"retailStoreEmployee.schema.js","sourceRoot":"","sources":["../src/retailStoreEmployee.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+CAA+D;AAC/D,uCAAoC;AACpC,wDAAgC;AAGzB,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;CA4B/B,CAAA;AA5BY,kDAAmB;AAE9B;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACZ;AAGb;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;wDACnB;AAGpB;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDACR;AAGjB;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;0DACF;AAMxB;IAJC,IAAA,eAAI,EAAC;QACJ,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,kBAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ;KACrC,CAAC;8BACW,kBAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ;wDAAC;AAU5C;IALC,IAAA,eAAI,EAAC;QACJ,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC;QAC3B,OAAO,EAAE,QAAQ;KAClB,CAAC;;mDACa;8BA3BJ,mBAAmB;IAD/B,IAAA,iBAAM,EAAC,iBAAO,CAAC;GACH,mBAAmB,CA4B/B;AAEY,QAAA,yBAAyB,GACpC,wBAAa,CAAC,cAAc,CAAC,mBAAmB,CAAC,CAAC"}
package/package.json ADDED
@@ -0,0 +1,27 @@
1
+ {
2
+ "name": "@sildeswj/thechium-schema",
3
+ "version": "1.0.0",
4
+ "main": "dist/index.js",
5
+ "types": "dist/index.d.ts",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1",
8
+ "build": "rimraf dist && tsc",
9
+ "prepublish": "npm run build",
10
+ "patch": "yarn version --patch",
11
+ "minor": "yarn version --minor",
12
+ "major": "yarn version --major"
13
+ },
14
+ "author": "",
15
+ "license": "ISC",
16
+ "description": "",
17
+ "dependencies": {
18
+ "@nestjs/common": "^10.4.8",
19
+ "@nestjs/mongoose": "^10.1.0",
20
+ "@types/node": "^22.9.1",
21
+ "mongoose": "^8.8.2",
22
+ "reflect-metadata": "^0.2.2",
23
+ "rimraf": "^6.0.1",
24
+ "rxjs": "^7.8.1",
25
+ "typescript": "^5.6.3"
26
+ }
27
+ }
@@ -0,0 +1,35 @@
1
+ import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
2
+ import { options } from './options';
3
+ import mongoose from 'mongoose';
4
+
5
+ // 좌상 (배송지사)
6
+ @Schema(options)
7
+ export class CollectionCompany {
8
+ @Prop({ required: true })
9
+ name: string;
10
+
11
+ // 대좌상 (유통사) 아래일 경우 위에 다른 좌상이 있을수 있음.
12
+ @Prop({
13
+ type: mongoose.Schema.Types.ObjectId,
14
+ })
15
+ parentCollectionCompany?: mongoose.Schema.Types.ObjectId;
16
+
17
+ // 연락 받는 직원 (collectionCompanyEmployeeId)
18
+ @Prop({
19
+ type: mongoose.Schema.Types.ObjectId,
20
+ })
21
+ contact?: mongoose.Schema.Types.ObjectId;
22
+
23
+ @Prop({ required: true, unique: true })
24
+ code: string;
25
+
26
+ @Prop({
27
+ required: true,
28
+ enum: ['active', 'deleted'],
29
+ default: 'active',
30
+ })
31
+ status: string;
32
+ }
33
+
34
+ export const CollectionCompanySchema =
35
+ SchemaFactory.createForClass(CollectionCompany);
@@ -0,0 +1,35 @@
1
+ import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
2
+ import { options } from './options';
3
+ import mongoose from 'mongoose';
4
+
5
+ @Schema(options)
6
+ export class CollectionCompanyEmployee {
7
+ @Prop({ required: true })
8
+ name: string;
9
+
10
+ @Prop({ required: true, unique: true })
11
+ email: string;
12
+
13
+ @Prop({ required: true })
14
+ password: string;
15
+
16
+ @Prop()
17
+ phoneNumber?: string;
18
+
19
+ @Prop({
20
+ required: true,
21
+ type: mongoose.Schema.Types.ObjectId,
22
+ })
23
+ collectionCompany: mongoose.Schema.Types.ObjectId;
24
+
25
+ @Prop({
26
+ required: true,
27
+ enum: ['active', 'deleted'],
28
+ default: 'active',
29
+ })
30
+ status: string;
31
+ }
32
+
33
+ export const CollectionCompanyEmployeeSchema = SchemaFactory.createForClass(
34
+ CollectionCompanyEmployee,
35
+ );
@@ -0,0 +1,57 @@
1
+ import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
2
+ import { options } from './options';
3
+ import mongoose, { Document } from 'mongoose';
4
+
5
+ @Schema(options)
6
+ export class CollectionOrder extends Document {
7
+ // 요청사항 메모
8
+ @Prop({ required: false, maxlength: 500 })
9
+ requestMemo?: string;
10
+
11
+ // 수거량 (매장 점주 요청)
12
+ @Prop({ required: true })
13
+ collectionVolume: string;
14
+
15
+ // 실제 수거량 (배달 기사 실제 수거)
16
+ @Prop()
17
+ actualCollectionVolume?: string;
18
+
19
+ // 픽업한 날짜
20
+ @Prop()
21
+ pickupDate?: Date;
22
+
23
+ // 픽업 요청 날짜
24
+ @Prop({ required: true, type: Date })
25
+ pickupRequestDate: Date;
26
+
27
+ // 매장 점주 사인
28
+ @Prop()
29
+ signature?: string;
30
+
31
+ // 배달 상태
32
+ @Prop({
33
+ required: true,
34
+ enum: ['active', 'deleted', 'completed', 'booking', 'canceled'],
35
+ default: 'booking',
36
+ })
37
+ status: 'active' | 'deleted' | 'completed' | 'booking' | 'canceled';
38
+
39
+ // 배달기사
40
+ @Prop({
41
+ required: true,
42
+ type: mongoose.Schema.Types.ObjectId,
43
+ ref: 'DeliveryMan',
44
+ })
45
+ deliveryMan: mongoose.Schema.Types.ObjectId;
46
+
47
+ // 매장
48
+ @Prop({
49
+ required: true,
50
+ type: mongoose.Schema.Types.ObjectId,
51
+ ref: 'RetailStore',
52
+ })
53
+ retailStore: mongoose.Schema.Types.ObjectId;
54
+ }
55
+
56
+ export const CollectionOrderSchema =
57
+ SchemaFactory.createForClass(CollectionOrder);
@@ -0,0 +1,36 @@
1
+ import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
2
+ import { options } from './options';
3
+ import mongoose from 'mongoose';
4
+
5
+ @Schema(options)
6
+ export class DeliveryMan {
7
+ @Prop({ required: true })
8
+ name: string;
9
+
10
+ @Prop({ required: true, unique: true })
11
+ phoneNumber: string;
12
+
13
+ @Prop({ required: true })
14
+ password: string;
15
+
16
+ @Prop({ required: false })
17
+ expoPushToken: string[];
18
+
19
+ @Prop({
20
+ required: true,
21
+ type: mongoose.Schema.Types.ObjectId,
22
+ })
23
+ collectionCompany: mongoose.Schema.Types.ObjectId;
24
+
25
+ // @Prop({ type: [String], default: [] })
26
+ // deviceTokens: string[]; // Stores device tokens
27
+
28
+ @Prop({
29
+ required: true,
30
+ enum: ['active', 'deleted'],
31
+ default: 'active',
32
+ })
33
+ status: string;
34
+ }
35
+
36
+ export const DeliveryManSchema = SchemaFactory.createForClass(DeliveryMan);
package/src/index.ts ADDED
@@ -0,0 +1,10 @@
1
+ // export * from './thechium-schema.module';
2
+ // export * from './thechium-schema.service';
3
+
4
+ export * from "./collectionCompany.schema"
5
+ export * from "./collectionCompanyEmployee.schema"
6
+ export * from "./collectionOrder.schema"
7
+ export * from "./deliveryMan.schema"
8
+ export * from "./retailBrand.schema"
9
+ export * from "./retailStore.schema"
10
+ export * from "./retailStoreEmployee.schema"
package/src/options.ts ADDED
@@ -0,0 +1,5 @@
1
+ import { SchemaOptions } from '@nestjs/mongoose';
2
+
3
+ export const options: SchemaOptions = {
4
+ timestamps: true,
5
+ };
@@ -0,0 +1,24 @@
1
+ import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
2
+ import { options } from './options';
3
+ import mongoose from 'mongoose';
4
+
5
+ @Schema(options)
6
+ export class RetailBrand {
7
+ @Prop({ required: true, maxlength: 150, minlength: 2 })
8
+ name: string;
9
+
10
+ @Prop({
11
+ required: true,
12
+ type: mongoose.Schema.Types.ObjectId,
13
+ })
14
+ collectionCompany: mongoose.Schema.Types.ObjectId;
15
+
16
+ @Prop({
17
+ required: true,
18
+ enum: ['active', 'deleted'],
19
+ default: 'active',
20
+ })
21
+ status: string;
22
+ }
23
+
24
+ export const RetailBrandSchema = SchemaFactory.createForClass(RetailBrand);
@@ -0,0 +1,55 @@
1
+ import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
2
+ import { options } from './options';
3
+ import mongoose from 'mongoose';
4
+
5
+ @Schema(options)
6
+ export class RetailStore {
7
+ @Prop({
8
+ required: true,
9
+ type: mongoose.Schema.Types.ObjectId,
10
+ })
11
+ retailBrand: mongoose.Schema.Types.ObjectId;
12
+
13
+ @Prop({ required: true, maxlength: 150, minlength: 2 })
14
+ name: string;
15
+
16
+ @Prop({ required: true, maxlength: 50, minlength: 2 })
17
+ code: string;
18
+
19
+ @Prop({ required: true })
20
+ address: string;
21
+
22
+ @Prop({ maxlength: 50 })
23
+ addressDetails: string;
24
+
25
+ @Prop({ required: true })
26
+ region: string;
27
+
28
+ @Prop({
29
+ type: mongoose.Schema.Types.ObjectId,
30
+ })
31
+ collectionCompany?: mongoose.Schema.Types.ObjectId;
32
+
33
+ @Prop({
34
+ type: mongoose.Schema.Types.ObjectId,
35
+ })
36
+ deliveryMan?: mongoose.Schema.Types.ObjectId;
37
+
38
+ // @Prop({ minlength: 1 })
39
+ // managerName?: string;
40
+
41
+ // @Prop({ minlength: 2 })
42
+ // managerPhoneNumber?: string;
43
+
44
+ // @Prop({ minlength: 6, maxlength: 6 })
45
+ // managerPassword?: string;
46
+
47
+ @Prop({
48
+ required: true,
49
+ enum: ['active', 'deleted'],
50
+ default: 'active',
51
+ })
52
+ status: string;
53
+ }
54
+
55
+ export const RetailStoreSchema = SchemaFactory.createForClass(RetailStore);
@@ -0,0 +1,37 @@
1
+ import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
2
+ import { options } from './options';
3
+ import mongoose from 'mongoose';
4
+
5
+ @Schema(options)
6
+ export class RetailStoreEmployee {
7
+ @Prop({ required: true })
8
+ name: string;
9
+
10
+ @Prop({ required: true, unique: true })
11
+ phoneNumber: string;
12
+
13
+ @Prop({ required: true })
14
+ password: string;
15
+
16
+ @Prop({ required: false })
17
+ expoPushToken: string[];
18
+
19
+ @Prop({
20
+ required: true,
21
+ type: mongoose.Schema.Types.ObjectId,
22
+ })
23
+ retailStore: mongoose.Schema.Types.ObjectId;
24
+
25
+ // @Prop({ type: [String], default: [] })
26
+ // deviceTokens: string[]; // Stores device tokens
27
+
28
+ @Prop({
29
+ required: true,
30
+ enum: ['active', 'deleted'],
31
+ default: 'active',
32
+ })
33
+ status: string;
34
+ }
35
+
36
+ export const RetailStoreEmployeeSchema =
37
+ SchemaFactory.createForClass(RetailStoreEmployee);
package/tsconfig.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "compilerOptions": {
3
+ "experimentalDecorators": true,
4
+ "target": "es2017",
5
+ "module": "commonjs",
6
+ "lib": ["es2017", "es7", "es6"],
7
+ "declaration": true,
8
+ "declarationMap": true,
9
+ "sourceMap": true,
10
+ "outDir": "./dist",
11
+ "rootDir": "./src",
12
+ "strict": true,
13
+ "noImplicitAny": false,
14
+ "strictNullChecks": false,
15
+ "allowSyntheticDefaultImports": true,
16
+ "esModuleInterop": true,
17
+ "emitDecoratorMetadata": true
18
+ },
19
+ "exclude": ["node_modules", "dist"]
20
+ }