storemw-core-api 1.0.174 → 1.0.176

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,227 @@
1
+ import { groups, Prisma } from "@prisma/client";
2
+ import { DefaultOmitFields } from "../../../lib";
3
+ import { DefaultServiceProps } from "../../../utils";
4
+ declare const primaryKey = "group_id";
5
+ export declare const ModelGroupFields: {
6
+ createdatetime: "createdatetime";
7
+ createuserid: "createuserid";
8
+ updatedatetime: "updatedatetime";
9
+ updateuserid: "updateuserid";
10
+ isdelete: "isdelete";
11
+ istrash: "istrash";
12
+ accountid: "accountid";
13
+ status: "status";
14
+ group_id: "group_id";
15
+ group_label: "group_label";
16
+ group_description: "group_description";
17
+ group_type: "group_type";
18
+ };
19
+ export type ModelGroup = groups;
20
+ export type ModelGroupOmitFields = typeof primaryKey | DefaultOmitFields;
21
+ export type ModelGroupCreateProps = {
22
+ createUserId: number;
23
+ data: Omit<Prisma.groupsUncheckedCreateInput, ModelGroupOmitFields>;
24
+ };
25
+ export type ModelGroupUpdateProps = {
26
+ id: number;
27
+ updateUserId: number;
28
+ data: Omit<Prisma.groupsUncheckedUpdateInput, ModelGroupOmitFields>;
29
+ };
30
+ export type ModelGroupTrashProps = {
31
+ id: number;
32
+ updateUserId: number;
33
+ };
34
+ export type ModelGroupRemoveProps = {
35
+ id: number;
36
+ updateUserId: number;
37
+ };
38
+ export type ModelGroupGetProps = {
39
+ id: number;
40
+ };
41
+ export type ModelGroupListProps = {
42
+ where?: Prisma.groupsWhereInput;
43
+ orderBy?: Prisma.groupsOrderByWithRelationInput | Prisma.groupsOrderByWithRelationInput[];
44
+ offset?: number;
45
+ limit?: number;
46
+ };
47
+ export declare const GroupModel: ({ ...rest }: DefaultServiceProps) => {
48
+ selectedPrisma: any;
49
+ primaryKey: "createdatetime" | "createuserid" | "updatedatetime" | "updateuserid" | "isdelete" | "istrash" | "accountid" | "status" | "group_id" | "group_label" | "group_description" | "group_type";
50
+ getFields: (prefix?: string, excludeKeywords?: string[]) => Promise<{
51
+ name: string;
52
+ type: string;
53
+ }[]>;
54
+ create: ({ data, }: {
55
+ data: Omit<any, DefaultOmitFields>;
56
+ }) => Promise<{
57
+ createdatetime: Date | null;
58
+ createuserid: bigint;
59
+ updatedatetime: Date | null;
60
+ updateuserid: bigint;
61
+ isdelete: boolean | null;
62
+ istrash: boolean | null;
63
+ accountid: bigint;
64
+ status: number | null;
65
+ group_id: bigint;
66
+ group_label: string | null;
67
+ group_description: string | null;
68
+ group_type: string | null;
69
+ }>;
70
+ createMany: ({ dataList, disableRollback, }: {
71
+ dataList: Omit<any, DefaultOmitFields>[];
72
+ disableRollback?: boolean;
73
+ }) => Promise<{
74
+ createdatetime: Date | null;
75
+ createuserid: bigint;
76
+ updatedatetime: Date | null;
77
+ updateuserid: bigint;
78
+ isdelete: boolean | null;
79
+ istrash: boolean | null;
80
+ accountid: bigint;
81
+ status: number | null;
82
+ group_id: bigint;
83
+ group_label: string | null;
84
+ group_description: string | null;
85
+ group_type: string | null;
86
+ }[]>;
87
+ get: ({ id, where, include, }: {
88
+ id?: number;
89
+ where?: Record<string, any>;
90
+ include?: any;
91
+ }) => Promise<{
92
+ createdatetime: Date | null;
93
+ createuserid: bigint;
94
+ updatedatetime: Date | null;
95
+ updateuserid: bigint;
96
+ isdelete: boolean | null;
97
+ istrash: boolean | null;
98
+ accountid: bigint;
99
+ status: number | null;
100
+ group_id: bigint;
101
+ group_label: string | null;
102
+ group_description: string | null;
103
+ group_type: string | null;
104
+ } | null>;
105
+ list: ({ where, orderBy, offset, limit, include, }?: any) => Promise<{
106
+ createdatetime: Date | null;
107
+ createuserid: bigint;
108
+ updatedatetime: Date | null;
109
+ updateuserid: bigint;
110
+ isdelete: boolean | null;
111
+ istrash: boolean | null;
112
+ accountid: bigint;
113
+ status: number | null;
114
+ group_id: bigint;
115
+ group_label: string | null;
116
+ group_description: string | null;
117
+ group_type: string | null;
118
+ }[]>;
119
+ count: ({ where, }?: {
120
+ where?: Record<string, any>;
121
+ }) => Promise<number>;
122
+ aggregate: ({ field, operation, where, }: {
123
+ field: "createdatetime" | "createuserid" | "updatedatetime" | "updateuserid" | "isdelete" | "istrash" | "accountid" | "status" | "group_id" | "group_label" | "group_description" | "group_type";
124
+ operation?: "sum" | "avg" | "min" | "max" | "count";
125
+ where?: Record<string, any>;
126
+ }) => Promise<number>;
127
+ update: ({ id, where, data, disableRollback }: {
128
+ id?: number;
129
+ where?: Record<string, any>;
130
+ data: Partial<{
131
+ createdatetime: Date | null;
132
+ createuserid: bigint;
133
+ updatedatetime: Date | null;
134
+ updateuserid: bigint;
135
+ isdelete: boolean | null;
136
+ istrash: boolean | null;
137
+ accountid: bigint;
138
+ status: number | null;
139
+ group_id: bigint;
140
+ group_label: string | null;
141
+ group_description: string | null;
142
+ group_type: string | null;
143
+ }>;
144
+ disableRollback?: boolean;
145
+ }) => Promise<{
146
+ createdatetime: Date | null;
147
+ createuserid: bigint;
148
+ updatedatetime: Date | null;
149
+ updateuserid: bigint;
150
+ isdelete: boolean | null;
151
+ istrash: boolean | null;
152
+ accountid: bigint;
153
+ status: number | null;
154
+ group_id: bigint;
155
+ group_label: string | null;
156
+ group_description: string | null;
157
+ group_type: string | null;
158
+ }>;
159
+ updateMany: ({ dataList, disableRollback, }: {
160
+ dataList: {
161
+ where: Record<string, any>;
162
+ data: Partial<{
163
+ createdatetime: Date | null;
164
+ createuserid: bigint;
165
+ updatedatetime: Date | null;
166
+ updateuserid: bigint;
167
+ isdelete: boolean | null;
168
+ istrash: boolean | null;
169
+ accountid: bigint;
170
+ status: number | null;
171
+ group_id: bigint;
172
+ group_label: string | null;
173
+ group_description: string | null;
174
+ group_type: string | null;
175
+ }>;
176
+ }[];
177
+ disableRollback?: boolean;
178
+ }) => Promise<{
179
+ createdatetime: Date | null;
180
+ createuserid: bigint;
181
+ updatedatetime: Date | null;
182
+ updateuserid: bigint;
183
+ isdelete: boolean | null;
184
+ istrash: boolean | null;
185
+ accountid: bigint;
186
+ status: number | null;
187
+ group_id: bigint;
188
+ group_label: string | null;
189
+ group_description: string | null;
190
+ group_type: string | null;
191
+ }[]>;
192
+ trash: ({ ids }: {
193
+ ids: number[];
194
+ }) => Promise<{
195
+ createdatetime: Date | null;
196
+ createuserid: bigint;
197
+ updatedatetime: Date | null;
198
+ updateuserid: bigint;
199
+ isdelete: boolean | null;
200
+ istrash: boolean | null;
201
+ accountid: bigint;
202
+ status: number | null;
203
+ group_id: bigint;
204
+ group_label: string | null;
205
+ group_description: string | null;
206
+ group_type: string | null;
207
+ }[]>;
208
+ remove: ({ ids, where }: {
209
+ ids?: number[];
210
+ where?: Record<string, any>;
211
+ }) => Promise<{
212
+ createdatetime: Date | null;
213
+ createuserid: bigint;
214
+ updatedatetime: Date | null;
215
+ updateuserid: bigint;
216
+ isdelete: boolean | null;
217
+ istrash: boolean | null;
218
+ accountid: bigint;
219
+ status: number | null;
220
+ group_id: bigint;
221
+ group_label: string | null;
222
+ group_description: string | null;
223
+ group_type: string | null;
224
+ }[]>;
225
+ raw: <T = any>(query: string, params?: any[]) => Promise<T[]>;
226
+ };
227
+ export {};
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GroupModel = exports.ModelGroupFields = void 0;
4
+ const lib_1 = require("../../../lib");
5
+ const primaryKey = "group_id";
6
+ exports.ModelGroupFields = (0, lib_1.getFieldsByType)();
7
+ const GroupModel = ({ ...rest }) => (0, lib_1.ModelFactory)({
8
+ ...rest,
9
+ modelName: "groups",
10
+ primaryKey
11
+ });
12
+ exports.GroupModel = GroupModel;
13
+ //# sourceMappingURL=GroupModel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GroupModel.js","sourceRoot":"","sources":["../../../../src/models/group/unuse/GroupModel.ts"],"names":[],"mappings":";;;AACA,+BAAyE;AAGzE,MAAM,UAAU,GAAG,UAAU,CAAC;AAEjB,QAAA,gBAAgB,GAAG,IAAA,qBAAe,GAAU,CAAC;AAuCnD,MAAM,UAAU,GAAG,CAAC,EAAE,GAAG,IAAI,EAAuB,EAAE,EAAE,CAC3D,IAAA,kBAAY,EAAyD;IACjE,GAAG,IAAI;IACP,SAAS,EAAE,QAAQ;IACnB,UAAU;CACb,CAAC,CAAC;AALM,QAAA,UAAU,cAKhB","sourcesContent":["import { PrismaClient, groups, Prisma } from \"@prisma/client\";\nimport { ModelFactory, DefaultOmitFields, getFieldsByType } from \"@/lib\";\nimport { DefaultServiceProps } from \"@/utils\";\n\nconst primaryKey = \"group_id\";\n\nexport const ModelGroupFields = getFieldsByType<groups>();\n\nexport type ModelGroup = groups\n\nexport type ModelGroupOmitFields = typeof primaryKey | DefaultOmitFields\n\nexport type ModelGroupCreateProps = {\n createUserId: number,\n data: Omit<Prisma.groupsUncheckedCreateInput, ModelGroupOmitFields>\n}\n\nexport type ModelGroupUpdateProps = {\n id: number,\n updateUserId: number,\n data: Omit<Prisma.groupsUncheckedUpdateInput, ModelGroupOmitFields>\n}\n\nexport type ModelGroupTrashProps = {\n id: number,\n updateUserId: number\n}\n\nexport type ModelGroupRemoveProps = {\n id: number,\n updateUserId: number\n}\n\nexport type ModelGroupGetProps = {\n id: number\n}\n\nexport type ModelGroupListProps = {\n where?: Prisma.groupsWhereInput;\n orderBy?: Prisma.groupsOrderByWithRelationInput | Prisma.groupsOrderByWithRelationInput[];\n offset?: number;\n limit?: number;\n};\n\n\nexport const GroupModel = ({ ...rest }: DefaultServiceProps) =>\n ModelFactory<PrismaClient, \"groups\", PrismaClient[\"groups\"], groups>({\n ...rest,\n modelName: \"groups\",\n primaryKey\n });"]}
@@ -0,0 +1,216 @@
1
+ import { group_owners, Prisma } from "@prisma/client";
2
+ import { DefaultOmitFields } from "../../../lib";
3
+ import { DefaultServiceProps } from "../../../utils";
4
+ declare const primaryKey = "group_owner_id";
5
+ export declare const ModelGroupOwnerFields: {
6
+ createdatetime: "createdatetime";
7
+ createuserid: "createuserid";
8
+ updatedatetime: "updatedatetime";
9
+ updateuserid: "updateuserid";
10
+ isdelete: "isdelete";
11
+ istrash: "istrash";
12
+ accountid: "accountid";
13
+ type: "type";
14
+ user_id: "user_id";
15
+ group_id: "group_id";
16
+ group_owner_id: "group_owner_id";
17
+ };
18
+ export type ModelGroupOwner = group_owners;
19
+ export type ModelGroupOwnerOmitFields = typeof primaryKey | DefaultOmitFields;
20
+ export type ModelGroupOwnerCreateProps = {
21
+ createUserId: number;
22
+ data: Omit<Prisma.group_ownersUncheckedCreateInput, ModelGroupOwnerOmitFields>;
23
+ };
24
+ export type ModelGroupOwnerUpdateProps = {
25
+ id: number;
26
+ updateUserId: number;
27
+ data: Omit<Prisma.group_ownersUncheckedUpdateInput, ModelGroupOwnerOmitFields>;
28
+ };
29
+ export type ModelGroupOwnerTrashProps = {
30
+ id: number;
31
+ updateUserId: number;
32
+ };
33
+ export type ModelGroupOwnerRemoveProps = {
34
+ id: number;
35
+ updateUserId: number;
36
+ };
37
+ export type ModelGroupOwnerGetProps = {
38
+ id: number;
39
+ };
40
+ export type ModelGroupOwnerListProps = {
41
+ where?: Prisma.group_ownersWhereInput;
42
+ orderBy?: Prisma.group_ownersOrderByWithRelationInput | Prisma.group_ownersOrderByWithRelationInput[];
43
+ offset?: number;
44
+ limit?: number;
45
+ };
46
+ export declare const GroupOwnerModel: ({ ...rest }: DefaultServiceProps) => {
47
+ selectedPrisma: any;
48
+ primaryKey: "createdatetime" | "createuserid" | "updatedatetime" | "updateuserid" | "isdelete" | "istrash" | "accountid" | "type" | "user_id" | "group_id" | "group_owner_id";
49
+ getFields: (prefix?: string, excludeKeywords?: string[]) => Promise<{
50
+ name: string;
51
+ type: string;
52
+ }[]>;
53
+ create: ({ data, }: {
54
+ data: Omit<any, DefaultOmitFields>;
55
+ }) => Promise<{
56
+ createdatetime: Date | null;
57
+ createuserid: bigint;
58
+ updatedatetime: Date | null;
59
+ updateuserid: bigint;
60
+ isdelete: boolean | null;
61
+ istrash: boolean | null;
62
+ accountid: bigint;
63
+ type: string;
64
+ user_id: bigint;
65
+ group_id: bigint;
66
+ group_owner_id: bigint;
67
+ }>;
68
+ createMany: ({ dataList, disableRollback, }: {
69
+ dataList: Omit<any, DefaultOmitFields>[];
70
+ disableRollback?: boolean;
71
+ }) => Promise<{
72
+ createdatetime: Date | null;
73
+ createuserid: bigint;
74
+ updatedatetime: Date | null;
75
+ updateuserid: bigint;
76
+ isdelete: boolean | null;
77
+ istrash: boolean | null;
78
+ accountid: bigint;
79
+ type: string;
80
+ user_id: bigint;
81
+ group_id: bigint;
82
+ group_owner_id: bigint;
83
+ }[]>;
84
+ get: ({ id, where, include, }: {
85
+ id?: number;
86
+ where?: Record<string, any>;
87
+ include?: any;
88
+ }) => Promise<{
89
+ createdatetime: Date | null;
90
+ createuserid: bigint;
91
+ updatedatetime: Date | null;
92
+ updateuserid: bigint;
93
+ isdelete: boolean | null;
94
+ istrash: boolean | null;
95
+ accountid: bigint;
96
+ type: string;
97
+ user_id: bigint;
98
+ group_id: bigint;
99
+ group_owner_id: bigint;
100
+ } | null>;
101
+ list: ({ where, orderBy, offset, limit, include, }?: any) => Promise<{
102
+ createdatetime: Date | null;
103
+ createuserid: bigint;
104
+ updatedatetime: Date | null;
105
+ updateuserid: bigint;
106
+ isdelete: boolean | null;
107
+ istrash: boolean | null;
108
+ accountid: bigint;
109
+ type: string;
110
+ user_id: bigint;
111
+ group_id: bigint;
112
+ group_owner_id: bigint;
113
+ }[]>;
114
+ count: ({ where, }?: {
115
+ where?: Record<string, any>;
116
+ }) => Promise<number>;
117
+ aggregate: ({ field, operation, where, }: {
118
+ field: "createdatetime" | "createuserid" | "updatedatetime" | "updateuserid" | "isdelete" | "istrash" | "accountid" | "type" | "user_id" | "group_id" | "group_owner_id";
119
+ operation?: "sum" | "avg" | "min" | "max" | "count";
120
+ where?: Record<string, any>;
121
+ }) => Promise<number>;
122
+ update: ({ id, where, data, disableRollback }: {
123
+ id?: number;
124
+ where?: Record<string, any>;
125
+ data: Partial<{
126
+ createdatetime: Date | null;
127
+ createuserid: bigint;
128
+ updatedatetime: Date | null;
129
+ updateuserid: bigint;
130
+ isdelete: boolean | null;
131
+ istrash: boolean | null;
132
+ accountid: bigint;
133
+ type: string;
134
+ user_id: bigint;
135
+ group_id: bigint;
136
+ group_owner_id: bigint;
137
+ }>;
138
+ disableRollback?: boolean;
139
+ }) => Promise<{
140
+ createdatetime: Date | null;
141
+ createuserid: bigint;
142
+ updatedatetime: Date | null;
143
+ updateuserid: bigint;
144
+ isdelete: boolean | null;
145
+ istrash: boolean | null;
146
+ accountid: bigint;
147
+ type: string;
148
+ user_id: bigint;
149
+ group_id: bigint;
150
+ group_owner_id: bigint;
151
+ }>;
152
+ updateMany: ({ dataList, disableRollback, }: {
153
+ dataList: {
154
+ where: Record<string, any>;
155
+ data: Partial<{
156
+ createdatetime: Date | null;
157
+ createuserid: bigint;
158
+ updatedatetime: Date | null;
159
+ updateuserid: bigint;
160
+ isdelete: boolean | null;
161
+ istrash: boolean | null;
162
+ accountid: bigint;
163
+ type: string;
164
+ user_id: bigint;
165
+ group_id: bigint;
166
+ group_owner_id: bigint;
167
+ }>;
168
+ }[];
169
+ disableRollback?: boolean;
170
+ }) => Promise<{
171
+ createdatetime: Date | null;
172
+ createuserid: bigint;
173
+ updatedatetime: Date | null;
174
+ updateuserid: bigint;
175
+ isdelete: boolean | null;
176
+ istrash: boolean | null;
177
+ accountid: bigint;
178
+ type: string;
179
+ user_id: bigint;
180
+ group_id: bigint;
181
+ group_owner_id: bigint;
182
+ }[]>;
183
+ trash: ({ ids }: {
184
+ ids: number[];
185
+ }) => Promise<{
186
+ createdatetime: Date | null;
187
+ createuserid: bigint;
188
+ updatedatetime: Date | null;
189
+ updateuserid: bigint;
190
+ isdelete: boolean | null;
191
+ istrash: boolean | null;
192
+ accountid: bigint;
193
+ type: string;
194
+ user_id: bigint;
195
+ group_id: bigint;
196
+ group_owner_id: bigint;
197
+ }[]>;
198
+ remove: ({ ids, where }: {
199
+ ids?: number[];
200
+ where?: Record<string, any>;
201
+ }) => Promise<{
202
+ createdatetime: Date | null;
203
+ createuserid: bigint;
204
+ updatedatetime: Date | null;
205
+ updateuserid: bigint;
206
+ isdelete: boolean | null;
207
+ istrash: boolean | null;
208
+ accountid: bigint;
209
+ type: string;
210
+ user_id: bigint;
211
+ group_id: bigint;
212
+ group_owner_id: bigint;
213
+ }[]>;
214
+ raw: <T = any>(query: string, params?: any[]) => Promise<T[]>;
215
+ };
216
+ export {};
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GroupOwnerModel = exports.ModelGroupOwnerFields = void 0;
4
+ const lib_1 = require("../../../lib");
5
+ const primaryKey = "group_owner_id";
6
+ exports.ModelGroupOwnerFields = (0, lib_1.getFieldsByType)();
7
+ const GroupOwnerModel = ({ ...rest }) => (0, lib_1.ModelFactory)({
8
+ ...rest,
9
+ modelName: "group_owners",
10
+ primaryKey
11
+ });
12
+ exports.GroupOwnerModel = GroupOwnerModel;
13
+ //# sourceMappingURL=GroupOwnerModel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GroupOwnerModel.js","sourceRoot":"","sources":["../../../../src/models/group/unuse/GroupOwnerModel.ts"],"names":[],"mappings":";;;AACA,+BAAyE;AAGzE,MAAM,UAAU,GAAG,gBAAgB,CAAC;AAEvB,QAAA,qBAAqB,GAAG,IAAA,qBAAe,GAAgB,CAAC;AAuC9D,MAAM,eAAe,GAAG,CAAC,EAAE,GAAG,IAAI,EAAuB,EAAE,EAAE,CAChE,IAAA,kBAAY,EAA2E;IACnF,GAAG,IAAI;IACP,SAAS,EAAE,cAAc;IACzB,UAAU;CACb,CAAC,CAAC;AALM,QAAA,eAAe,mBAKrB","sourcesContent":["import { PrismaClient, group_owners, Prisma } from \"@prisma/client\";\nimport { ModelFactory, DefaultOmitFields, getFieldsByType } from \"@/lib\";\nimport { DefaultServiceProps } from \"@/utils\";\n\nconst primaryKey = \"group_owner_id\";\n\nexport const ModelGroupOwnerFields = getFieldsByType<group_owners>();\n\nexport type ModelGroupOwner = group_owners\n\nexport type ModelGroupOwnerOmitFields = typeof primaryKey | DefaultOmitFields\n\nexport type ModelGroupOwnerCreateProps = {\n createUserId: number,\n data: Omit<Prisma.group_ownersUncheckedCreateInput, ModelGroupOwnerOmitFields>\n}\n\nexport type ModelGroupOwnerUpdateProps = {\n id: number,\n updateUserId: number,\n data: Omit<Prisma.group_ownersUncheckedUpdateInput, ModelGroupOwnerOmitFields>\n}\n\nexport type ModelGroupOwnerTrashProps = {\n id: number,\n updateUserId: number\n}\n\nexport type ModelGroupOwnerRemoveProps = {\n id: number,\n updateUserId: number\n}\n\nexport type ModelGroupOwnerGetProps = {\n id: number\n}\n\nexport type ModelGroupOwnerListProps = {\n where?: Prisma.group_ownersWhereInput;\n orderBy?: Prisma.group_ownersOrderByWithRelationInput | Prisma.group_ownersOrderByWithRelationInput[];\n offset?: number;\n limit?: number;\n};\n\n\nexport const GroupOwnerModel = ({ ...rest }: DefaultServiceProps) =>\n ModelFactory<PrismaClient, \"group_owners\", PrismaClient[\"group_owners\"], group_owners>({\n ...rest,\n modelName: \"group_owners\",\n primaryKey\n });"]}
@@ -38,10 +38,10 @@ export { UserBranchModel, ModelUserBranchFields } from "./branch/UserBranchModel
38
38
  export { BranchUserModel, ModelBranchUserFields } from "./branch_user/BranchUserModel";
39
39
  export type { ModelUserBranch, ModelUserBranchCreateProps, ModelUserBranchGetProps, ModelUserBranchListProps } from "./branch/UserBranchModel";
40
40
  export type { ModelBranchUser, ModelBranchUserCreateProps, ModelBranchUserGetProps, ModelBranchUserListProps } from "./branch_user/BranchUserModel";
41
- export { GroupModel, ModelGroupFields } from "./group/GroupModel";
42
- export { GroupOwnerModel, ModelGroupOwnerFields } from "./group/GroupOwnerModel";
43
- export type { ModelGroup, ModelGroupCreateProps, ModelGroupGetProps, ModelGroupListProps } from "./group/GroupModel";
44
- export type { ModelGroupOwner, ModelGroupOwnerCreateProps, ModelGroupOwnerGetProps, ModelGroupOwnerListProps } from "./group/GroupOwnerModel";
41
+ export { GroupModel, ModelGroupFields } from "./group/unuse/GroupModel";
42
+ export { GroupOwnerModel, ModelGroupOwnerFields } from "./group/unuse/GroupOwnerModel";
43
+ export type { ModelGroup, ModelGroupCreateProps, ModelGroupGetProps, ModelGroupListProps } from "./group/unuse/GroupModel";
44
+ export type { ModelGroupOwner, ModelGroupOwnerCreateProps, ModelGroupOwnerGetProps, ModelGroupOwnerListProps } from "./group/unuse/GroupOwnerModel";
45
45
  export { FileModel, ModelFileFields } from "./file/FileModel";
46
46
  export type { ModelFile, ModelFileCreateProps, ModelFileGetProps, ModelFileListProps } from "./file/FileModel";
47
47
  export { LocationModel, ModelLocationFields } from "./location/LocationModel";
@@ -64,10 +64,10 @@ Object.defineProperty(exports, "ModelUserBranchFields", { enumerable: true, get:
64
64
  var BranchUserModel_1 = require("./branch_user/BranchUserModel");
65
65
  Object.defineProperty(exports, "BranchUserModel", { enumerable: true, get: function () { return BranchUserModel_1.BranchUserModel; } });
66
66
  Object.defineProperty(exports, "ModelBranchUserFields", { enumerable: true, get: function () { return BranchUserModel_1.ModelBranchUserFields; } });
67
- var GroupModel_1 = require("./group/GroupModel");
67
+ var GroupModel_1 = require("./group/unuse/GroupModel");
68
68
  Object.defineProperty(exports, "GroupModel", { enumerable: true, get: function () { return GroupModel_1.GroupModel; } });
69
69
  Object.defineProperty(exports, "ModelGroupFields", { enumerable: true, get: function () { return GroupModel_1.ModelGroupFields; } });
70
- var GroupOwnerModel_1 = require("./group/GroupOwnerModel");
70
+ var GroupOwnerModel_1 = require("./group/unuse/GroupOwnerModel");
71
71
  Object.defineProperty(exports, "GroupOwnerModel", { enumerable: true, get: function () { return GroupOwnerModel_1.GroupOwnerModel; } });
72
72
  Object.defineProperty(exports, "ModelGroupOwnerFields", { enumerable: true, get: function () { return GroupOwnerModel_1.ModelGroupOwnerFields; } });
73
73
  var FileModel_1 = require("./file/FileModel");
@@ -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FAAgH;AAAvG,oIAAA,wBAAwB,OAAA;AAAE,0IAAA,8BAA8B,OAAA;AACjE,4EAAuG;AAA9F,8HAAA,qBAAqB,OAAA;AAAE,oIAAA,2BAA2B,OAAA;AAC3D,4EAAuG;AAA9F,8HAAA,qBAAqB,OAAA;AAAE,oIAAA,2BAA2B,OAAA;AAC3D,8EAA0G;AAAjG,gIAAA,sBAAsB,OAAA;AAAE,sIAAA,4BAA4B,OAAA;AAC7D,sFAAsH;AAA7G,wIAAA,0BAA0B,OAAA;AAAE,8IAAA,gCAAgC,OAAA;AAQrE,mEAA0F;AAAjF,sHAAA,iBAAiB,OAAA;AAAE,4HAAA,uBAAuB,OAAA;AAEnD,2EAAsG;AAA7F,8HAAA,qBAAqB,OAAA;AAAE,oIAAA,2BAA2B,OAAA","sourcesContent":["export { UserModel, ModelUserFields } from \"./user/UserModel\"\n// export { UserStatusModel, ModelUserStatusFields } from \"./user/UserStatusModel\"\nexport { UserPropModel, ModelUserPropFields } from \"./user/unuse/UserPropModel\"\nexport { CustomerModel, ModelCustomerFields } from \"./user/CustomerModel\"\nexport { RetailerModel, ModelRetailerFields } from \"./user/RetailerModel\"\nexport { AdministratorModel, ModelAdministratorFields } from \"./user/AdministratorModel\"\nexport { OperatorModel, ModelOperatorFields } from \"./user/OperatorModel\"\nexport { WorkerModel, ModelWorkerFields } from \"./user/WorkerModel\"\nexport { DriverModel, ModelDriverFields } from \"./user/DriverModel\"\nexport { MemberModel, ModelMemberFields } from \"./user/MemberModel\"\nexport { AgentModel, ModelAgentFields } from \"./user/AgentModel\"\nexport type { ModelUser, ModelUserCreateProps, ModelUserGetProps, ModelUserListProps } from \"./user/UserModel\";\n// export type { ModelUserStatus, ModelUserStatusCreateProps, ModelUserStatusGetProps, ModelUserStatusListProps } from \"./user/UserStatusModel\";\nexport type { ModelUserProp, ModelUserPropCreateProps, ModelUserPropGetProps, ModelUserPropListProps } from \"./user/unuse/UserPropModel\";\nexport type { ModelCustomer, ModelCustomerCreateProps, ModelCustomerGetProps, ModelCustomerListProps } from \"./user/CustomerModel\";\nexport type { ModelRetailer, ModelRetailerCreateProps, ModelRetailerGetProps, ModelRetailerListProps } from \"./user/RetailerModel\";\nexport type { ModelAdministrator, ModelAdministratorCreateProps, ModelAdministratorGetProps, ModelAdministratorListProps } from \"./user/AdministratorModel\";\nexport type { ModelOperator, ModelOperatorCreateProps, ModelOperatorGetProps, ModelOperatorListProps } from \"./user/OperatorModel\";\nexport type { ModelWorker, ModelWorkerCreateProps, ModelWorkerGetProps, ModelWorkerListProps } from \"./user/WorkerModel\";\nexport type { ModelDriver, ModelDriverCreateProps, ModelDriverGetProps, ModelDriverListProps } from \"./user/DriverModel\";\nexport type { ModelMember, ModelMemberCreateProps, ModelMemberGetProps, ModelMemberListProps } from \"./user/MemberModel\";\nexport type { ModelAgent, ModelAgentCreateProps, ModelAgentGetProps, ModelAgentListProps } from \"./user/AgentModel\";\n\nexport { AccessKeyModel, ModelAccessKeyFields } from \"./auth/AccessKeyModel\"\nexport type { ModelAccessKey, ModelAccessKeyCreateProps, ModelAccessKeyGetProps, ModelAccessKeyListProps } from \"./auth/AccessKeyModel\";\n\nexport { BusinessModel, ModelBusinessFields } from \"./business/BusinessModel\"\nexport type { ModelBusiness, ModelBusinessCreateProps, ModelBusinessGetProps, ModelBusinessListProps } from \"./business/BusinessModel\";\nexport { AccountModel, ModelAccountFields } from \"./account/AccountModel\"\nexport type { ModelAccount, ModelAccountCreateProps, ModelAccountGetProps, ModelAccountListProps } from \"./account/AccountModel\";\n\nexport { SubscribePlanModel, ModelSubscribePlanFields } from \"./subscription/plan/SubscribePlanModel\"\nexport type { ModelSubscribePlan, ModelSubscribePlanCreateProps, ModelSubscribePlanGetProps, ModelSubscribePlanListProps } from \"./subscription/plan/SubscribePlanModel\";\nexport { AccountSubscribeModel, ModelAccountSubscribeFields } from \"./subscription/account/AccountSubscribeModel\"\nexport type { ModelAccountSubscribe, ModelAccountSubscribeCreateProps, ModelAccountSubscribeGetProps, ModelAccountSubscribeListProps } from \"./subscription/account/AccountSubscribeModel\";\n\nexport { AccessControlRoleModel, ModelAccessControlRoleFields } from \"./access_control/AccessControlRoleModel\"\nexport type { ModelAccessControlRole, ModelAccessControlRoleCreateProps, ModelAccessControlRoleGetProps, ModelAccessControlRoleRemoveProps, ModelAccessControlRoleListProps } from \"./access_control/AccessControlRoleModel\";\nexport { AccessControlRolePolicyModel, ModelAccessControlRolePolicyFields } from \"./access_control/AccessControlRolePolicyModel\"\nexport type { ModelAccessControlRolePolicy, ModelAccessControlRolePolicyCreateProps, ModelAccessControlRolePolicyGetProps, ModelAccessControlRolePolicyRemoveProps, ModelAccessControlRolePolicyListProps } from \"./access_control/AccessControlRolePolicyModel\";\nexport { AccessControlUserRoleModel, ModelAccessControlUserRoleFields } from \"./access_control/AccessControlUserRoleModel\"\nexport type { ModelAccessControlUserRole, ModelAccessControlUserRoleCreateProps, ModelAccessControlUserRoleGetProps, ModelAccessControlUserRoleRemoveProps, ModelAccessControlUserRoleListProps } from \"./access_control/AccessControlUserRoleModel\";\n\nexport { UserBranchModel, ModelUserBranchFields } from \"./branch/UserBranchModel\"\nexport { BranchUserModel, ModelBranchUserFields } from \"./branch_user/BranchUserModel\"\nexport type { ModelUserBranch, ModelUserBranchCreateProps, ModelUserBranchGetProps, ModelUserBranchListProps } from \"./branch/UserBranchModel\";\nexport type { ModelBranchUser, ModelBranchUserCreateProps, ModelBranchUserGetProps, ModelBranchUserListProps } from \"./branch_user/BranchUserModel\";\n\nexport { GroupModel, ModelGroupFields } from \"./group/GroupModel\"\nexport { GroupOwnerModel, ModelGroupOwnerFields } from \"./group/GroupOwnerModel\"\nexport type { ModelGroup, ModelGroupCreateProps, ModelGroupGetProps, ModelGroupListProps } from \"./group/GroupModel\";\nexport type { ModelGroupOwner, ModelGroupOwnerCreateProps, ModelGroupOwnerGetProps, ModelGroupOwnerListProps } from \"./group/GroupOwnerModel\";\n\nexport { FileModel, ModelFileFields } from \"./file/FileModel\"\nexport type { ModelFile, ModelFileCreateProps, ModelFileGetProps, ModelFileListProps } from \"./file/FileModel\";\n\nexport { LocationModel, ModelLocationFields } from \"./location/LocationModel\"\nexport { LocationRackModel, ModelLocationRackFields } from \"./location/LocationRackModel\"\nexport { LocationSlotModel, ModelLocationSlotFields } from \"./location/LocationSlotModel\"\nexport type { ModelLocation, ModelLocationCreateProps, ModelLocationGetProps, ModelLocationListProps } from \"./location/LocationModel\";\nexport type { ModelLocationRack, ModelLocationRackCreateProps, ModelLocationRackGetProps, ModelLocationRackListProps } from \"./location/LocationRackModel\";\nexport type { ModelLocationSlot, ModelLocationSlotCreateProps, ModelLocationSlotGetProps, ModelLocationSlotListProps } from \"./location/LocationSlotModel\";\n\nexport { InjectionFieldModel, ModelInjectionFieldFields } from \"./injection_field/InjectionFieldModel\"\nexport { UserInjectionFieldModel, ModelUserInjectionFieldFields } from \"./injection_field/UserInjectionFieldModel\"\nexport { DocumentInjectionFieldModel, ModelDocumentInjectionFieldFields } from \"./injection_field/DocumentInjectionFieldModel\"\nexport { RepositoryInjectionFieldModel, ModelRepositoryInjectionFieldFields } from \"./injection_field/RepositoryInjectionFieldModel\"\nexport { LogisticInjectionFieldModel, ModelLogisticInjectionFieldFields } from \"./injection_field/LogisticInjectionFieldModel\"\nexport { ItemInjectionFieldModel, ModelItemInjectionFieldFields } from \"./injection_field/ItemInjectionFieldModel\"\nexport type { InjectionFieldTargetTableName } from \"./injection_field/InjectionFieldModel\"\nexport type { ModelUserInjectionField, ModelUserInjectionFieldCreateProps, ModelUserInjectionFieldGetProps, ModelUserInjectionFieldListProps } from \"./injection_field/UserInjectionFieldModel\";\nexport type { ModelDocumentInjectionField, ModelDocumentInjectionFieldCreateProps, ModelDocumentInjectionFieldGetProps, ModelDocumentInjectionFieldListProps } from \"./injection_field/DocumentInjectionFieldModel\";\nexport type { ModelRepositoryInjectionField, ModelRepositoryInjectionFieldCreateProps, ModelRepositoryInjectionFieldGetProps, ModelRepositoryInjectionFieldListProps } from \"./injection_field/RepositoryInjectionFieldModel\";\nexport type { ModelLogisticInjectionField, ModelLogisticInjectionFieldCreateProps, ModelLogisticInjectionFieldGetProps, ModelLogisticInjectionFieldListProps } from \"./injection_field/LogisticInjectionFieldModel\";\nexport type { ModelItemInjectionField, ModelItemInjectionFieldCreateProps, ModelItemInjectionFieldGetProps, ModelItemInjectionFieldListProps } from \"./injection_field/ItemInjectionFieldModel\";\n\nexport { CountryModel, ModelCountryFields } from \"./region/CountryModel\"\nexport { StateModel, ModelStateFields } from \"./region/StateModel\"\nexport { AreaModel, ModelAreaFields } from \"./region/AreaModel\"\nexport type { ModelCountry, ModelCountryCreateProps, ModelCountryGetProps, ModelCountryListProps } from \"./region/CountryModel\";\nexport type { ModelState, ModelStateCreateProps, ModelStateGetProps, ModelStateListProps } from \"./region/StateModel\";\nexport type { ModelArea, ModelAreaCreateProps, ModelAreaGetProps, ModelAreaListProps } from \"./region/AreaModel\";\n\nexport { ProductModel, ModelProductFields } from \"./item/ProductModel\"\nexport { ItemModel, ModelItemFields } from \"./item/ItemModel\"\nexport { BrandModel, ModelBrandFields } from \"./item/BrandModel\"\nexport { UomModel, ModelUomFields } from \"./item/UomModel\"\nexport { CategoryModel, ModelCategoryFields } from \"./item/CategoryModel\"\nexport type { ModelProduct, ModelProductCreateProps, ModelProductGetProps, ModelProductListProps } from \"./item/ProductModel\";\nexport type { ModelItem, ModelItemCreateProps, ModelItemGetProps, ModelItemListProps } from \"./item/ItemModel\";\nexport type { ModelBrand, ModelBrandCreateProps, ModelBrandGetProps, ModelBrandListProps } from \"./item/BrandModel\";\nexport type { ModelUom, ModelUomCreateProps, ModelUomGetProps, ModelUomListProps } from \"./item/UomModel\";\nexport type { ModelCategory, ModelCategoryCreateProps, ModelCategoryGetProps, ModelCategoryListProps } from \"./item/CategoryModel\";\n\nexport { DocumentModel, ModelDocumentFields } from \"./document/DocumentModel\"\n// export { DocumentNumberModel, ModelDocumentNumberFields } from \"./document/DocumentNumberModel_unuse\"\nexport { DocumentTotalModel, ModelDocumentTotalFields } from \"./document/DocumentTotalModel\"\nexport { DocumentProfileModel, ModelDocumentProfileFields } from \"./document/DocumentProfileModel\"\nexport { DocumentAmountModel, ModelDocumentAmountFields } from \"./document/DocumentAmountModel\"\nexport { DocumentLocationModel, ModelDocumentLocationFields } from \"./document/DocumentLocationModel\"\n// export { DocumentPropModel, ModelDocumentPropFields } from \"./document/DocumentPropModel\"\nexport { DocumentPaymentModel, ModelDocumentPaymentFields } from \"./document/DocumentPaymentModel\"\nexport { DocumentItemModel, ModelDocumentItemFields } from \"./document/DocumentItemModel\"\nexport { DocumentDocumentModel, ModelDocumentDocumentFields } from \"./document/DocumentDocumentModel\"\nexport type { ModelDocument, ModelDocumentCreateProps, ModelDocumentGetProps, ModelDocumentListProps } from \"./document/DocumentModel\";\nexport type { ModelDocumentProfile, ModelDocumentProfileCreateProps, ModelDocumentProfileGetProps, ModelDocumentProfileListProps } from \"./document/DocumentProfileModel\";\nexport type { ModelDocumentAmount, ModelDocumentAmountCreateProps, ModelDocumentAmountGetProps, ModelDocumentAmountListProps } from \"./document/DocumentAmountModel\";\n// export type { ModelDocumentNumber, ModelDocumentNumberCreateProps, ModelDocumentNumberGetProps, ModelDocumentNumberListProps } from \"./document/DocumentNumberModel_unuse\";\nexport type { ModelDocumentLocation, ModelDocumentLocationCreateProps, ModelDocumentLocationGetProps, ModelDocumentLocationListProps } from \"./document/DocumentLocationModel\";\n// export type { ModelDocumentProp, ModelDocumentPropCreateProps, ModelDocumentPropGetProps, ModelDocumentPropListProps } from \"./document/DocumentPropModel\";\nexport type { ModelDocumentPayment, ModelDocumentPaymentCreateProps, ModelDocumentPaymentGetProps, ModelDocumentPaymentListProps } from \"./document/DocumentPaymentModel\";\nexport type { ModelDocumentTotal, ModelDocumentTotalCreateProps, ModelDocumentTotalGetProps, ModelDocumentTotalListProps } from \"./document/DocumentTotalModel\";\nexport type { ModelDocumentItem, ModelDocumentItemCreateProps, ModelDocumentItemGetProps, ModelDocumentItemListProps } from \"./document/DocumentItemModel\";\nexport type { ModelDocumentDocument, ModelDocumentDocumentCreateProps, ModelDocumentDocumentGetProps, ModelDocumentDocumentListProps } from \"./document/DocumentDocumentModel\";\n\nexport { NumberDateSequenceModel, ModelNumberDateSequenceFields } from \"./others/NumberDateSequenceModel\"\nexport type { ModelNumberDateSequence, ModelNumberDateSequenceCreateProps, ModelNumberDateSequenceGetProps, ModelNumberDateSequenceListProps } from \"./others/NumberDateSequenceModel\";\nexport { OneTimeCodeModel, ModelOneTimeCodeFields } from \"./others/OneTimeCodeModel\"\nexport type { ModelOneTimeCode, ModelOneTimeCodeCreateProps, ModelOneTimeCodeGetProps, ModelOneTimeCodeListProps } from \"./others/OneTimeCodeModel\";\n\nexport { RepositoryModel, ModelRepositoryFields } from \"./repository/RepositoryModel\"\nexport { RepositoryContainerModel, ModelRepositoryContainerFields } from \"./repository/RepositoryContainerModel\"\nexport { RepositoryPalletModel, ModelRepositoryPalletFields } from \"./repository/RepositoryPalletModel\"\nexport { RepositoryCartonModel, ModelRepositoryCartonFields } from \"./repository/RepositoryCartonModel\"\nexport { RepositoryPackageModel, ModelRepositoryPackageFields } from \"./repository/RepositoryPackageModel\"\nexport { RepositoryPackageItemModel, ModelRepositoryPackageItemFields } from \"./repository/RepositoryPackageItemModel\"\nexport type { ModelRepository, ModelRepositoryCreateProps, ModelRepositoryGetProps, ModelRepositoryListProps } from \"./repository/RepositoryModel\";\nexport type { ModelRepositoryContainer, ModelRepositoryContainerCreateProps, ModelRepositoryContainerGetProps, ModelRepositoryContainerListProps } from \"./repository/RepositoryContainerModel\";\nexport type { ModelRepositoryPallet, ModelRepositoryPalletCreateProps, ModelRepositoryPalletGetProps, ModelRepositoryPalletListProps } from \"./repository/RepositoryPalletModel\";\nexport type { ModelRepositoryCarton, ModelRepositoryCartonCreateProps, ModelRepositoryCartonGetProps, ModelRepositoryCartonListProps } from \"./repository/RepositoryCartonModel\";\nexport type { ModelRepositoryPackage, ModelRepositoryPackageCreateProps, ModelRepositoryPackageGetProps, ModelRepositoryPackageListProps } from \"./repository/RepositoryPackageModel\";\nexport type { ModelRepositoryPackageItem, ModelRepositoryPackageItemCreateProps, ModelRepositoryPackageItemGetProps, ModelRepositoryPackageItemListProps } from \"./repository/RepositoryPackageItemModel\";\n\nexport { SchedulerLogModel, ModelSchedulerLogFields } from \"./scheduler/SchedulerLogModel\"\nexport type { ModelSchedulerLog, ModelSchedulerLogCreateProps, ModelSchedulerLogGetProps, ModelSchedulerLogRemoveProps, ModelSchedulerLogListProps } from \"./scheduler/SchedulerLogModel\";\nexport { SchedulerRequestModel, ModelSchedulerRequestFields } from \"./scheduler/SchedulerRequestModel\"\nexport type { ModelSchedulerRequest, ModelSchedulerRequestCreateProps, ModelSchedulerRequestGetProps, ModelSchedulerRequestRemoveProps, ModelSchedulerRequestListProps } from \"./scheduler/SchedulerRequestModel\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":";;;;;AAAA,8CAA6D;AAApD,sGAAA,SAAS,OAAA;AAAE,4GAAA,eAAe,OAAA;AACnC,kFAAkF;AAClF,4DAA+E;AAAtE,8GAAA,aAAa,OAAA;AAAE,oHAAA,mBAAmB,OAAA;AAC3C,sDAAyE;AAAhE,8GAAA,aAAa,OAAA;AAAE,oHAAA,mBAAmB,OAAA;AAC3C,sDAAyE;AAAhE,8GAAA,aAAa,OAAA;AAAE,oHAAA,mBAAmB,OAAA;AAC3C,gEAAwF;AAA/E,wHAAA,kBAAkB,OAAA;AAAE,8HAAA,wBAAwB,OAAA;AACrD,sDAAyE;AAAhE,8GAAA,aAAa,OAAA;AAAE,oHAAA,mBAAmB,OAAA;AAC3C,kDAAmE;AAA1D,0GAAA,WAAW,OAAA;AAAE,gHAAA,iBAAiB,OAAA;AACvC,kDAAmE;AAA1D,0GAAA,WAAW,OAAA;AAAE,gHAAA,iBAAiB,OAAA;AACvC,kDAAmE;AAA1D,0GAAA,WAAW,OA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AAE,gIAAA,yBAAyB,OAAA;AACvD,0EAAqG;AAA5F,8HAAA,qBAAqB,OAAA;AAAE,oIAAA,2BAA2B,OAAA;AAC3D,4FAA4F;AAC5F,wEAAkG;AAAzF,4HAAA,oBAAoB,OAAA;AAAE,kIAAA,0BAA0B,OAAA;AACzD,kEAAyF;AAAhF,sHAAA,iBAAiB,OAAA;AAAE,4HAAA,uBAAuB,OAAA;AACnD,0EAAqG;AAA5F,8HAAA,qBAAqB,OAAA;AAAE,oIAAA,2BAA2B,OAAA;AAY3D,4EAAyG;AAAhG,kIAAA,uBAAuB,OAAA;AAAE,wIAAA,6BAA6B,OAAA;AAE/D,8DAAoF;AAA3E,oHAAA,gBAAgB,OAAA;AAAE,0HAAA,sBAAsB,OAAA;AAGjD,gEAAqF;AAA5E,kHAAA,eAAe,OAAA;AAAE,wHAAA,qBAAqB,OAAA;AAC/C,kFAAgH;AAAvG,oIAAA,wBAAwB,OAAA;AAAE,0IAAA,8BAA8B,OAAA;AACjE,4EAAuG;AAA9F,8HAAA,qBAAqB,OAAA;AAAE,oIAAA,2BAA2B,OAAA;AAC3D,4EAAuG;AAA9F,8HAAA,qBAAqB,OAAA;AAAE,oIAAA,2BAA2B,OAAA;AAC3D,8EAA0G;AAAjG,gIAAA,sBAAsB,OAAA;AAAE,sIAAA,4BAA4B,OAAA;AAC7D,sFAAsH;AAA7G,wIAAA,0BAA0B,OAAA;AAAE,8IAAA,gCAAgC,OAAA;AAQrE,mEAA0F;AAAjF,sHAAA,iBAAiB,OAAA;AAAE,4HAAA,uBAAuB,OAAA;AAEnD,2EAAsG;AAA7F,8HAAA,qBAAqB,OAAA;AAAE,oIAAA,2BAA2B,OAAA","sourcesContent":["export { UserModel, ModelUserFields } from \"./user/UserModel\"\n// export { UserStatusModel, ModelUserStatusFields } from \"./user/UserStatusModel\"\nexport { UserPropModel, ModelUserPropFields } from \"./user/unuse/UserPropModel\"\nexport { CustomerModel, ModelCustomerFields } from \"./user/CustomerModel\"\nexport { RetailerModel, ModelRetailerFields } from \"./user/RetailerModel\"\nexport { AdministratorModel, ModelAdministratorFields } from \"./user/AdministratorModel\"\nexport { OperatorModel, ModelOperatorFields } from \"./user/OperatorModel\"\nexport { WorkerModel, ModelWorkerFields } from \"./user/WorkerModel\"\nexport { DriverModel, ModelDriverFields } from \"./user/DriverModel\"\nexport { MemberModel, ModelMemberFields } from \"./user/MemberModel\"\nexport { AgentModel, ModelAgentFields } from \"./user/AgentModel\"\nexport type { ModelUser, ModelUserCreateProps, ModelUserGetProps, ModelUserListProps } from \"./user/UserModel\";\n// export type { ModelUserStatus, ModelUserStatusCreateProps, ModelUserStatusGetProps, ModelUserStatusListProps } from \"./user/UserStatusModel\";\nexport type { ModelUserProp, ModelUserPropCreateProps, ModelUserPropGetProps, ModelUserPropListProps } from \"./user/unuse/UserPropModel\";\nexport type { ModelCustomer, ModelCustomerCreateProps, ModelCustomerGetProps, ModelCustomerListProps } from \"./user/CustomerModel\";\nexport type { ModelRetailer, ModelRetailerCreateProps, ModelRetailerGetProps, ModelRetailerListProps } from \"./user/RetailerModel\";\nexport type { ModelAdministrator, ModelAdministratorCreateProps, ModelAdministratorGetProps, ModelAdministratorListProps } from \"./user/AdministratorModel\";\nexport type { ModelOperator, ModelOperatorCreateProps, ModelOperatorGetProps, ModelOperatorListProps } from \"./user/OperatorModel\";\nexport type { ModelWorker, ModelWorkerCreateProps, ModelWorkerGetProps, ModelWorkerListProps } from \"./user/WorkerModel\";\nexport type { ModelDriver, ModelDriverCreateProps, ModelDriverGetProps, ModelDriverListProps } from \"./user/DriverModel\";\nexport type { ModelMember, ModelMemberCreateProps, ModelMemberGetProps, ModelMemberListProps } from \"./user/MemberModel\";\nexport type { ModelAgent, ModelAgentCreateProps, ModelAgentGetProps, ModelAgentListProps } from \"./user/AgentModel\";\n\nexport { AccessKeyModel, ModelAccessKeyFields } from \"./auth/AccessKeyModel\"\nexport type { ModelAccessKey, ModelAccessKeyCreateProps, ModelAccessKeyGetProps, ModelAccessKeyListProps } from \"./auth/AccessKeyModel\";\n\nexport { BusinessModel, ModelBusinessFields } from \"./business/BusinessModel\"\nexport type { ModelBusiness, ModelBusinessCreateProps, ModelBusinessGetProps, ModelBusinessListProps } from \"./business/BusinessModel\";\nexport { AccountModel, ModelAccountFields } from \"./account/AccountModel\"\nexport type { ModelAccount, ModelAccountCreateProps, ModelAccountGetProps, ModelAccountListProps } from \"./account/AccountModel\";\n\nexport { SubscribePlanModel, ModelSubscribePlanFields } from \"./subscription/plan/SubscribePlanModel\"\nexport type { ModelSubscribePlan, ModelSubscribePlanCreateProps, ModelSubscribePlanGetProps, ModelSubscribePlanListProps } from \"./subscription/plan/SubscribePlanModel\";\nexport { AccountSubscribeModel, ModelAccountSubscribeFields } from \"./subscription/account/AccountSubscribeModel\"\nexport type { ModelAccountSubscribe, ModelAccountSubscribeCreateProps, ModelAccountSubscribeGetProps, ModelAccountSubscribeListProps } from \"./subscription/account/AccountSubscribeModel\";\n\nexport { AccessControlRoleModel, ModelAccessControlRoleFields } from \"./access_control/AccessControlRoleModel\"\nexport type { ModelAccessControlRole, ModelAccessControlRoleCreateProps, ModelAccessControlRoleGetProps, ModelAccessControlRoleRemoveProps, ModelAccessControlRoleListProps } from \"./access_control/AccessControlRoleModel\";\nexport { AccessControlRolePolicyModel, ModelAccessControlRolePolicyFields } from \"./access_control/AccessControlRolePolicyModel\"\nexport type { ModelAccessControlRolePolicy, ModelAccessControlRolePolicyCreateProps, ModelAccessControlRolePolicyGetProps, ModelAccessControlRolePolicyRemoveProps, ModelAccessControlRolePolicyListProps } from \"./access_control/AccessControlRolePolicyModel\";\nexport { AccessControlUserRoleModel, ModelAccessControlUserRoleFields } from \"./access_control/AccessControlUserRoleModel\"\nexport type { ModelAccessControlUserRole, ModelAccessControlUserRoleCreateProps, ModelAccessControlUserRoleGetProps, ModelAccessControlUserRoleRemoveProps, ModelAccessControlUserRoleListProps } from \"./access_control/AccessControlUserRoleModel\";\n\nexport { UserBranchModel, ModelUserBranchFields } from \"./branch/UserBranchModel\"\nexport { BranchUserModel, ModelBranchUserFields } from \"./branch_user/BranchUserModel\"\nexport type { ModelUserBranch, ModelUserBranchCreateProps, ModelUserBranchGetProps, ModelUserBranchListProps } from \"./branch/UserBranchModel\";\nexport type { ModelBranchUser, ModelBranchUserCreateProps, ModelBranchUserGetProps, ModelBranchUserListProps } from \"./branch_user/BranchUserModel\";\n\nexport { GroupModel, ModelGroupFields } from \"./group/unuse/GroupModel\"\nexport { GroupOwnerModel, ModelGroupOwnerFields } from \"./group/unuse/GroupOwnerModel\"\nexport type { ModelGroup, ModelGroupCreateProps, ModelGroupGetProps, ModelGroupListProps } from \"./group/unuse/GroupModel\";\nexport type { ModelGroupOwner, ModelGroupOwnerCreateProps, ModelGroupOwnerGetProps, ModelGroupOwnerListProps } from \"./group/unuse/GroupOwnerModel\";\n\nexport { FileModel, ModelFileFields } from \"./file/FileModel\"\nexport type { ModelFile, ModelFileCreateProps, ModelFileGetProps, ModelFileListProps } from \"./file/FileModel\";\n\nexport { LocationModel, ModelLocationFields } from \"./location/LocationModel\"\nexport { LocationRackModel, ModelLocationRackFields } from \"./location/LocationRackModel\"\nexport { LocationSlotModel, ModelLocationSlotFields } from \"./location/LocationSlotModel\"\nexport type { ModelLocation, ModelLocationCreateProps, ModelLocationGetProps, ModelLocationListProps } from \"./location/LocationModel\";\nexport type { ModelLocationRack, ModelLocationRackCreateProps, ModelLocationRackGetProps, ModelLocationRackListProps } from \"./location/LocationRackModel\";\nexport type { ModelLocationSlot, ModelLocationSlotCreateProps, ModelLocationSlotGetProps, ModelLocationSlotListProps } from \"./location/LocationSlotModel\";\n\nexport { InjectionFieldModel, ModelInjectionFieldFields } from \"./injection_field/InjectionFieldModel\"\nexport { UserInjectionFieldModel, ModelUserInjectionFieldFields } from \"./injection_field/UserInjectionFieldModel\"\nexport { DocumentInjectionFieldModel, ModelDocumentInjectionFieldFields } from \"./injection_field/DocumentInjectionFieldModel\"\nexport { RepositoryInjectionFieldModel, ModelRepositoryInjectionFieldFields } from \"./injection_field/RepositoryInjectionFieldModel\"\nexport { LogisticInjectionFieldModel, ModelLogisticInjectionFieldFields } from \"./injection_field/LogisticInjectionFieldModel\"\nexport { ItemInjectionFieldModel, ModelItemInjectionFieldFields } from \"./injection_field/ItemInjectionFieldModel\"\nexport type { InjectionFieldTargetTableName } from \"./injection_field/InjectionFieldModel\"\nexport type { ModelUserInjectionField, ModelUserInjectionFieldCreateProps, ModelUserInjectionFieldGetProps, ModelUserInjectionFieldListProps } from \"./injection_field/UserInjectionFieldModel\";\nexport type { ModelDocumentInjectionField, ModelDocumentInjectionFieldCreateProps, ModelDocumentInjectionFieldGetProps, ModelDocumentInjectionFieldListProps } from \"./injection_field/DocumentInjectionFieldModel\";\nexport type { ModelRepositoryInjectionField, ModelRepositoryInjectionFieldCreateProps, ModelRepositoryInjectionFieldGetProps, ModelRepositoryInjectionFieldListProps } from \"./injection_field/RepositoryInjectionFieldModel\";\nexport type { ModelLogisticInjectionField, ModelLogisticInjectionFieldCreateProps, ModelLogisticInjectionFieldGetProps, ModelLogisticInjectionFieldListProps } from \"./injection_field/LogisticInjectionFieldModel\";\nexport type { ModelItemInjectionField, ModelItemInjectionFieldCreateProps, ModelItemInjectionFieldGetProps, ModelItemInjectionFieldListProps } from \"./injection_field/ItemInjectionFieldModel\";\n\nexport { CountryModel, ModelCountryFields } from \"./region/CountryModel\"\nexport { StateModel, ModelStateFields } from \"./region/StateModel\"\nexport { AreaModel, ModelAreaFields } from \"./region/AreaModel\"\nexport type { ModelCountry, ModelCountryCreateProps, ModelCountryGetProps, ModelCountryListProps } from \"./region/CountryModel\";\nexport type { ModelState, ModelStateCreateProps, ModelStateGetProps, ModelStateListProps } from \"./region/StateModel\";\nexport type { ModelArea, ModelAreaCreateProps, ModelAreaGetProps, ModelAreaListProps } from \"./region/AreaModel\";\n\nexport { ProductModel, ModelProductFields } from \"./item/ProductModel\"\nexport { ItemModel, ModelItemFields } from \"./item/ItemModel\"\nexport { BrandModel, ModelBrandFields } from \"./item/BrandModel\"\nexport { UomModel, ModelUomFields } from \"./item/UomModel\"\nexport { CategoryModel, ModelCategoryFields } from \"./item/CategoryModel\"\nexport type { ModelProduct, ModelProductCreateProps, ModelProductGetProps, ModelProductListProps } from \"./item/ProductModel\";\nexport type { ModelItem, ModelItemCreateProps, ModelItemGetProps, ModelItemListProps } from \"./item/ItemModel\";\nexport type { ModelBrand, ModelBrandCreateProps, ModelBrandGetProps, ModelBrandListProps } from \"./item/BrandModel\";\nexport type { ModelUom, ModelUomCreateProps, ModelUomGetProps, ModelUomListProps } from \"./item/UomModel\";\nexport type { ModelCategory, ModelCategoryCreateProps, ModelCategoryGetProps, ModelCategoryListProps } from \"./item/CategoryModel\";\n\nexport { DocumentModel, ModelDocumentFields } from \"./document/DocumentModel\"\n// export { DocumentNumberModel, ModelDocumentNumberFields } from \"./document/DocumentNumberModel_unuse\"\nexport { DocumentTotalModel, ModelDocumentTotalFields } from \"./document/DocumentTotalModel\"\nexport { DocumentProfileModel, ModelDocumentProfileFields } from \"./document/DocumentProfileModel\"\nexport { DocumentAmountModel, ModelDocumentAmountFields } from \"./document/DocumentAmountModel\"\nexport { DocumentLocationModel, ModelDocumentLocationFields } from \"./document/DocumentLocationModel\"\n// export { DocumentPropModel, ModelDocumentPropFields } from \"./document/DocumentPropModel\"\nexport { DocumentPaymentModel, ModelDocumentPaymentFields } from \"./document/DocumentPaymentModel\"\nexport { DocumentItemModel, ModelDocumentItemFields } from \"./document/DocumentItemModel\"\nexport { DocumentDocumentModel, ModelDocumentDocumentFields } from \"./document/DocumentDocumentModel\"\nexport type { ModelDocument, ModelDocumentCreateProps, ModelDocumentGetProps, ModelDocumentListProps } from \"./document/DocumentModel\";\nexport type { ModelDocumentProfile, ModelDocumentProfileCreateProps, ModelDocumentProfileGetProps, ModelDocumentProfileListProps } from \"./document/DocumentProfileModel\";\nexport type { ModelDocumentAmount, ModelDocumentAmountCreateProps, ModelDocumentAmountGetProps, ModelDocumentAmountListProps } from \"./document/DocumentAmountModel\";\n// export type { ModelDocumentNumber, ModelDocumentNumberCreateProps, ModelDocumentNumberGetProps, ModelDocumentNumberListProps } from \"./document/DocumentNumberModel_unuse\";\nexport type { ModelDocumentLocation, ModelDocumentLocationCreateProps, ModelDocumentLocationGetProps, ModelDocumentLocationListProps } from \"./document/DocumentLocationModel\";\n// export type { ModelDocumentProp, ModelDocumentPropCreateProps, ModelDocumentPropGetProps, ModelDocumentPropListProps } from \"./document/DocumentPropModel\";\nexport type { ModelDocumentPayment, ModelDocumentPaymentCreateProps, ModelDocumentPaymentGetProps, ModelDocumentPaymentListProps } from \"./document/DocumentPaymentModel\";\nexport type { ModelDocumentTotal, ModelDocumentTotalCreateProps, ModelDocumentTotalGetProps, ModelDocumentTotalListProps } from \"./document/DocumentTotalModel\";\nexport type { ModelDocumentItem, ModelDocumentItemCreateProps, ModelDocumentItemGetProps, ModelDocumentItemListProps } from \"./document/DocumentItemModel\";\nexport type { ModelDocumentDocument, ModelDocumentDocumentCreateProps, ModelDocumentDocumentGetProps, ModelDocumentDocumentListProps } from \"./document/DocumentDocumentModel\";\n\nexport { NumberDateSequenceModel, ModelNumberDateSequenceFields } from \"./others/NumberDateSequenceModel\"\nexport type { ModelNumberDateSequence, ModelNumberDateSequenceCreateProps, ModelNumberDateSequenceGetProps, ModelNumberDateSequenceListProps } from \"./others/NumberDateSequenceModel\";\nexport { OneTimeCodeModel, ModelOneTimeCodeFields } from \"./others/OneTimeCodeModel\"\nexport type { ModelOneTimeCode, ModelOneTimeCodeCreateProps, ModelOneTimeCodeGetProps, ModelOneTimeCodeListProps } from \"./others/OneTimeCodeModel\";\n\nexport { RepositoryModel, ModelRepositoryFields } from \"./repository/RepositoryModel\"\nexport { RepositoryContainerModel, ModelRepositoryContainerFields } from \"./repository/RepositoryContainerModel\"\nexport { RepositoryPalletModel, ModelRepositoryPalletFields } from \"./repository/RepositoryPalletModel\"\nexport { RepositoryCartonModel, ModelRepositoryCartonFields } from \"./repository/RepositoryCartonModel\"\nexport { RepositoryPackageModel, ModelRepositoryPackageFields } from \"./repository/RepositoryPackageModel\"\nexport { RepositoryPackageItemModel, ModelRepositoryPackageItemFields } from \"./repository/RepositoryPackageItemModel\"\nexport type { ModelRepository, ModelRepositoryCreateProps, ModelRepositoryGetProps, ModelRepositoryListProps } from \"./repository/RepositoryModel\";\nexport type { ModelRepositoryContainer, ModelRepositoryContainerCreateProps, ModelRepositoryContainerGetProps, ModelRepositoryContainerListProps } from \"./repository/RepositoryContainerModel\";\nexport type { ModelRepositoryPallet, ModelRepositoryPalletCreateProps, ModelRepositoryPalletGetProps, ModelRepositoryPalletListProps } from \"./repository/RepositoryPalletModel\";\nexport type { ModelRepositoryCarton, ModelRepositoryCartonCreateProps, ModelRepositoryCartonGetProps, ModelRepositoryCartonListProps } from \"./repository/RepositoryCartonModel\";\nexport type { ModelRepositoryPackage, ModelRepositoryPackageCreateProps, ModelRepositoryPackageGetProps, ModelRepositoryPackageListProps } from \"./repository/RepositoryPackageModel\";\nexport type { ModelRepositoryPackageItem, ModelRepositoryPackageItemCreateProps, ModelRepositoryPackageItemGetProps, ModelRepositoryPackageItemListProps } from \"./repository/RepositoryPackageItemModel\";\n\nexport { SchedulerLogModel, ModelSchedulerLogFields } from \"./scheduler/SchedulerLogModel\"\nexport type { ModelSchedulerLog, ModelSchedulerLogCreateProps, ModelSchedulerLogGetProps, ModelSchedulerLogRemoveProps, ModelSchedulerLogListProps } from \"./scheduler/SchedulerLogModel\";\nexport { SchedulerRequestModel, ModelSchedulerRequestFields } from \"./scheduler/SchedulerRequestModel\"\nexport type { ModelSchedulerRequest, ModelSchedulerRequestCreateProps, ModelSchedulerRequestGetProps, ModelSchedulerRequestRemoveProps, ModelSchedulerRequestListProps } from \"./scheduler/SchedulerRequestModel\";\n"]}
@@ -70,34 +70,34 @@ let defaultSqlSelect = {
70
70
  // ''
71
71
  // )`]: "location_name",
72
72
  // }
73
- let groupOwnerSqlSelect = {
74
- [`COALESCE(
75
- STRING_AGG(DISTINCT grp.${models_1.ModelGroupFields.group_id}::text, ', '),
76
- ''
77
- )`]: "access_group_id",
78
- [`COALESCE(
79
- STRING_AGG(DISTINCT grp.${models_1.ModelGroupFields.group_label}::text, ', '),
80
- ''
81
- )`]: "access_group_label",
82
- [`COALESCE(
83
- STRING_AGG(DISTINCT grp.${models_1.ModelGroupFields.group_description}::text, ', '),
84
- ''
85
- )`]: "access_group_description",
86
- [`COALESCE(
87
- STRING_AGG(DISTINCT grp.${models_1.ModelGroupFields.group_type}::text, ', '),
88
- ''
89
- )`]: "access_group_type"
90
- // [`COALESCE(
91
- // JSON_AGG(
92
- // DISTINCT JSONB_BUILD_OBJECT(
93
- // '${ModelGroupFields.group_label}', grp.group_label,
94
- // '${ModelGroupFields.group_id}', grp.group_id,
95
- // '${ModelGroupFields.group_type}', grp.group_type
96
- // )
97
- // ) FILTER (WHERE grp.group_id IS NOT NULL AND grp.isdelete = false AND grp.istrash = false),
98
- // '[]'
99
- // )`]: "grp"
100
- };
73
+ // let groupOwnerSqlSelect = {
74
+ // [`COALESCE(
75
+ // STRING_AGG(DISTINCT grp.${ModelGroupFields.group_id}::text, ', '),
76
+ // ''
77
+ // )`]: "access_group_id",
78
+ // [`COALESCE(
79
+ // STRING_AGG(DISTINCT grp.${ModelGroupFields.group_label}::text, ', '),
80
+ // ''
81
+ // )`]: "access_group_label",
82
+ // [`COALESCE(
83
+ // STRING_AGG(DISTINCT grp.${ModelGroupFields.group_description}::text, ', '),
84
+ // ''
85
+ // )`]: "access_group_description",
86
+ // [`COALESCE(
87
+ // STRING_AGG(DISTINCT grp.${ModelGroupFields.group_type}::text, ', '),
88
+ // ''
89
+ // )`]: "access_group_type"
90
+ // // [`COALESCE(
91
+ // // JSON_AGG(
92
+ // // DISTINCT JSONB_BUILD_OBJECT(
93
+ // // '${ModelGroupFields.group_label}', grp.group_label,
94
+ // // '${ModelGroupFields.group_id}', grp.group_id,
95
+ // // '${ModelGroupFields.group_type}', grp.group_type
96
+ // // )
97
+ // // ) FILTER (WHERE grp.group_id IS NOT NULL AND grp.isdelete = false AND grp.istrash = false),
98
+ // // '[]'
99
+ // // )`]: "grp"
100
+ // }
101
101
  const AdministratorService = (props) => {
102
102
  const { ...rest } = props;
103
103
  const administratorModel = (0, models_1.AdministratorModel)({ ...rest });
@@ -165,7 +165,7 @@ const AdministratorService = (props) => {
165
165
  (0, lib_1.buildSqlSelect)(``, defaultSqlSelect),
166
166
  // buildSqlSelect(``, userStatusIsOwnerSqlSelect),
167
167
  // buildSqlSelect(``, userPropLocationSqlSelect),
168
- (0, lib_1.buildSqlSelect)(``, groupOwnerSqlSelect)
168
+ // buildSqlSelect(``, groupOwnerSqlSelect)
169
169
  ];
170
170
  let sqlRelation = [
171
171
  (0, lib_1.buildSqlRelation)("left", "adm", "users", "usr", ["adm.user_id = usr.user_id", "usr.isdelete = false", "usr.istrash = false"]),
@@ -174,8 +174,8 @@ const AdministratorService = (props) => {
174
174
  // buildSqlRelation("left", "adm", "user_status", "usrsta_isowner", ["adm.user_id = usrsta_isowner.user_id", "usrsta_isowner.type = 'IS_OWNER'", "usrsta_isowner.isdelete = false", "usrsta_isowner.istrash = false"]),
175
175
  // buildSqlRelation("left", "adm", "user_props", "usrprop_location", ["adm.user_id = usrprop_location.user_id", "usrprop_location.type = 'LOCATION_ID'", "usrprop_location.isdelete = false", "usrprop_location.istrash = false"]),
176
176
  // buildSqlRelation("left", "adm", "locations", "location", ["usrprop_location.props_id = location.location_id", "location.isdelete = false", "location.istrash = false"]),
177
- (0, lib_1.buildSqlRelation)("left", "adm", "group_owners", "grpown", ["adm.user_id = grpown.user_id", "grpown.isdelete = false", "grpown.istrash = false"]),
178
- (0, lib_1.buildSqlRelation)("left", "adm", "groups", "grp", ["grpown.group_id = grp.group_id", "grp.isdelete = false", "grp.istrash = false"])
177
+ // buildSqlRelation("left", "adm", "group_owners", "grpown", ["adm.user_id = grpown.user_id", "grpown.isdelete = false", "grpown.istrash = false"]),
178
+ // buildSqlRelation("left", "adm", "groups", "grp", ["grpown.group_id = grp.group_id", "grp.isdelete = false", "grp.istrash = false"])
179
179
  ];
180
180
  let sqlGroupBy = [
181
181
  ...Object.keys(mainSqlSelect),
@@ -1 +1 @@
1
- {"version":3,"file":"AdministratorService.js","sourceRoot":"","sources":["../../../src/services/user/AdministratorService.ts"],"names":[],"mappings":";;;AAAA,mCAA+C;AAE/C,qCAOkB;AAElB,yCAAwE;AAMxE,+BAAgK;AAEhK,+BAAuC;AAI1B,QAAA,sBAAsB,GAAG;IAClC,QAAQ,EAAE,UAAU;IACpB,aAAa,EAAE,gBAAgB;IAC/B,4BAA4B,EAAE,gCAAgC;IAC9D,UAAU,EAAE,aAAa;CAC5B,CAAA;AAoDD,MAAM,gBAAgB,GAAG,CAAC,IAAsC,EAAE,EAAE;IAEhE,IAAI,eAAe,IAAI,IAAI,EAAE,CAAC;QAE1B,OAAO;YACH,CAAC,GAAG,iCAAwB,CAAC,OAAO,EAAE,CAAC,EAAE,IAAI,CAAC,aAAa,CAAC,MAAM;YAClE,CAAC,GAAG,iCAAwB,CAAC,QAAQ,EAAE,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC;SAChF,CAAA;IACL,CAAC;IAED,OAAO,KAAK,CAAA;AAEhB,CAAC,CAAA;AAED,MAAM,gBAAgB,GAAG,CAAC,IAAsC,EAAE,EAAE;IAEhE,IAAI,eAAe,IAAI,IAAI,EAAE,CAAC;QAE1B,OAAO;QACH,sEAAsE;SACzE,CAAA;IACL,CAAC;IAED,OAAO,KAAK,CAAA;AAEhB,CAAC,CAAA;AAED,IAAI,aAAa,GAAG;IAChB,CAAC,OAAO,iCAAwB,CAAC,gBAAgB,EAAE,CAAC,EAAE,kBAAkB;IACxE,CAAC,OAAO,iCAAwB,CAAC,OAAO,EAAE,CAAC,EAAE,SAAS;IACtD,CAAC,OAAO,iCAAwB,CAAC,QAAQ,EAAE,CAAC,EAAE,UAAU;CAC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E,eAAe,CAAU,EAAE,UAAU,EAAE,sBAAsB,EAAE;QAC5I,oBAAoB,EAAE,EAAE,EAAE,EAAE,oBAAoB,EAAE,cAAc,EAAE,CAAC,UAAU,EAAE,eAAe,CAAU,EAAE,UAAU,EAAE,uBAAuB,EAAE;QAC/I,YAAY,EAAE,EAAE,EAAE,EAAE,YAAY,EAAE,cAAc,EAAE,CAAC,UAAU,EAAE,eAAe,CAAU,EAAE,UAAU,EAAE,6BAA6B,EAAE;KACxI,CAAC;IAEF,OAAO,IAAA,oBAAc,EAAC,sBAAsB,EAAE,IAAI,EAAE,aAAa,CAAC,CAAC;AAEvE,CAAC,CAAA;AAlSY,QAAA,oBAAoB,wBAkShC","sourcesContent":["import { logError, throwError } from \"@/utils\";\n\nimport {\n ModelUserFields,\n AdministratorModel,\n ModelAdministratorFields,\n ModelGroupFields,\n // ModelUserPropFields,\n ModelLocationFields\n} from \"@/models\";\n\nimport { InjectionFieldService, userParentSqlSelect } from \"@/services\";\n\nimport { QueryList, QueryGet } from \"@/schema/common\";\n\nimport { DefaultServiceProps } from \"@/utils\";\n\nimport { buildSqlRelation, buildSqlRawSelect, buildSqlWhere, buildSqlSelect, buildSqlLimitOffset, buildSqlOrderBy, buildInjectionFieldsSqlSelect } from \"@/lib\";\n\nimport { ServiceFactory } from \"@/lib\";\n\nexport type UserType = \"administrator\"\n\nexport const administratorDataTypes = {\n location: \"location\",\n locationCount: \"location_count\",\n administratorInjectionFields: \"administrator_injection_fields\",\n parentUser: \"parent_user\"\n}\n\nexport type AdministratorDataType = keyof typeof administratorDataTypes;\n\nexport type AdministratorServiceProps = DefaultServiceProps & {};\n\nexport type AdministratorGetProps = {\n id: number,\n includePassword?: boolean\n datatypes: AdministratorDataType[]\n skipFilterAccountId?: boolean\n};\n\nexport type AdministratorGetByUsernameProps = {\n username: string,\n includePassword?: boolean\n datatypes: AdministratorDataType[]\n skipFilterAccountId?: boolean\n};\n\nexport type AdministratorListProps = QueryList & {\n includePassword?: boolean\n datatypes: AdministratorDataType[]\n skipFilterAccountId?: boolean\n};\n\nexport type AdministratorRemoveProps = {\n userIds: BigInt[]\n};\n\nexport type AdministratorCreateProps = {\n data:\n // administrator\n {\n administrator: {\n userId: number,\n isOwner: boolean\n }\n }\n}\n\nexport type AdministratorUpdateProps = {\n userId: number,\n data:\n // administrator\n {\n administrator: {\n // userId: number,\n }\n }\n}\n\nconst getCreatePayload = (data: AdministratorCreateProps[\"data\"]) => {\n\n if (\"administrator\" in data) {\n\n return {\n [`${ModelAdministratorFields.user_id}`]: data.administrator.userId,\n [`${ModelAdministratorFields.is_owner}`]: Boolean(data.administrator.isOwner),\n }\n }\n\n return false\n\n}\n\nconst getUpdatePayload = (data: AdministratorUpdateProps[\"data\"]) => {\n\n if (\"administrator\" in data) {\n\n return {\n // [`${ModelAdministratorFields.user_id}`]: data.administrator.userId,\n }\n }\n\n return false\n\n}\n\nlet mainSqlSelect = {\n [`adm.${ModelAdministratorFields.administrator_id}`]: \"administrator_id\",\n [`adm.${ModelAdministratorFields.user_id}`]: \"user_id\",\n [`adm.${ModelAdministratorFields.is_owner}`]: \"is_owner\",\n}\n\nlet userSqlSelect = {\n [`usr.${ModelUserFields.login_username}`]: \"username\",\n [`usr.${ModelUserFields.user_type}`]: \"user_type\",\n [`usr.${ModelUserFields.firstname}`]: \"firstname\",\n [`usr.${ModelUserFields.lastname}`]: \"lastname\",\n [`CONCAT(usr.${ModelUserFields.contact_country_code}, usr.${ModelUserFields.contact_phone_number})`]: \"contact\",\n [`usr.${ModelUserFields.contact_country_code}`]: \"contact_country_code\",\n [`usr.${ModelUserFields.contact_phone_number}`]: \"contact_phone_number\",\n [`usr.${ModelUserFields.email}`]: \"email\",\n [`usr.${ModelUserFields.address}`]: \"address\",\n [`usr.${ModelUserFields.status}`]: \"status\",\n}\n\nlet defaultSqlSelect = {\n [`adm.${ModelAdministratorFields.createdatetime}`]: \"createdatetime\",\n [`creator.${ModelUserFields.login_username}`]: \"createusername\",\n [`adm.${ModelAdministratorFields.updatedatetime}`]: \"updatedatetime\",\n [`updater.${ModelUserFields.login_username}`]: \"updateusername\",\n [`adm.${ModelAdministratorFields.isdelete}`]: \"isdelete\",\n [`adm.${ModelAdministratorFields.istrash}`]: \"istrash\",\n [`adm.${ModelAdministratorFields.accountid}`]: \"accountid\",\n}\n\n// let userStatusIsOwnerSqlSelect = {\n// [`COALESCE(usrsta_isowner.${ModelUserStatusFields.status}::int, 0)`]: \"is_owner\"\n// }\n\n// let userPropLocationSqlSelect = {\n// [`COALESCE(usrprop_location.${ModelUserPropFields.props_id}::int, 0)`]: \"location_id\",\n// [`COALESCE(\n// STRING_AGG(DISTINCT usrprop_location.${ModelUserPropFields.props_id}::text, ', '),\n// ''\n// )`]: \"location_id\",\n// [`COALESCE(location.${ModelLocationFields.location_name}::text, '')`]: \"location_name\",\n// [`COALESCE(\n// STRING_AGG(DISTINCT location.${ModelLocationFields.location_name}::text, ', '),\n// ''\n// )`]: \"location_name\",\n// }\n\nlet groupOwnerSqlSelect = {\n [`COALESCE(\n STRING_AGG(DISTINCT grp.${ModelGroupFields.group_id}::text, ', '),\n ''\n )`]: \"access_group_id\",\n [`COALESCE(\n STRING_AGG(DISTINCT grp.${ModelGroupFields.group_label}::text, ', '),\n ''\n )`]: \"access_group_label\",\n [`COALESCE(\n STRING_AGG(DISTINCT grp.${ModelGroupFields.group_description}::text, ', '),\n ''\n )`]: \"access_group_description\",\n [`COALESCE(\n STRING_AGG(DISTINCT grp.${ModelGroupFields.group_type}::text, ', '),\n ''\n )`]: \"access_group_type\"\n // [`COALESCE(\n // JSON_AGG(\n // DISTINCT JSONB_BUILD_OBJECT(\n // '${ModelGroupFields.group_label}', grp.group_label,\n // '${ModelGroupFields.group_id}', grp.group_id,\n // '${ModelGroupFields.group_type}', grp.group_type\n // )\n // ) FILTER (WHERE grp.group_id IS NOT NULL AND grp.isdelete = false AND grp.istrash = false), \n // '[]'\n // )`]: \"grp\"\n}\n\nexport const AdministratorService = (props: AdministratorServiceProps) => {\n\n const {\n ...rest\n } = props\n\n const administratorModel = AdministratorModel({ ...rest })\n\n const injectionFieldService = InjectionFieldService({ ...rest, injectionFieldType: \"user\" })\n\n const createAdministrator = async ({ data }: AdministratorCreateProps) => {\n\n const _data = getCreatePayload(data)\n\n if (!_data) {\n throw new Error(`Invalid create administrator payload: ${JSON.stringify(_data)}`);\n }\n\n let response = await administratorModel.create({ data: _data })\n\n return response\n }\n\n const updateAdministrator = async ({ userId, data }: AdministratorUpdateProps) => {\n\n const _data = getUpdatePayload(data)\n\n if (!_data) {\n throw new Error(`Invalid update administrator payload: ${JSON.stringify(_data)}`);\n }\n\n let response = await administratorModel.update({ where: { [`${ModelAdministratorFields.user_id}`]: userId }, data: _data })\n\n return response\n }\n\n const getAdministrator = async ({ id, datatypes = [], includePassword = false, skipFilterAccountId = false }: AdministratorGetProps) => {\n\n let { data } = await listAdministrators({\n includePassword,\n limit: 1,\n offset: 0,\n filters: [{ field: \"user_id\", operator: \"=\", value: id }],\n sortfield: \"user_id\",\n sortorder: \"ASC\",\n datatypes,\n skipFilterAccountId\n })\n\n return data[0] ?? null;\n\n };\n\n const getAdministratorByUsername = async ({ username = \"\", includePassword = false, datatypes = [], skipFilterAccountId = false }: AdministratorGetByUsernameProps) => {\n\n let { data } = await listAdministrators({\n includePassword,\n limit: 1,\n offset: 0,\n filters: [\n { field: `username`, operator: \"=\", value: `${username}` },\n { field: `user_type`, operator: \"=\", value: `administrator` },\n ],\n sortfield: `${ModelUserFields.user_id}`,\n sortorder: \"ASC\",\n datatypes,\n skipFilterAccountId\n })\n\n return data[0] ?? null;\n\n };\n\n const listAdministrators = async ({\n includePassword = false,\n limit,\n offset,\n filters,\n sortfield,\n sortorder,\n datatypes = [],\n skipFilterAccountId = false\n }: AdministratorListProps) => {\n\n let data = []\n\n if (includePassword === true) {\n userSqlSelect = {\n ...userSqlSelect,\n [`usr.${ModelUserFields.login_password}`]: \"password\",\n }\n } else {\n delete userSqlSelect[`usr.${ModelUserFields.login_password}`];\n }\n\n let sqlSelect = [\n `COUNT(*) OVER() as filtered_count`,\n buildSqlSelect(``, mainSqlSelect),\n buildSqlSelect(``, userSqlSelect),\n buildSqlSelect(``, defaultSqlSelect),\n // buildSqlSelect(``, userStatusIsOwnerSqlSelect),\n // buildSqlSelect(``, userPropLocationSqlSelect),\n buildSqlSelect(``, groupOwnerSqlSelect)\n ]\n\n let sqlRelation = [\n buildSqlRelation(\"left\", \"adm\", \"users\", \"usr\", [\"adm.user_id = usr.user_id\", \"usr.isdelete = false\", \"usr.istrash = false\"]),\n buildSqlRelation(\"left\", \"adm\", \"users\", \"creator\", [\"adm.createuserid = creator.user_id\", \"creator.isdelete = false\", \"creator.istrash = false\"]),\n buildSqlRelation(\"left\", \"adm\", \"users\", \"updater\", [\"adm.updateuserid = updater.user_id\", \"updater.isdelete = false\", \"updater.istrash = false\"]),\n // buildSqlRelation(\"left\", \"adm\", \"user_status\", \"usrsta_isowner\", [\"adm.user_id = usrsta_isowner.user_id\", \"usrsta_isowner.type = 'IS_OWNER'\", \"usrsta_isowner.isdelete = false\", \"usrsta_isowner.istrash = false\"]),\n // buildSqlRelation(\"left\", \"adm\", \"user_props\", \"usrprop_location\", [\"adm.user_id = usrprop_location.user_id\", \"usrprop_location.type = 'LOCATION_ID'\", \"usrprop_location.isdelete = false\", \"usrprop_location.istrash = false\"]),\n // buildSqlRelation(\"left\", \"adm\", \"locations\", \"location\", [\"usrprop_location.props_id = location.location_id\", \"location.isdelete = false\", \"location.istrash = false\"]),\n buildSqlRelation(\"left\", \"adm\", \"group_owners\", \"grpown\", [\"adm.user_id = grpown.user_id\", \"grpown.isdelete = false\", \"grpown.istrash = false\"]),\n buildSqlRelation(\"left\", \"adm\", \"groups\", \"grp\", [\"grpown.group_id = grp.group_id\", \"grp.isdelete = false\", \"grp.istrash = false\"])\n ]\n\n let sqlGroupBy: string[] = [\n ...Object.keys(mainSqlSelect),\n ...Object.keys(userSqlSelect),\n // ...Object.keys(userStatusIsOwnerSqlSelect),\n // ...Object.keys(userPropLocationSqlSelect),\n ...Object.keys(defaultSqlSelect)\n ]\n\n let filterColumns = {\n ...mainSqlSelect,\n ...userSqlSelect,\n // ...userStatusIsOwnerSqlSelect,\n // ...userPropLocationSqlSelect,\n ...defaultSqlSelect\n }\n\n if (datatypes.includes(administratorDataTypes.administratorInjectionFields)) {\n\n let activeInjectionFields = await injectionFieldService.listActiveInjectionFields(\"user\", \"administrator\")\n\n const administratorInjectionFieldSqlSelect = buildInjectionFieldsSqlSelect(\"uif\", activeInjectionFields)\n\n filterColumns = { ...filterColumns, ...administratorInjectionFieldSqlSelect }\n\n sqlSelect = [...sqlSelect, ...(activeInjectionFields.length > 0 ? [buildSqlSelect(``, administratorInjectionFieldSqlSelect)] : [])]\n sqlRelation = [...sqlRelation, buildSqlRelation(\"left\", \"adm\", \"user_injection_fields\", \"uif\", [\"adm.user_id = uif.user_id\", \"uif.field_ref = 'user'\", \"uif.field_module = 'administrator'\", \"uif.isdelete = false\", \"uif.istrash = false\"])]\n sqlGroupBy = [...sqlGroupBy, ...Object.keys(administratorInjectionFieldSqlSelect)]\n }\n\n if (datatypes.includes(administratorDataTypes.location)) {\n\n let locationSqlSelect = {\n [`COALESCE(\n JSON_AGG(\n DISTINCT JSONB_BUILD_OBJECT(\n '${ModelLocationFields.location_id}', location.location_id,\n '${ModelLocationFields.location_code}', location.location_code,\n '${ModelLocationFields.location_name}', location.location_name,\n '${ModelLocationFields.location_type}', location.location_type,\n '${ModelLocationFields.address_1}', location.address_1,\n '${ModelLocationFields.address_2}', location.address_2,\n '${ModelLocationFields.area_id}', location.area_id,\n '${ModelLocationFields.country_id}', location.country_id,\n '${ModelLocationFields.state_id}', location.state_id,\n '${ModelLocationFields.postcode}', location.postcode,\n '${ModelLocationFields.is_default}', location.is_default,\n '${ModelLocationFields.person_contact}', location.person_contact,\n '${ModelLocationFields.person_name}', location.person_contact,\n '${ModelLocationFields.person_email}', location.person_email,\n '${ModelLocationFields.isdelete}', location.isdelete,\n '${ModelLocationFields.istrash}', location.istrash\n )\n ) FILTER (WHERE location.location_id IS NOT NULL AND location.isdelete = false AND location.istrash = false), \n '[]'\n )`]: \"locations\"\n }\n\n filterColumns = { ...filterColumns, ...locationSqlSelect }\n\n sqlSelect = [...sqlSelect, buildSqlSelect(``, locationSqlSelect)]\n // sqlRelation = [...sqlRelation, buildSqlRelation(\"left\", \"usrprop_location\", \"location\", \"brn\", [\"adm.user_id = brn.user_id\", \"brn.isdelete = false\", \"brn.istrash = false\"])]\n\n }\n\n if (datatypes.includes(administratorDataTypes.locationCount)) {\n\n let locationCountSqlSelect = {\n [`COUNT(DISTINCT location.${ModelLocationFields.location_id})::INT`]: \"location_count\"\n }\n\n filterColumns = { ...filterColumns, ...locationCountSqlSelect }\n\n sqlSelect = [...sqlSelect, buildSqlSelect(``, locationCountSqlSelect)]\n // sqlRelation = [...sqlRelation, buildSqlRelation(\"left\", \"cus\", \"branches\", \"brncount\", [\"adm.user_id = brncount.user_id\", \"brncount.isdelete = false\", \"brncount.istrash = false\"])]\n\n }\n\n if (datatypes.includes(administratorDataTypes.parentUser)) {\n\n filterColumns = { ...filterColumns, ...userParentSqlSelect }\n\n sqlRelation = [...sqlRelation, buildSqlRelation(\"left\", \"wrk\", \"users\", \"parentuser\", [\"usr.parent_user_id = parentuser.user_id\", \"parentuser.isdelete = false\", \"parentuser.istrash = false\"])]\n sqlSelect = [...sqlSelect, buildSqlSelect(``, userParentSqlSelect)]\n sqlGroupBy = [...sqlGroupBy, ...Object.keys(userParentSqlSelect)]\n\n }\n\n // if (datatypes.includes(customerDataTypes.branchUserCount)) {\n\n // let branchUserCountSqlSelect = {\n // [`COUNT(DISTINCT brnusrcount.${ModelBranchUserFields.branch_user_id})::INT`]: \"branch_user_count\"\n // }\n\n // filterColumns = { ...filterColumns, ...branchUserCountSqlSelect }\n\n // sqlSelect = [...sqlSelect, buildSqlSelect(``, branchUserCountSqlSelect)]\n // sqlRelation = [...sqlRelation, buildSqlRelation(\"left\", \"cus\", \"branch_users\", \"brnusrcount\", [\"adm.user_id = brnusrcount.user_id\", \"brnusrcount.isdelete = false\", \"brnusrcount.istrash = false\"])]\n\n // }\n\n let sqlWhere = [\n `adm.isdelete = false`,\n `adm.istrash = false`,\n ...(filters.length ? [buildSqlWhere(filters, filterColumns)?.where] : []),\n ]\n\n let sqlOrderby = buildSqlOrderBy(sortfield, sortorder)\n let sqlLimitOffset = buildSqlLimitOffset(limit, offset)\n\n const sqlRaw = buildSqlRawSelect({\n tableName: \"administrators\",\n mainAlias: \"adm\",\n accountId: rest.accountId,\n sqlSelect,\n sqlRelation,\n sqlWhere,\n sqlGroupBy,\n sqlOrderby,\n sqlLimitOffset,\n skipFilterAccountId\n })\n\n data = await administratorModel.raw(sqlRaw)\n\n const response = {\n data: data.map(({ filtered_count, ...rest }) => rest),\n total: data.length ? Number(data[0].filtered_count) : 0\n }\n\n return response\n\n };\n\n const removeAdministrators = async ({ userIds }: AdministratorRemoveProps) => {\n\n if (!userIds.length) throwError('userIds is required');\n\n const response = await administratorModel.remove({\n where: {\n [`${ModelAdministratorFields.user_id}`]: {\n in: userIds\n },\n [`${ModelAdministratorFields.is_owner}`]: false // cannot default is_owner account\n }\n });\n\n return response\n };\n\n const getDataTypes = () => {\n return Object.values(administratorDataTypes);\n }\n\n // return {\n // createAdministrator,\n // updateAdministrator,\n // getAdministrator,\n // listAdministrators,\n // removeAdministrators,\n // getDataTypes\n // }\n\n const methodConfigs = {\n getAdministrator: { fn: getAdministrator, allowUserTypes: [\"operator\", \"administrator\"] as const, actionName: \"get administrator\" },\n getAdministratorByUsername: { fn: getAdministratorByUsername, allowUserTypes: [\"operator\", \"administrator\"] as const, actionName: \"get administrator by username\" },\n listAdministrators: { fn: listAdministrators, allowUserTypes: [\"operator\", \"administrator\"] as const, actionName: \"list administrators\" },\n createAdministrator: { fn: createAdministrator, allowUserTypes: [\"operator\", \"administrator\"] as const, actionName: \"create administrator\" },\n updateAdministrator: { fn: updateAdministrator, allowUserTypes: [\"operator\", \"administrator\"] as const, actionName: \"update administrator\" },\n removeAdministrators: { fn: removeAdministrators, allowUserTypes: [\"operator\", \"administrator\"] as const, actionName: \"remove administrators\" },\n getDataTypes: { fn: getDataTypes, allowUserTypes: [\"operator\", \"administrator\"] as const, actionName: \"get administrator datatypes\" },\n };\n\n return ServiceFactory(\"AdministratorService\", rest, methodConfigs);\n\n}\n\n"]}
1
+ {"version":3,"file":"AdministratorService.js","sourceRoot":"","sources":["../../../src/services/user/AdministratorService.ts"],"names":[],"mappings":";;;AAAA,mCAA+C;AAE/C,qCAOkB;AAElB,yCAAwE;AAMxE,+BAAgK;AAEhK,+BAAuC;AAI1B,QAAA,sBAAsB,GAAG;IAClC,QAAQ,EAAE,UAAU;IACpB,aAAa,EAAE,gBAAgB;IAC/B,4BAA4B,EAAE,gCAAgC;IAC9D,UAAU,EAAE,aAAa;CAC5B,CAAA;AAoDD,MAAM,gBAAgB,GAAG,CAAC,IAAsC,EAAE,EAAE;IAEhE,IAAI,eAAe,IAAI,IAAI,EAAE,CAAC;QAE1B,OAAO;YACH,CAAC,GAAG,iCAAwB,CAAC,OAAO,EAAE,CAAC,EAAE,IAAI,CAAC,aAAa,CAAC,MAAM;YAClE,CAAC,GAAG,iCAAwB,CAAC,QAAQ,EAAE,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC;SAChF,CAAA;IACL,CAAC;IAED,OAAO,KAAK,CAAA;AAEhB,CAAC,CAAA;AAED,MAAM,gBAAgB,GAAG,CAAC,IAAsC,EAAE,EAAE;IAEhE,IAAI,eAAe,IAAI,IAAI,EAAE,CAAC;QAE1B,OAAO;QACH,sEAAsE;SACzE,CAAA;IACL,CAAC;IAED,OAAO,KAAK,CAAA;AAEhB,CAAC,CAAA;AAED,IAAI,aAAa,GAAG;IAChB,CAAC,OAAO,iCAAwB,CAAC,gBAAgB,EAAE,CAAC,EAAE,kBAAkB;IACxE,CAAC,OAAO,iCA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AAE,cAAc,EAAE,CAAC,UAAU,EAAE,eAAe,CAAU,EAAE,UAAU,EAAE,6BAA6B,EAAE;KACxI,CAAC;IAEF,OAAO,IAAA,oBAAc,EAAC,sBAAsB,EAAE,IAAI,EAAE,aAAa,CAAC,CAAC;AAEvE,CAAC,CAAA;AAlSY,QAAA,oBAAoB,wBAkShC","sourcesContent":["import { logError, throwError } from \"@/utils\";\n\nimport {\n ModelUserFields,\n AdministratorModel,\n ModelAdministratorFields,\n ModelGroupFields,\n // ModelUserPropFields,\n ModelLocationFields\n} from \"@/models\";\n\nimport { InjectionFieldService, userParentSqlSelect } from \"@/services\";\n\nimport { QueryList, QueryGet } from \"@/schema/common\";\n\nimport { DefaultServiceProps } from \"@/utils\";\n\nimport { buildSqlRelation, buildSqlRawSelect, buildSqlWhere, buildSqlSelect, buildSqlLimitOffset, buildSqlOrderBy, buildInjectionFieldsSqlSelect } from \"@/lib\";\n\nimport { ServiceFactory } from \"@/lib\";\n\nexport type UserType = \"administrator\"\n\nexport const administratorDataTypes = {\n location: \"location\",\n locationCount: \"location_count\",\n administratorInjectionFields: \"administrator_injection_fields\",\n parentUser: \"parent_user\"\n}\n\nexport type AdministratorDataType = keyof typeof administratorDataTypes;\n\nexport type AdministratorServiceProps = DefaultServiceProps & {};\n\nexport type AdministratorGetProps = {\n id: number,\n includePassword?: boolean\n datatypes: AdministratorDataType[]\n skipFilterAccountId?: boolean\n};\n\nexport type AdministratorGetByUsernameProps = {\n username: string,\n includePassword?: boolean\n datatypes: AdministratorDataType[]\n skipFilterAccountId?: boolean\n};\n\nexport type AdministratorListProps = QueryList & {\n includePassword?: boolean\n datatypes: AdministratorDataType[]\n skipFilterAccountId?: boolean\n};\n\nexport type AdministratorRemoveProps = {\n userIds: BigInt[]\n};\n\nexport type AdministratorCreateProps = {\n data:\n // administrator\n {\n administrator: {\n userId: number,\n isOwner: boolean\n }\n }\n}\n\nexport type AdministratorUpdateProps = {\n userId: number,\n data:\n // administrator\n {\n administrator: {\n // userId: number,\n }\n }\n}\n\nconst getCreatePayload = (data: AdministratorCreateProps[\"data\"]) => {\n\n if (\"administrator\" in data) {\n\n return {\n [`${ModelAdministratorFields.user_id}`]: data.administrator.userId,\n [`${ModelAdministratorFields.is_owner}`]: Boolean(data.administrator.isOwner),\n }\n }\n\n return false\n\n}\n\nconst getUpdatePayload = (data: AdministratorUpdateProps[\"data\"]) => {\n\n if (\"administrator\" in data) {\n\n return {\n // [`${ModelAdministratorFields.user_id}`]: data.administrator.userId,\n }\n }\n\n return false\n\n}\n\nlet mainSqlSelect = {\n [`adm.${ModelAdministratorFields.administrator_id}`]: \"administrator_id\",\n [`adm.${ModelAdministratorFields.user_id}`]: \"user_id\",\n [`adm.${ModelAdministratorFields.is_owner}`]: \"is_owner\",\n}\n\nlet userSqlSelect = {\n [`usr.${ModelUserFields.login_username}`]: \"username\",\n [`usr.${ModelUserFields.user_type}`]: \"user_type\",\n [`usr.${ModelUserFields.firstname}`]: \"firstname\",\n [`usr.${ModelUserFields.lastname}`]: \"lastname\",\n [`CONCAT(usr.${ModelUserFields.contact_country_code}, usr.${ModelUserFields.contact_phone_number})`]: \"contact\",\n [`usr.${ModelUserFields.contact_country_code}`]: \"contact_country_code\",\n [`usr.${ModelUserFields.contact_phone_number}`]: \"contact_phone_number\",\n [`usr.${ModelUserFields.email}`]: \"email\",\n [`usr.${ModelUserFields.address}`]: \"address\",\n [`usr.${ModelUserFields.status}`]: \"status\",\n}\n\nlet defaultSqlSelect = {\n [`adm.${ModelAdministratorFields.createdatetime}`]: \"createdatetime\",\n [`creator.${ModelUserFields.login_username}`]: \"createusername\",\n [`adm.${ModelAdministratorFields.updatedatetime}`]: \"updatedatetime\",\n [`updater.${ModelUserFields.login_username}`]: \"updateusername\",\n [`adm.${ModelAdministratorFields.isdelete}`]: \"isdelete\",\n [`adm.${ModelAdministratorFields.istrash}`]: \"istrash\",\n [`adm.${ModelAdministratorFields.accountid}`]: \"accountid\",\n}\n\n// let userStatusIsOwnerSqlSelect = {\n// [`COALESCE(usrsta_isowner.${ModelUserStatusFields.status}::int, 0)`]: \"is_owner\"\n// }\n\n// let userPropLocationSqlSelect = {\n// [`COALESCE(usrprop_location.${ModelUserPropFields.props_id}::int, 0)`]: \"location_id\",\n// [`COALESCE(\n// STRING_AGG(DISTINCT usrprop_location.${ModelUserPropFields.props_id}::text, ', '),\n// ''\n// )`]: \"location_id\",\n// [`COALESCE(location.${ModelLocationFields.location_name}::text, '')`]: \"location_name\",\n// [`COALESCE(\n// STRING_AGG(DISTINCT location.${ModelLocationFields.location_name}::text, ', '),\n// ''\n// )`]: \"location_name\",\n// }\n\n// let groupOwnerSqlSelect = {\n// [`COALESCE(\n// STRING_AGG(DISTINCT grp.${ModelGroupFields.group_id}::text, ', '),\n// ''\n// )`]: \"access_group_id\",\n// [`COALESCE(\n// STRING_AGG(DISTINCT grp.${ModelGroupFields.group_label}::text, ', '),\n// ''\n// )`]: \"access_group_label\",\n// [`COALESCE(\n// STRING_AGG(DISTINCT grp.${ModelGroupFields.group_description}::text, ', '),\n// ''\n// )`]: \"access_group_description\",\n// [`COALESCE(\n// STRING_AGG(DISTINCT grp.${ModelGroupFields.group_type}::text, ', '),\n// ''\n// )`]: \"access_group_type\"\n// // [`COALESCE(\n// // JSON_AGG(\n// // DISTINCT JSONB_BUILD_OBJECT(\n// // '${ModelGroupFields.group_label}', grp.group_label,\n// // '${ModelGroupFields.group_id}', grp.group_id,\n// // '${ModelGroupFields.group_type}', grp.group_type\n// // )\n// // ) FILTER (WHERE grp.group_id IS NOT NULL AND grp.isdelete = false AND grp.istrash = false), \n// // '[]'\n// // )`]: \"grp\"\n// }\n\nexport const AdministratorService = (props: AdministratorServiceProps) => {\n\n const {\n ...rest\n } = props\n\n const administratorModel = AdministratorModel({ ...rest })\n\n const injectionFieldService = InjectionFieldService({ ...rest, injectionFieldType: \"user\" })\n\n const createAdministrator = async ({ data }: AdministratorCreateProps) => {\n\n const _data = getCreatePayload(data)\n\n if (!_data) {\n throw new Error(`Invalid create administrator payload: ${JSON.stringify(_data)}`);\n }\n\n let response = await administratorModel.create({ data: _data })\n\n return response\n }\n\n const updateAdministrator = async ({ userId, data }: AdministratorUpdateProps) => {\n\n const _data = getUpdatePayload(data)\n\n if (!_data) {\n throw new Error(`Invalid update administrator payload: ${JSON.stringify(_data)}`);\n }\n\n let response = await administratorModel.update({ where: { [`${ModelAdministratorFields.user_id}`]: userId }, data: _data })\n\n return response\n }\n\n const getAdministrator = async ({ id, datatypes = [], includePassword = false, skipFilterAccountId = false }: AdministratorGetProps) => {\n\n let { data } = await listAdministrators({\n includePassword,\n limit: 1,\n offset: 0,\n filters: [{ field: \"user_id\", operator: \"=\", value: id }],\n sortfield: \"user_id\",\n sortorder: \"ASC\",\n datatypes,\n skipFilterAccountId\n })\n\n return data[0] ?? null;\n\n };\n\n const getAdministratorByUsername = async ({ username = \"\", includePassword = false, datatypes = [], skipFilterAccountId = false }: AdministratorGetByUsernameProps) => {\n\n let { data } = await listAdministrators({\n includePassword,\n limit: 1,\n offset: 0,\n filters: [\n { field: `username`, operator: \"=\", value: `${username}` },\n { field: `user_type`, operator: \"=\", value: `administrator` },\n ],\n sortfield: `${ModelUserFields.user_id}`,\n sortorder: \"ASC\",\n datatypes,\n skipFilterAccountId\n })\n\n return data[0] ?? null;\n\n };\n\n const listAdministrators = async ({\n includePassword = false,\n limit,\n offset,\n filters,\n sortfield,\n sortorder,\n datatypes = [],\n skipFilterAccountId = false\n }: AdministratorListProps) => {\n\n let data = []\n\n if (includePassword === true) {\n userSqlSelect = {\n ...userSqlSelect,\n [`usr.${ModelUserFields.login_password}`]: \"password\",\n }\n } else {\n delete userSqlSelect[`usr.${ModelUserFields.login_password}`];\n }\n\n let sqlSelect = [\n `COUNT(*) OVER() as filtered_count`,\n buildSqlSelect(``, mainSqlSelect),\n buildSqlSelect(``, userSqlSelect),\n buildSqlSelect(``, defaultSqlSelect),\n // buildSqlSelect(``, userStatusIsOwnerSqlSelect),\n // buildSqlSelect(``, userPropLocationSqlSelect),\n // buildSqlSelect(``, groupOwnerSqlSelect)\n ]\n\n let sqlRelation = [\n buildSqlRelation(\"left\", \"adm\", \"users\", \"usr\", [\"adm.user_id = usr.user_id\", \"usr.isdelete = false\", \"usr.istrash = false\"]),\n buildSqlRelation(\"left\", \"adm\", \"users\", \"creator\", [\"adm.createuserid = creator.user_id\", \"creator.isdelete = false\", \"creator.istrash = false\"]),\n buildSqlRelation(\"left\", \"adm\", \"users\", \"updater\", [\"adm.updateuserid = updater.user_id\", \"updater.isdelete = false\", \"updater.istrash = false\"]),\n // buildSqlRelation(\"left\", \"adm\", \"user_status\", \"usrsta_isowner\", [\"adm.user_id = usrsta_isowner.user_id\", \"usrsta_isowner.type = 'IS_OWNER'\", \"usrsta_isowner.isdelete = false\", \"usrsta_isowner.istrash = false\"]),\n // buildSqlRelation(\"left\", \"adm\", \"user_props\", \"usrprop_location\", [\"adm.user_id = usrprop_location.user_id\", \"usrprop_location.type = 'LOCATION_ID'\", \"usrprop_location.isdelete = false\", \"usrprop_location.istrash = false\"]),\n // buildSqlRelation(\"left\", \"adm\", \"locations\", \"location\", [\"usrprop_location.props_id = location.location_id\", \"location.isdelete = false\", \"location.istrash = false\"]),\n // buildSqlRelation(\"left\", \"adm\", \"group_owners\", \"grpown\", [\"adm.user_id = grpown.user_id\", \"grpown.isdelete = false\", \"grpown.istrash = false\"]),\n // buildSqlRelation(\"left\", \"adm\", \"groups\", \"grp\", [\"grpown.group_id = grp.group_id\", \"grp.isdelete = false\", \"grp.istrash = false\"])\n ]\n\n let sqlGroupBy: string[] = [\n ...Object.keys(mainSqlSelect),\n ...Object.keys(userSqlSelect),\n // ...Object.keys(userStatusIsOwnerSqlSelect),\n // ...Object.keys(userPropLocationSqlSelect),\n ...Object.keys(defaultSqlSelect)\n ]\n\n let filterColumns = {\n ...mainSqlSelect,\n ...userSqlSelect,\n // ...userStatusIsOwnerSqlSelect,\n // ...userPropLocationSqlSelect,\n ...defaultSqlSelect\n }\n\n if (datatypes.includes(administratorDataTypes.administratorInjectionFields)) {\n\n let activeInjectionFields = await injectionFieldService.listActiveInjectionFields(\"user\", \"administrator\")\n\n const administratorInjectionFieldSqlSelect = buildInjectionFieldsSqlSelect(\"uif\", activeInjectionFields)\n\n filterColumns = { ...filterColumns, ...administratorInjectionFieldSqlSelect }\n\n sqlSelect = [...sqlSelect, ...(activeInjectionFields.length > 0 ? [buildSqlSelect(``, administratorInjectionFieldSqlSelect)] : [])]\n sqlRelation = [...sqlRelation, buildSqlRelation(\"left\", \"adm\", \"user_injection_fields\", \"uif\", [\"adm.user_id = uif.user_id\", \"uif.field_ref = 'user'\", \"uif.field_module = 'administrator'\", \"uif.isdelete = false\", \"uif.istrash = false\"])]\n sqlGroupBy = [...sqlGroupBy, ...Object.keys(administratorInjectionFieldSqlSelect)]\n }\n\n if (datatypes.includes(administratorDataTypes.location)) {\n\n let locationSqlSelect = {\n [`COALESCE(\n JSON_AGG(\n DISTINCT JSONB_BUILD_OBJECT(\n '${ModelLocationFields.location_id}', location.location_id,\n '${ModelLocationFields.location_code}', location.location_code,\n '${ModelLocationFields.location_name}', location.location_name,\n '${ModelLocationFields.location_type}', location.location_type,\n '${ModelLocationFields.address_1}', location.address_1,\n '${ModelLocationFields.address_2}', location.address_2,\n '${ModelLocationFields.area_id}', location.area_id,\n '${ModelLocationFields.country_id}', location.country_id,\n '${ModelLocationFields.state_id}', location.state_id,\n '${ModelLocationFields.postcode}', location.postcode,\n '${ModelLocationFields.is_default}', location.is_default,\n '${ModelLocationFields.person_contact}', location.person_contact,\n '${ModelLocationFields.person_name}', location.person_contact,\n '${ModelLocationFields.person_email}', location.person_email,\n '${ModelLocationFields.isdelete}', location.isdelete,\n '${ModelLocationFields.istrash}', location.istrash\n )\n ) FILTER (WHERE location.location_id IS NOT NULL AND location.isdelete = false AND location.istrash = false), \n '[]'\n )`]: \"locations\"\n }\n\n filterColumns = { ...filterColumns, ...locationSqlSelect }\n\n sqlSelect = [...sqlSelect, buildSqlSelect(``, locationSqlSelect)]\n // sqlRelation = [...sqlRelation, buildSqlRelation(\"left\", \"usrprop_location\", \"location\", \"brn\", [\"adm.user_id = brn.user_id\", \"brn.isdelete = false\", \"brn.istrash = false\"])]\n\n }\n\n if (datatypes.includes(administratorDataTypes.locationCount)) {\n\n let locationCountSqlSelect = {\n [`COUNT(DISTINCT location.${ModelLocationFields.location_id})::INT`]: \"location_count\"\n }\n\n filterColumns = { ...filterColumns, ...locationCountSqlSelect }\n\n sqlSelect = [...sqlSelect, buildSqlSelect(``, locationCountSqlSelect)]\n // sqlRelation = [...sqlRelation, buildSqlRelation(\"left\", \"cus\", \"branches\", \"brncount\", [\"adm.user_id = brncount.user_id\", \"brncount.isdelete = false\", \"brncount.istrash = false\"])]\n\n }\n\n if (datatypes.includes(administratorDataTypes.parentUser)) {\n\n filterColumns = { ...filterColumns, ...userParentSqlSelect }\n\n sqlRelation = [...sqlRelation, buildSqlRelation(\"left\", \"wrk\", \"users\", \"parentuser\", [\"usr.parent_user_id = parentuser.user_id\", \"parentuser.isdelete = false\", \"parentuser.istrash = false\"])]\n sqlSelect = [...sqlSelect, buildSqlSelect(``, userParentSqlSelect)]\n sqlGroupBy = [...sqlGroupBy, ...Object.keys(userParentSqlSelect)]\n\n }\n\n // if (datatypes.includes(customerDataTypes.branchUserCount)) {\n\n // let branchUserCountSqlSelect = {\n // [`COUNT(DISTINCT brnusrcount.${ModelBranchUserFields.branch_user_id})::INT`]: \"branch_user_count\"\n // }\n\n // filterColumns = { ...filterColumns, ...branchUserCountSqlSelect }\n\n // sqlSelect = [...sqlSelect, buildSqlSelect(``, branchUserCountSqlSelect)]\n // sqlRelation = [...sqlRelation, buildSqlRelation(\"left\", \"cus\", \"branch_users\", \"brnusrcount\", [\"adm.user_id = brnusrcount.user_id\", \"brnusrcount.isdelete = false\", \"brnusrcount.istrash = false\"])]\n\n // }\n\n let sqlWhere = [\n `adm.isdelete = false`,\n `adm.istrash = false`,\n ...(filters.length ? [buildSqlWhere(filters, filterColumns)?.where] : []),\n ]\n\n let sqlOrderby = buildSqlOrderBy(sortfield, sortorder)\n let sqlLimitOffset = buildSqlLimitOffset(limit, offset)\n\n const sqlRaw = buildSqlRawSelect({\n tableName: \"administrators\",\n mainAlias: \"adm\",\n accountId: rest.accountId,\n sqlSelect,\n sqlRelation,\n sqlWhere,\n sqlGroupBy,\n sqlOrderby,\n sqlLimitOffset,\n skipFilterAccountId\n })\n\n data = await administratorModel.raw(sqlRaw)\n\n const response = {\n data: data.map(({ filtered_count, ...rest }) => rest),\n total: data.length ? Number(data[0].filtered_count) : 0\n }\n\n return response\n\n };\n\n const removeAdministrators = async ({ userIds }: AdministratorRemoveProps) => {\n\n if (!userIds.length) throwError('userIds is required');\n\n const response = await administratorModel.remove({\n where: {\n [`${ModelAdministratorFields.user_id}`]: {\n in: userIds\n },\n [`${ModelAdministratorFields.is_owner}`]: false // cannot default is_owner account\n }\n });\n\n return response\n };\n\n const getDataTypes = () => {\n return Object.values(administratorDataTypes);\n }\n\n // return {\n // createAdministrator,\n // updateAdministrator,\n // getAdministrator,\n // listAdministrators,\n // removeAdministrators,\n // getDataTypes\n // }\n\n const methodConfigs = {\n getAdministrator: { fn: getAdministrator, allowUserTypes: [\"operator\", \"administrator\"] as const, actionName: \"get administrator\" },\n getAdministratorByUsername: { fn: getAdministratorByUsername, allowUserTypes: [\"operator\", \"administrator\"] as const, actionName: \"get administrator by username\" },\n listAdministrators: { fn: listAdministrators, allowUserTypes: [\"operator\", \"administrator\"] as const, actionName: \"list administrators\" },\n createAdministrator: { fn: createAdministrator, allowUserTypes: [\"operator\", \"administrator\"] as const, actionName: \"create administrator\" },\n updateAdministrator: { fn: updateAdministrator, allowUserTypes: [\"operator\", \"administrator\"] as const, actionName: \"update administrator\" },\n removeAdministrators: { fn: removeAdministrators, allowUserTypes: [\"operator\", \"administrator\"] as const, actionName: \"remove administrators\" },\n getDataTypes: { fn: getDataTypes, allowUserTypes: [\"operator\", \"administrator\"] as const, actionName: \"get administrator datatypes\" },\n };\n\n return ServiceFactory(\"AdministratorService\", rest, methodConfigs);\n\n}\n\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "storemw-core-api",
3
- "version": "1.0.174",
3
+ "version": "1.0.176",
4
4
  "description": "STOREMW Core API",
5
5
  "main": "dist/app.js",
6
6
  "types": "dist/app.d.ts",
@@ -967,6 +967,22 @@ model document_injection_fields {
967
967
  document_doc_id BigInt @default(0)
968
968
  }
969
969
 
970
+ model user_injection_fields {
971
+ user_injection_field_id BigInt @id @default(autoincrement())
972
+ createdatetime DateTime? @db.Timestamptz(6)
973
+ createuserid BigInt @default(0)
974
+ updatedatetime DateTime? @db.Timestamptz(6)
975
+ updateuserid BigInt @default(0)
976
+ isdelete Boolean @default(false)
977
+ istrash Boolean @default(false)
978
+ accountid BigInt @default(0)
979
+ field_module String? @db.VarChar(200)
980
+ field_ref String? @db.VarChar(200)
981
+ user_id BigInt @default(0)
982
+ branch_id BigInt @default(0)
983
+ member_id BigInt @default(0)
984
+ }
985
+
970
986
  // ============================================================
971
987
  // UTILS
972
988
  // ============================================================