fix: lỗi các thành viên không thể upload ảnh và không có nút xóa ảnh của user

This commit is contained in:
2026-06-16 18:54:24 +07:00
parent 88b2182789
commit 00554224a1
8 changed files with 318 additions and 34 deletions
+3 -3
View File
@@ -180,16 +180,16 @@ model Expense {
model Photo {
id String @id @default(uuid())
tourId String
tourId String?
locationId String?
uploaderId String
imageUrl String
imageUrl String?
originalUrl String?
capturedAt DateTime @default(now())
metadata Json?
privacy PrivacyLevel @default(TOUR_ONLY)
tour Tour @relation(fields: [tourId], references: [id], onDelete: Cascade)
tour Tour? @relation(fields: [tourId], references: [id], onDelete: SetNull)
location Location? @relation(fields: [locationId], references: [id], onDelete: SetNull)
uploader User @relation(fields: [uploaderId], references: [id])
}