File tree Expand file tree Collapse file tree 1 file changed +63
-0
lines changed Expand file tree Collapse file tree 1 file changed +63
-0
lines changed Original file line number Diff line number Diff line change 1+ // This is your Prisma schema file,
2+ // learn more about it in the docs: https://pris.ly/d/prisma-schema
3+
4+ generator client {
5+ provider = " prisma-client-js "
6+ }
7+
8+ datasource db {
9+ provider = " postgresql "
10+ url = env (" DATABASE_URL " )
11+ }
12+
13+ model User {
14+ id String @id @default (uuid () )
15+ username String @unique
16+ password String
17+ createdAt DateTime @default (now () )
18+ products Product []
19+ }
20+
21+ model Product {
22+ id String @id @default (uuid () )
23+ name String @db.VarChar (255 )
24+ belongsToId String
25+ createdAt DateTime @default (now () )
26+
27+ belongsTo User @relation (fields : [belongsToId ] , references : [id ] )
28+ update Update []
29+ }
30+
31+ enum UPDATE_STATUS {
32+ IN_PROGRESS
33+ SHIPPED
34+ DEPRECATED
35+ }
36+
37+ model Update {
38+ id String @id @default (uuid () )
39+ createdAt DateTime @default (now () )
40+ updatedAt DateTime
41+
42+ title String
43+ body String
44+ status UPDATE_STATUS @default (IN_PROGRESS )
45+ version String ?
46+ asset String ?
47+
48+ productId String
49+ product Product @relation (fields : [productId ] , references : [id ] )
50+ updatepoint UpdatePoint []
51+ }
52+
53+ model UpdatePoint {
54+ id String @id @default (uuid () )
55+ createdAt DateTime @default (now () )
56+ updatedAt DateTime
57+
58+ name String @db.VarChar (255 )
59+ description String
60+
61+ updateId String
62+ update Update @relation (fields : [updateId ] , references : [id ] )
63+ }
You can’t perform that action at this time.
0 commit comments