storemw-core-api 1.0.62 → 1.0.63
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.
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.errorRecordNotFoundAfterRemoved = exports.errorRecordNotFoundAfterTrashed = exports.errorRecordNotFoundAfterUpdated = exports.errorRecordNotFoundAlreadyDeleted = exports.getDefaultRemoveWhere = exports.getDefaultTrashWhere = exports.getDefaultUpdateWhere = exports.getDefaultGetWhere = exports.getDefaultRemoveFields = exports.getDefaultTrashFields = exports.getDefaultUpdateFields = exports.getDefaultCreateFields = void 0;
|
|
4
4
|
const utils_1 = require("../../utils");
|
|
5
|
-
const currentDatetimeISO = (0, utils_1.getCurrentDateTimeISO)();
|
|
6
5
|
// insert into create - data fields
|
|
7
6
|
const getDefaultCreateFields = (createUserId, accountId) => {
|
|
7
|
+
const currentDatetimeISO = (0, utils_1.getCurrentDateTimeISO)();
|
|
8
8
|
return {
|
|
9
9
|
createuserid: createUserId,
|
|
10
10
|
createdatetime: currentDatetimeISO,
|
|
@@ -16,6 +16,7 @@ const getDefaultCreateFields = (createUserId, accountId) => {
|
|
|
16
16
|
exports.getDefaultCreateFields = getDefaultCreateFields;
|
|
17
17
|
// insert into update - data fields
|
|
18
18
|
const getDefaultUpdateFields = (updateUserId) => {
|
|
19
|
+
const currentDatetimeISO = (0, utils_1.getCurrentDateTimeISO)();
|
|
19
20
|
return {
|
|
20
21
|
updateuserid: updateUserId,
|
|
21
22
|
updatedatetime: currentDatetimeISO,
|
|
@@ -24,6 +25,7 @@ const getDefaultUpdateFields = (updateUserId) => {
|
|
|
24
25
|
exports.getDefaultUpdateFields = getDefaultUpdateFields;
|
|
25
26
|
// insert into trash - data fields
|
|
26
27
|
const getDefaultTrashFields = (updateUserId) => {
|
|
28
|
+
const currentDatetimeISO = (0, utils_1.getCurrentDateTimeISO)();
|
|
27
29
|
return {
|
|
28
30
|
istrash: true,
|
|
29
31
|
updateuserid: updateUserId,
|
|
@@ -33,6 +35,7 @@ const getDefaultTrashFields = (updateUserId) => {
|
|
|
33
35
|
exports.getDefaultTrashFields = getDefaultTrashFields;
|
|
34
36
|
// insert into remove - data fields
|
|
35
37
|
const getDefaultRemoveFields = (updateUserId) => {
|
|
38
|
+
const currentDatetimeISO = (0, utils_1.getCurrentDateTimeISO)();
|
|
36
39
|
return {
|
|
37
40
|
isdelete: true,
|
|
38
41
|
updateuserid: updateUserId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default.js","sourceRoot":"","sources":["../../../src/lib/model_factory/default.ts"],"names":[],"mappings":";;;AAAA,mCAA+C;
|
|
1
|
+
{"version":3,"file":"default.js","sourceRoot":"","sources":["../../../src/lib/model_factory/default.ts"],"names":[],"mappings":";;;AAAA,mCAA+C;AAK/C,mCAAmC;AAC5B,MAAM,sBAAsB,GAAG,CAAC,YAAoB,EAAE,SAAiB,EAAE,EAAE;IAE9E,MAAM,kBAAkB,GAAG,IAAA,6BAAqB,GAAE,CAAA;IAElD,OAAO;QACH,YAAY,EAAE,YAAY;QAC1B,cAAc,EAAE,kBAAkB;QAClC,YAAY,EAAE,YAAY;QAC1B,cAAc,EAAE,kBAAkB;QAClC,SAAS,EAAE,SAAS;KACvB,CAAA;AACL,CAAC,CAAA;AAXY,QAAA,sBAAsB,0BAWlC;AAED,mCAAmC;AAC5B,MAAM,sBAAsB,GAAG,CAAC,YAAoB,EAAE,EAAE;IAE3D,MAAM,kBAAkB,GAAG,IAAA,6BAAqB,GAAE,CAAA;IAElD,OAAO;QACH,YAAY,EAAE,YAAY;QAC1B,cAAc,EAAE,kBAAkB;KACrC,CAAA;AACL,CAAC,CAAA;AARY,QAAA,sBAAsB,0BAQlC;AAED,kCAAkC;AAC3B,MAAM,qBAAqB,GAAG,CAAC,YAAoB,EAAE,EAAE;IAE1D,MAAM,kBAAkB,GAAG,IAAA,6BAAqB,GAAE,CAAA;IAElD,OAAO;QACH,OAAO,EAAE,IAAI;QACb,YAAY,EAAE,YAAY;QAC1B,cAAc,EAAE,kBAAkB;KACrC,CAAA;AACL,CAAC,CAAA;AATY,QAAA,qBAAqB,yBASjC;AAED,mCAAmC;AAC5B,MAAM,sBAAsB,GAAG,CAAC,YAAoB,EAAE,EAAE;IAE3D,MAAM,kBAAkB,GAAG,IAAA,6BAAqB,GAAE,CAAA;IAElD,OAAO;QACH,QAAQ,EAAE,IAAI;QACd,YAAY,EAAE,YAAY;QAC1B,cAAc,EAAE,kBAAkB;KACrC,CAAA;AACL,CAAC,CAAA;AATY,QAAA,sBAAsB,0BASlC;AAED,yCAAyC;AAC5B,QAAA,kBAAkB,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAA;AAErD,4CAA4C;AAC/B,QAAA,qBAAqB,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,CAAA;AAExE,2CAA2C;AAC9B,QAAA,oBAAoB,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,CAAA;AAEvE,4CAA4C;AAC/B,QAAA,qBAAqB,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,CAAA;AAE3D,QAAA,iCAAiC,GAAG,qCAAqC,CAAA;AACzE,QAAA,+BAA+B,GAAG,+BAA+B,CAAA;AACjE,QAAA,+BAA+B,GAAG,8BAA8B,CAAA;AAChE,QAAA,+BAA+B,GAAG,+BAA+B,CAAA","sourcesContent":["import { getCurrentDateTimeISO } from \"@/utils\"\n\nexport type DefaultOmitFields = \"createdatetime\" | \"createuserid\" |\n \"updatedatetime\" | \"updateuserid\" | \"isdelete\" | \"istrash\" | \"accountid\"\n\n// insert into create - data fields\nexport const getDefaultCreateFields = (createUserId: number, accountId: number) => {\n\n const currentDatetimeISO = getCurrentDateTimeISO()\n\n return {\n createuserid: createUserId,\n createdatetime: currentDatetimeISO,\n updateuserid: createUserId,\n updatedatetime: currentDatetimeISO,\n accountid: accountId\n }\n}\n\n// insert into update - data fields\nexport const getDefaultUpdateFields = (updateUserId: number) => {\n\n const currentDatetimeISO = getCurrentDateTimeISO()\n\n return {\n updateuserid: updateUserId,\n updatedatetime: currentDatetimeISO,\n }\n}\n\n// insert into trash - data fields\nexport const getDefaultTrashFields = (updateUserId: number) => {\n\n const currentDatetimeISO = getCurrentDateTimeISO()\n\n return {\n istrash: true,\n updateuserid: updateUserId,\n updatedatetime: currentDatetimeISO,\n }\n}\n\n// insert into remove - data fields\nexport const getDefaultRemoveFields = (updateUserId: number) => {\n\n const currentDatetimeISO = getCurrentDateTimeISO()\n\n return {\n isdelete: true,\n updateuserid: updateUserId,\n updatedatetime: currentDatetimeISO,\n }\n}\n\n// insert into the get - where conditions\nexport const getDefaultGetWhere = { isdelete: false }\n\n// insert into the update - where conditions\nexport const getDefaultUpdateWhere = { isdelete: false, istrash: false }\n\n// insert into the trash - where conditions\nexport const getDefaultTrashWhere = { isdelete: false, istrash: false }\n\n// insert into the remove - where conditions\nexport const getDefaultRemoveWhere = { isdelete: false, istrash: false }\n\nexport const errorRecordNotFoundAlreadyDeleted = `Record not found or already deleted`\nexport const errorRecordNotFoundAfterUpdated = `Record not found after update`\nexport const errorRecordNotFoundAfterTrashed = `Record not found after trash`\nexport const errorRecordNotFoundAfterRemoved = `Record not found after remove`"]}
|