feat: add fields
This commit is contained in:
parent
1f54d5d1df
commit
077edee039
3 changed files with 15 additions and 0 deletions
9
prisma/migrations/20240617105818_add_field/migration.sql
Normal file
9
prisma/migrations/20240617105818_add_field/migration.sql
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
Warnings:
|
||||
|
||||
- Added the required column `personName` to the `Customer` table without a default value. This is not possible if the table is not empty.
|
||||
|
||||
*/
|
||||
-- AlterTable
|
||||
ALTER TABLE "Customer" ADD COLUMN "personName" TEXT NOT NULL,
|
||||
ADD COLUMN "personNameEN" TEXT;
|
||||
|
|
@ -332,6 +332,8 @@ enum CustomerType {
|
|||
model Customer {
|
||||
id String @id @default(uuid())
|
||||
code String
|
||||
personName String
|
||||
personNameEN String?
|
||||
customerType CustomerType
|
||||
customerName String
|
||||
customerNameEN String
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@ const MINIO_BUCKET = process.env.MINIO_BUCKET;
|
|||
|
||||
export type CustomerCreate = {
|
||||
status?: Status;
|
||||
personName: string;
|
||||
personNameEN?: string;
|
||||
customerType: CustomerType;
|
||||
customerName: string;
|
||||
customerNameEN: string;
|
||||
|
|
@ -67,6 +69,8 @@ export type CustomerCreate = {
|
|||
|
||||
export type CustomerUpdate = {
|
||||
status?: "ACTIVE" | "INACTIVE";
|
||||
personName: string;
|
||||
personNameEN?: string;
|
||||
customerType?: CustomerType;
|
||||
customerName?: string;
|
||||
customerNameEN?: string;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue