From 191e542de4ac205d47dda68d7f43aa440140295e Mon Sep 17 00:00:00 2001 From: Abdul Rahman Reza Date: Sat, 30 Nov 2024 16:15:19 +0700 Subject: [PATCH] update entity --- src/controllers/branch.ts | 2 +- src/controllers/product.ts | 2 +- src/helpers/express/return.ts | 2 +- src/types/error.ts | 3 --- src/types/paging.ts | 8 -------- src/types/role.ts | 1 - src/types/status.ts | 4 ---- 7 files changed, 3 insertions(+), 19 deletions(-) delete mode 100644 src/types/error.ts delete mode 100644 src/types/paging.ts delete mode 100644 src/types/role.ts delete mode 100644 src/types/status.ts diff --git a/src/controllers/branch.ts b/src/controllers/branch.ts index 2d7cbea..d7de059 100644 --- a/src/controllers/branch.ts +++ b/src/controllers/branch.ts @@ -5,7 +5,7 @@ import { OrmHelper } from "../helpers/orm"; import Joi from "joi"; import { ILogObj, Logger } from "tslog"; import { Language } from "../langs/lang"; -import { Paging } from "../types/paging"; +import { Paging } from "entity"; import CommonHelper from "../helpers/common"; import * as fastcsv from 'fast-csv'; import dayjs from "dayjs"; diff --git a/src/controllers/product.ts b/src/controllers/product.ts index 5727c04..a251a51 100644 --- a/src/controllers/product.ts +++ b/src/controllers/product.ts @@ -5,7 +5,7 @@ import { OrmHelper } from "../helpers/orm"; import Joi from "joi"; import { ILogObj, Logger } from "tslog"; import { Language } from "../langs/lang"; -import { Paging } from "../types/paging"; +import { Paging } from "entity"; import CommonHelper from "../helpers/common"; import * as fastcsv from 'fast-csv'; import dayjs from "dayjs"; diff --git a/src/helpers/express/return.ts b/src/helpers/express/return.ts index 92e9473..a0fde5c 100644 --- a/src/helpers/express/return.ts +++ b/src/helpers/express/return.ts @@ -1,5 +1,5 @@ import { Response } from 'express'; -import { ErrorType, ErrorValidation } from '../../types/error'; +import { ErrorType, ErrorValidation } from 'entity'; export class ReturnHelper { static successResponseAny( diff --git a/src/types/error.ts b/src/types/error.ts deleted file mode 100644 index 1415969..0000000 --- a/src/types/error.ts +++ /dev/null @@ -1,3 +0,0 @@ -export type ErrorType = 'General' | 'Raw' | 'Validation' | 'Unauthorized'; - -export type ErrorValidation = { [key: string]: string }; \ No newline at end of file diff --git a/src/types/paging.ts b/src/types/paging.ts deleted file mode 100644 index ee83de9..0000000 --- a/src/types/paging.ts +++ /dev/null @@ -1,8 +0,0 @@ -export interface Paging { - page: number, - limit: number, - filter: any, - with_deleted: boolean, - order_field: string, - order_direction: 'ASC' | 'DESC' -} \ No newline at end of file diff --git a/src/types/role.ts b/src/types/role.ts deleted file mode 100644 index dc822f9..0000000 --- a/src/types/role.ts +++ /dev/null @@ -1 +0,0 @@ -export type Role = 'ADMINISTRATOR' | 'HR' | 'STAFF'; \ No newline at end of file diff --git a/src/types/status.ts b/src/types/status.ts deleted file mode 100644 index 7408c75..0000000 --- a/src/types/status.ts +++ /dev/null @@ -1,4 +0,0 @@ -export enum Status { - "Active" = "Y", - "Not Active" = "N" -}; \ No newline at end of file