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