From bfcd04ed043ed4172c43cb2a7137727ca08394b8 Mon Sep 17 00:00:00 2001 From: Angelo Reale <12191809+angeloreale@users.noreply.github.com> Date: Tue, 7 Jan 2025 16:02:26 +0100 Subject: [PATCH] ar(fix) [DPCP-NAN]: schemas FY --- prisma/public/prisma/schema/_make.prisma | 90 ++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 prisma/public/prisma/schema/_make.prisma diff --git a/prisma/public/prisma/schema/_make.prisma b/prisma/public/prisma/schema/_make.prisma new file mode 100644 index 00000000..aa72bcba --- /dev/null +++ b/prisma/public/prisma/schema/_make.prisma @@ -0,0 +1,90 @@ +// to-do: schema-make.prisma +// ---- @PUBLIC Make: marketplace ---- +// +// Public Listings +// Geography or ambients +model PublicMakeSpaces { + id String @id @default(auto()) @map("_id") @db.ObjectId + name ILocaleString + slug String + description ILocaleString + + title ILocaleString + body ILocaleString + + loggedOn DateTime @db.Date + loggedFor DateTime[] @db.Date + publishedOn DateTime @db.Date + + userOwner User? @relation("actionUserOwner", fields: [userOwnerId], references: [id]) + userOwnerId String? @db.ObjectId + + communityOwner Communities? @relation("actionCommunityOwner", fields: [communityOwnerId], references: [id]) + communityOwnerId String? @db.ObjectId + + userCreator User? @relation("actionUserCreator", fields: [userCreatorId], references: [id]) + userCreatorId String? @db.ObjectId + + communityCreator Communities? @relation("actionCommunityCreator", fields: [communityCreatorId], references: [id]) + communityCreatorId String? @db.ObjectId + + @@map("makeSpaces") +} + +// Groceries or shopping lists +model PublicMakeProcurements { + id String @id @default(auto()) @map("_id") @db.ObjectId + name ILocaleString + slug String + description ILocaleString + + title ILocaleString + body ILocaleString + + loggedOn DateTime @db.Date + loggedFor DateTime[] @db.Date + publishedOn DateTime @db.Date + + userOwner User? @relation("actionUserOwner", fields: [userOwnerId], references: [id]) + userOwnerId String? @db.ObjectId + + communityOwner Communities? @relation("actionCommunityOwner", fields: [communityOwnerId], references: [id]) + communityOwnerId String? @db.ObjectId + + userCreator User? @relation("actionUserCreator", fields: [userCreatorId], references: [id]) + userCreatorId String? @db.ObjectId + + communityCreator Communities? @relation("actionCommunityCreator", fields: [communityCreatorId], references: [id]) + communityCreatorId String? @db.ObjectId + + @@map("makeProcurements") +} + +// Listings +model PublicMakeListings { + id String @id @default(auto()) @map("_id") @db.ObjectId + name ILocaleString + slug String + description ILocaleString + + title ILocaleString + body ILocaleString + + loggedOn DateTime @db.Date + loggedFor DateTime[] @db.Date + publishedOn DateTime @db.Date + + userOwner User? @relation("actionUserOwner", fields: [userOwnerId], references: [id]) + userOwnerId String? @db.ObjectId + + communityOwner Communities? @relation("actionCommunityOwner", fields: [communityOwnerId], references: [id]) + communityOwnerId String? @db.ObjectId + + userCreator User? @relation("actionUserCreator", fields: [userCreatorId], references: [id]) + userCreatorId String? @db.ObjectId + + communityCreator Communities? @relation("actionCommunityCreator", fields: [communityCreatorId], references: [id]) + communityCreatorId String? @db.ObjectId + + @@map("makeListings") +} \ No newline at end of file