mirror of
https://github.com/ahmadk953/tasko.git
synced 2025-05-04 04:33:10 +00:00
Initial Commit
This commit is contained in:
commit
f3e2f01bd7
150 changed files with 13612 additions and 0 deletions
103
prisma/schema.prisma
Normal file
103
prisma/schema.prisma
Normal file
|
@ -0,0 +1,103 @@
|
|||
generator client {
|
||||
provider = "prisma-client-js"
|
||||
}
|
||||
|
||||
datasource db {
|
||||
provider = "postgresql"
|
||||
url = env("DATABASE_URL")
|
||||
directUrl = env("DATABASE_DIRECT_URL")
|
||||
relationMode = "prisma"
|
||||
}
|
||||
|
||||
model Board {
|
||||
id String @id @default(uuid())
|
||||
orgId String
|
||||
title String
|
||||
imageId String
|
||||
imageThumbUrl String @db.Text
|
||||
imageFullUrl String @db.Text
|
||||
imageUserName String @db.Text
|
||||
imageLinkHTML String @db.Text
|
||||
|
||||
lists List[]
|
||||
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
}
|
||||
|
||||
model List {
|
||||
id String @id @default(uuid())
|
||||
title String
|
||||
order Int
|
||||
|
||||
boardId String
|
||||
board Board @relation(fields: [boardId], references: [id], onDelete: Cascade)
|
||||
|
||||
cards Card[]
|
||||
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
@@index([boardId])
|
||||
}
|
||||
|
||||
model Card {
|
||||
id String @id @default(uuid())
|
||||
title String
|
||||
order Int
|
||||
description String? @db.Text
|
||||
|
||||
listId String
|
||||
list List @relation(fields: [listId], references: [id], onDelete: Cascade)
|
||||
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
@@index([listId])
|
||||
}
|
||||
|
||||
enum ACTION {
|
||||
CREATE
|
||||
UPDATE
|
||||
DELETE
|
||||
}
|
||||
|
||||
enum ENTITY_TYPE {
|
||||
BOARD
|
||||
LIST
|
||||
CARD
|
||||
}
|
||||
|
||||
model AuditLog {
|
||||
id String @id @default(uuid())
|
||||
orgId String
|
||||
action ACTION
|
||||
entityId String
|
||||
entityType ENTITY_TYPE
|
||||
entityTitle String
|
||||
userId String
|
||||
userImage String @db.Text
|
||||
userName String @db.Text
|
||||
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
}
|
||||
|
||||
model OrgLimit {
|
||||
id String @id @default(uuid())
|
||||
orgId String @unique
|
||||
count Int @default(0)
|
||||
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
}
|
||||
|
||||
model OrgSubscription {
|
||||
id String @id @default(uuid())
|
||||
orgId String @unique
|
||||
|
||||
stripeCustomerId String? @unique @map(name: "stripe_customer_id")
|
||||
stripeSubscriptionId String? @unique @map(name: "stripe_subscription_id")
|
||||
stripePriceId String? @map(name: "stripe_price_id")
|
||||
stripeCurrentPeriodEnd DateTime? @map(name: "stripe_current_period_end")
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue