feat(umkm): migrate KategoriProduk to KategoriProdukUmkm for UMKM isolation
- update prisma schema to use KategoriProdukUmkm for Umkm model - add @@map to KategoriProdukUmkm for lowercase table naming - update API endpoints and KPI dashboard to use new model - bump version to 0.1.33
This commit is contained in:
@@ -1459,7 +1459,6 @@ model KategoriProduk {
|
||||
isActive Boolean @default(true)
|
||||
KategoriToPasar KategoriToPasar[]
|
||||
PasarDesa PasarDesa[]
|
||||
Umkm Umkm[]
|
||||
}
|
||||
|
||||
model KategoriToPasar {
|
||||
@@ -2424,23 +2423,34 @@ model MusikDesa {
|
||||
}
|
||||
|
||||
model Umkm {
|
||||
id String @id @default(cuid())
|
||||
id String @id @default(cuid())
|
||||
nama String
|
||||
pemilik String
|
||||
deskripsi String?
|
||||
alamat String?
|
||||
kontak String?
|
||||
image FileStorage? @relation("UmkmImage", fields: [imageId], references: [id])
|
||||
image FileStorage? @relation("UmkmImage", fields: [imageId], references: [id])
|
||||
imageId String?
|
||||
kategori KategoriProduk @relation(fields: [kategoriId], references: [id])
|
||||
kategori KategoriProdukUmkm @relation(fields: [kategoriId], references: [id])
|
||||
kategoriId String
|
||||
isActive Boolean @default(true)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
isActive Boolean @default(true)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
deletedAt DateTime?
|
||||
produk PasarDesa[]
|
||||
}
|
||||
|
||||
model KategoriProdukUmkm {
|
||||
id String @id @default(cuid())
|
||||
nama String
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
deletedAt DateTime?
|
||||
isActive Boolean @default(true)
|
||||
Umkm Umkm[]
|
||||
}
|
||||
|
||||
|
||||
model PenjualanProduk {
|
||||
id String @id @default(cuid())
|
||||
produk PasarDesa @relation(fields: [produkId], references: [id])
|
||||
|
||||
Reference in New Issue
Block a user