// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema

// Looking for ways to speed up your queries, or scale easily with your serverless or edge functions?
// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init

generator client {
  provider = "prisma-client"
  output   = "../src/generated/prisma"
}

datasource db {
  provider = "mysql"
}

model LogtoUserFav {
  logto_uid String
  kaiqiu_uid String
  @@id([logto_uid, kaiqiu_uid])
}

model EventSubs {
  logto_uid String
  event_id String
  @@id([logto_uid, event_id])
}

model UserBind {
  logto_uid String @unique
  kaiqiu_uid String
}

model UserLocation {
  id Int @id @default(autoincrement())
  kaiqiu_uid String?
  logto_uid String
  name String
  avatar String? @db.Text
  coords Unsupported("point")

  @@index([coords])
  @@unique([logto_uid, name])
}

model NotificationToken {
  logto_uid String
  token String
  @@unique([logto_uid, token])
}