@sildeswj/thechium-schema 10.0.6 → 10.0.7-shipment-log.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.
- package/dist/warehouse/driverShipmentLog.schema.d.ts +29 -0
- package/dist/warehouse/driverShipmentLog.schema.d.ts.map +1 -0
- package/dist/warehouse/driverShipmentLog.schema.js +46 -0
- package/dist/warehouse/driverShipmentLog.schema.js.map +1 -0
- package/dist/warehouse/shipmentStatus.enum.d.ts +2 -1
- package/dist/warehouse/shipmentStatus.enum.d.ts.map +1 -1
- package/dist/warehouse/shipmentStatus.enum.js +1 -0
- package/dist/warehouse/shipmentStatus.enum.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Schema, Types } from 'mongoose';
|
|
2
|
+
export type WarehouseDriverShipmentLogAction = 'create' | 'update' | 'delete';
|
|
3
|
+
export interface WarehouseDriverShipmentLog {
|
|
4
|
+
_id?: Types.ObjectId;
|
|
5
|
+
shipmentId: Types.ObjectId;
|
|
6
|
+
action: WarehouseDriverShipmentLogAction;
|
|
7
|
+
description?: string;
|
|
8
|
+
performedBy?: {
|
|
9
|
+
userId?: string;
|
|
10
|
+
email?: string;
|
|
11
|
+
name?: string;
|
|
12
|
+
role?: string;
|
|
13
|
+
};
|
|
14
|
+
changes?: {
|
|
15
|
+
before?: Record<string, any> | null;
|
|
16
|
+
after?: Record<string, any> | null;
|
|
17
|
+
};
|
|
18
|
+
createdAt: Date;
|
|
19
|
+
}
|
|
20
|
+
export declare const WarehouseDriverShipmentLogSchema: Schema<WarehouseDriverShipmentLog, import("mongoose").Model<WarehouseDriverShipmentLog, any, any, any, import("mongoose").Document<unknown, any, WarehouseDriverShipmentLog, any, {}> & WarehouseDriverShipmentLog & Required<{
|
|
21
|
+
_id: Types.ObjectId;
|
|
22
|
+
}> & {
|
|
23
|
+
__v: number;
|
|
24
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, WarehouseDriverShipmentLog, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<WarehouseDriverShipmentLog>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<WarehouseDriverShipmentLog> & Required<{
|
|
25
|
+
_id: Types.ObjectId;
|
|
26
|
+
}> & {
|
|
27
|
+
__v: number;
|
|
28
|
+
}>;
|
|
29
|
+
//# sourceMappingURL=driverShipmentLog.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"driverShipmentLog.schema.d.ts","sourceRoot":"","sources":["../../src/warehouse/driverShipmentLog.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,MAAM,gCAAgC,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE9E,MAAM,WAAW,0BAA0B;IACzC,GAAG,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC;IACrB,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC;IAC3B,MAAM,EAAE,gCAAgC,CAAC;IACzC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE;QACZ,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF,OAAO,CAAC,EAAE;QACR,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;QACpC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;KACpC,CAAC;IACF,SAAS,EAAE,IAAI,CAAC;CACjB;AAED,eAAO,MAAM,gCAAgC;;;;;;;;EA0C5C,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WarehouseDriverShipmentLogSchema = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
exports.WarehouseDriverShipmentLogSchema = new mongoose_1.Schema({
|
|
6
|
+
shipmentId: {
|
|
7
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
8
|
+
ref: 'WarehouseDriverShipment',
|
|
9
|
+
required: true,
|
|
10
|
+
index: true,
|
|
11
|
+
},
|
|
12
|
+
action: {
|
|
13
|
+
type: String,
|
|
14
|
+
enum: ['create', 'update', 'delete'],
|
|
15
|
+
required: true,
|
|
16
|
+
},
|
|
17
|
+
description: {
|
|
18
|
+
type: String,
|
|
19
|
+
},
|
|
20
|
+
performedBy: {
|
|
21
|
+
userId: { type: String },
|
|
22
|
+
email: { type: String },
|
|
23
|
+
name: { type: String },
|
|
24
|
+
role: { type: String },
|
|
25
|
+
},
|
|
26
|
+
changes: {
|
|
27
|
+
before: {
|
|
28
|
+
type: mongoose_1.Schema.Types.Mixed,
|
|
29
|
+
default: null,
|
|
30
|
+
},
|
|
31
|
+
after: {
|
|
32
|
+
type: mongoose_1.Schema.Types.Mixed,
|
|
33
|
+
default: null,
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
createdAt: {
|
|
37
|
+
type: Date,
|
|
38
|
+
default: () => new Date(),
|
|
39
|
+
index: true,
|
|
40
|
+
},
|
|
41
|
+
}, {
|
|
42
|
+
timestamps: { createdAt: true, updatedAt: false },
|
|
43
|
+
collection: 'warehousedrivershipmentlogs',
|
|
44
|
+
});
|
|
45
|
+
exports.WarehouseDriverShipmentLogSchema.index({ shipmentId: 1, createdAt: -1 });
|
|
46
|
+
//# sourceMappingURL=driverShipmentLog.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"driverShipmentLog.schema.js","sourceRoot":"","sources":["../../src/warehouse/driverShipmentL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":3,"file":"shipmentStatus.enum.d.ts","sourceRoot":"","sources":["../../src/warehouse/shipmentStatus.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,cAAc;IACxB,UAAU,gBAAgB;IAC1B,SAAS,cAAc;IACvB,SAAS,cAAc;
|
|
1
|
+
{"version":3,"file":"shipmentStatus.enum.d.ts","sourceRoot":"","sources":["../../src/warehouse/shipmentStatus.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,cAAc;IACxB,UAAU,gBAAgB;IAC1B,SAAS,cAAc;IACvB,SAAS,cAAc;IACvB,OAAO,YAAY;CACpB"}
|
|
@@ -6,5 +6,6 @@ var ShipmentStatus;
|
|
|
6
6
|
ShipmentStatus["InProgress"] = "in-progress";
|
|
7
7
|
ShipmentStatus["Submitted"] = "submitted";
|
|
8
8
|
ShipmentStatus["Cancelled"] = "cancelled";
|
|
9
|
+
ShipmentStatus["Deleted"] = "deleted";
|
|
9
10
|
})(ShipmentStatus || (exports.ShipmentStatus = ShipmentStatus = {}));
|
|
10
11
|
//# sourceMappingURL=shipmentStatus.enum.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shipmentStatus.enum.js","sourceRoot":"","sources":["../../src/warehouse/shipmentStatus.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,
|
|
1
|
+
{"version":3,"file":"shipmentStatus.enum.js","sourceRoot":"","sources":["../../src/warehouse/shipmentStatus.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,cAKX;AALD,WAAY,cAAc;IACxB,4CAA0B,CAAA;IAC1B,yCAAuB,CAAA;IACvB,yCAAuB,CAAA;IACvB,qCAAmB,CAAA;AACrB,CAAC,EALW,cAAc,8BAAd,cAAc,QAKzB"}
|