Spaces:
Building
Building
generator client { | |
provider = "prisma-client-js" | |
output = "./generated/client" | |
} | |
datasource db { | |
provider = "postgresql" | |
url = env("DATABASE_URL") | |
} | |
model Account { | |
id String | |
user_id String | |
type String | |
provider String | |
providerAccountId String | |
refresh_token String? | |
access_token String? | |
expires_at Int? | |
token_type String? | |
scope String? | |
id_token String? | |
session_state String? | |
User User | (fields: [user_id], references: [id], onDelete: Cascade)|
@ | ([provider, providerAccountId])|
} | |
model Session { | |
id String | |
sessionToken String | |
expires DateTime | |
user_id String | |
User User | (fields: [user_id], references: [id], onDelete: Cascade)|
} | |
model User { | |
id String | |
name String? | |
email String? | |
emailVerified DateTime? | |
image String? | |
full_name String | |
password String? | |
registration_id String? | |
Account Account[] | |
Session Session[] | |
active_ticket active_ticket[] | |
chat_message chat_message[] | |
closed_ticket closed_ticket[] | |
} | |
model VerificationToken { | |
identifier String | |
token String | |
expires DateTime | |
@ | ([identifier, token])|
} | |
model active_ticket { | |
id Int | (autoincrement())|
subject String | |
category String | |
user_id String | |
opened_time DateTime (now()) | |
hostel_block String? | |
room_no String? | |
contact_no String? | |
chat_id Int | |
body String | |
chat_history chat_history | (fields: [chat_id], references: [id])|
User User | (fields: [user_id], references: [id])|
} | |
model admin { | |
id Int | (autoincrement())|
email String | |
full_name String | |
password String | |
employee_id String | |
} | |
model chat_history { | |
id Int | (autoincrement())|
active_ticket active_ticket[] | |
chat_message chat_message[] | |
closed_ticket closed_ticket[] | |
} | |
model chat_message { | |
id Int | (autoincrement())|
chat_history_id Int | |
body_text String | |
sent_time DateTime (now()) | |
user_id String? | |
complaint_manager_id Int? | |
chat_history chat_history | (fields: [chat_history_id], references: [id])|
complaint_manager complaint_manager? | (fields: [complaint_manager_id], references: [id])|
User User? | (fields: [user_id], references: [id])|
} | |
model closed_ticket { | |
id Int | (autoincrement())|
subject String | |
category String | |
user_id String | |
opened_time DateTime | |
hostel_block String? | |
room_no String? | |
contact_no String? | |
closed_time DateTime | |
chat_id Int | |
body String | |
chat_history chat_history | (fields: [chat_id], references: [id])|
User User | (fields: [user_id], references: [id])|
} | |
model complaint_manager { | |
id Int | (autoincrement())|
email String | |
full_name String | |
password String | |
employee_id String | |
chat_message chat_message[] | |
} | |