autosync_backend2 1.2.36 → 1.2.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -9064,19 +9064,63 @@ export declare const app: Elysia<"", {
9064
9064
  totalCount: number;
9065
9065
  totalPage: number;
9066
9066
  result: Omit<{
9067
+ template: {
9068
+ machineKindId: string;
9069
+ companyId: string | null;
9070
+ operationAmount: number | null;
9071
+ uomId: string;
9072
+ serviceKindId: string;
9073
+ name: string;
9074
+ description: string | null;
9075
+ id: string;
9076
+ createdAt: string;
9077
+ updatedAt: string;
9078
+ deletedAt: string | null;
9079
+ oldId: number | null;
9080
+ };
9081
+ machineKind: {
9082
+ vehicleKindEnum: "MAKE" | "MODEL_GROUP" | "MODEL";
9083
+ parentId: string | null;
9084
+ name: string;
9085
+ description: string | null;
9086
+ yearStart: number | null;
9087
+ yearEnd: number | null;
9088
+ imagePath: string | null;
9089
+ id: string;
9090
+ createdAt: string;
9091
+ updatedAt: string;
9092
+ deletedAt: string | null;
9093
+ oldId: number | null;
9094
+ } | null;
9095
+ uom: {
9096
+ uomCategoryId: string;
9097
+ code: string | null;
9098
+ name: string;
9099
+ description: string | null;
9100
+ symbol: string | null;
9101
+ isBaseUnit: boolean;
9102
+ baseFactor: number | null;
9103
+ id: string;
9104
+ createdAt: string;
9105
+ updatedAt: string;
9106
+ deletedAt: string | null;
9107
+ oldId: number | null;
9108
+ } | null;
9109
+ serviceKind: {
9110
+ serviceKindId: string | null;
9111
+ companyId: string;
9112
+ branchId: string | null;
9113
+ name: string;
9114
+ description: string | null;
9115
+ enabled: boolean;
9116
+ price: number;
9117
+ id: string;
9118
+ createdAt: string;
9119
+ updatedAt: string;
9120
+ deletedAt: string | null;
9121
+ oldId: number | null;
9122
+ } | null;
9067
9123
  totalCount: number;
9068
- machineKindId: string;
9069
- companyId: string | null;
9070
- operationAmount: number | null;
9071
- uomId: string;
9072
- serviceKindId: string;
9073
- name: string;
9074
- description: string | null;
9075
- id: string;
9076
- createdAt: string;
9077
- updatedAt: string;
9078
- deletedAt: string | null;
9079
- oldId: number | null;
9080
9124
  }, "totalCount">[];
9081
9125
  };
9082
9126
  422: {
package/dist/index.js CHANGED
@@ -154572,11 +154572,13 @@ var PmTemplateLogic;
154572
154572
  ((PmTemplateLogic) => {
154573
154573
  PmTemplateLogic.select = async (query, user2) => {
154574
154574
  const filter = and(or(isNull2(pmTemplateTable.companyId), eq(pmTemplateTable.companyId, user2.companyId).if(user2.kind !== "ADMIN")));
154575
- const columns = getTableColumns(pmTemplateTable);
154576
154575
  const baseQuery = db_default.select({
154577
- ...columns,
154576
+ template: pmTemplateTable,
154577
+ machineKind: techdocVehicleKindTable,
154578
+ uom: uomTable,
154579
+ serviceKind: companyServiceKindTable,
154578
154580
  totalCount: totalCountSql
154579
- }).from(pmTemplateTable).where(filter).$dynamic();
154581
+ }).from(pmTemplateTable).leftJoin(techdocVehicleKindTable, eq(techdocVehicleKindTable.id, pmTemplateTable.machineKindId)).leftJoin(uomTable, eq(uomTable.id, pmTemplateTable.uomId)).leftJoin(companyServiceKindTable, eq(companyServiceKindTable.id, pmTemplateTable.serviceKindId)).where(filter).$dynamic();
154580
154582
  const result = await pagination_helper_default(baseQuery, query.pagination);
154581
154583
  return getPaginationContent(result, query.pagination.size);
154582
154584
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "autosync_backend2",
3
- "version": "1.2.36",
3
+ "version": "1.2.37",
4
4
  "module": "src/index.ts",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",