Ringtone app
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

42 lines
987 B

  1. generator client {
  2. provider = "prisma-client-js"
  3. }
  4. datasource db {
  5. provider = "sqlite"
  6. url = env("DATABASE_URL")
  7. }
  8. model Ringtone {
  9. id Bytes @id
  10. name String
  11. composerUserId Bytes @map("composer_user_id")
  12. tempo Int @default(120)
  13. data String @default("")
  14. createdAt DateTime @default(now()) @map("created_at")
  15. updatedAt DateTime @default(now()) @map("updated_at")
  16. deletedAt DateTime? @map("deleted_at")
  17. composer User @relation(fields: [composerUserId], references: [id])
  18. @@map("ringtone")
  19. }
  20. model User {
  21. id Bytes @id
  22. username String @unique
  23. password String
  24. ringtone Ringtone[]
  25. userProfile UserProfile?
  26. @@map("user")
  27. }
  28. model UserProfile {
  29. userId Bytes @id @map("user_id")
  30. bio String? @default("")
  31. email String? @default("")
  32. user User @relation(fields: [userId], references: [id])
  33. @@map("user_profile")
  34. }