feat: add type for create and update endpoint
This commit is contained in:
parent
9938dba0e1
commit
95463dfe7c
1 changed files with 40 additions and 1 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { Prisma } from "@prisma/client";
|
||||
import { Prisma, Status } from "@prisma/client";
|
||||
import {
|
||||
Body,
|
||||
Controller,
|
||||
|
|
@ -18,6 +18,45 @@ import prisma from "../../db";
|
|||
import HttpError from "../../interfaces/http-error";
|
||||
import HttpStatus from "../../interfaces/http-status";
|
||||
import { RequestWithUser } from "../../interfaces/user";
|
||||
|
||||
type BranchCreate = {
|
||||
code: string;
|
||||
taxNo: string;
|
||||
nameEN: string;
|
||||
nameTH: string;
|
||||
addressEN: string;
|
||||
addressTH: string;
|
||||
zipCode: string;
|
||||
email: string;
|
||||
telephoneNo: string;
|
||||
longitude: string;
|
||||
latitude: string;
|
||||
|
||||
subDistrictId?: string | null;
|
||||
districtId?: string | null;
|
||||
provinceId?: string | null;
|
||||
headOfficeId?: string | null;
|
||||
};
|
||||
|
||||
type BranchUpdate = {
|
||||
code?: string;
|
||||
taxNo?: string;
|
||||
nameEN?: string;
|
||||
nameTH?: string;
|
||||
addressEN?: string;
|
||||
addressTH?: string;
|
||||
zipCode?: string;
|
||||
email?: string;
|
||||
telephoneNo?: string;
|
||||
longitude?: string;
|
||||
latitude?: string;
|
||||
|
||||
subDistrictId?: string | null;
|
||||
districtId?: string | null;
|
||||
provinceId?: string | null;
|
||||
headOfficeId?: string | null;
|
||||
};
|
||||
|
||||
@Route("api/branch")
|
||||
@Tags("Branch")
|
||||
@Security("keycloak")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue