matcher/prisma/schema.prisma

66 lines
2.3 KiB
Plaintext
Raw Normal View History

2023-04-06 09:12:49 +00:00
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema
generator client {
provider = "prisma-client-js"
2023-05-23 12:00:39 +00:00
binaryTargets = ["linux-musl", "debian-openssl-3.0.x"]
2023-04-06 09:12:49 +00:00
previewFeatures = ["postgresqlExtensions"]
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
extensions = [postgis]
}
model Ad {
2023-05-11 15:47:55 +00:00
uuid String @id @db.Uuid
userUuid String @db.Uuid
driver Boolean
passenger Boolean
2023-05-11 15:47:55 +00:00
frequency Frequency
fromDate DateTime @db.Date
toDate DateTime @db.Date
2023-05-11 15:47:55 +00:00
monTime DateTime? @db.Timestamptz()
tueTime DateTime? @db.Timestamptz()
wedTime DateTime? @db.Timestamptz()
thuTime DateTime? @db.Timestamptz()
friTime DateTime? @db.Timestamptz()
satTime DateTime? @db.Timestamptz()
sunTime DateTime? @db.Timestamptz()
monMargin Int
tueMargin Int
wedMargin Int
thuMargin Int
friMargin Int
satMargin Int
sunMargin Int
2023-05-11 15:47:55 +00:00
driverDuration Int?
driverDistance Int?
passengerDuration Int?
passengerDistance Int?
waypoints Unsupported("geography(LINESTRING)")?
direction Unsupported("geography(LINESTRING)")?
fwdAzimuth Int
backAzimuth Int
seatsDriver Int @db.SmallInt
seatsPassenger Int @db.SmallInt
seatsUsed Int @db.SmallInt
2023-05-11 15:47:55 +00:00
strict Boolean
createdAt DateTime @default(now())
updatedAt DateTime @default(now()) @updatedAt
2023-04-06 09:12:49 +00:00
@@index([driver])
@@index([passenger])
@@index([fromDate])
@@index([toDate])
@@index([fwdAzimuth])
2023-04-06 09:12:49 +00:00
@@index([direction], name: "direction_idx", type: Gist)
@@map("ad")
}
2023-05-11 15:47:55 +00:00
enum Frequency {
PUNCTUAL
RECURRENT
}