refactor: customer db
This commit is contained in:
parent
808bec7fc8
commit
b804fafc42
2 changed files with 21 additions and 3 deletions
|
|
@ -0,0 +1,14 @@
|
|||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the column `imageUrl` on the `Customer` table. All the data in the column will be lost.
|
||||
- Changed the type of `customerType` on the `Customer` table. No cast exists, the column would be dropped and recreated, which cannot be done if there is data, since the column is required.
|
||||
|
||||
*/
|
||||
-- CreateEnum
|
||||
CREATE TYPE "CustomerType" AS ENUM ('CORP', 'PERS');
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "Customer" DROP COLUMN "imageUrl",
|
||||
DROP COLUMN "customerType",
|
||||
ADD COLUMN "customerType" "CustomerType" NOT NULL;
|
||||
|
|
@ -208,13 +208,17 @@ model User {
|
|||
branch BranchUser[]
|
||||
}
|
||||
|
||||
enum CustomerType {
|
||||
CORP
|
||||
PERS
|
||||
}
|
||||
|
||||
model Customer {
|
||||
id String @id @default(uuid())
|
||||
id String @id @default(uuid())
|
||||
code String
|
||||
customerType String
|
||||
customerType CustomerType
|
||||
customerName String
|
||||
customerNameEN String
|
||||
imageUrl String?
|
||||
|
||||
status Status @default(CREATED)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue