60 lines
2.3 KiB
Plaintext
60 lines
2.3 KiB
Plaintext
// 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"
|
|
previewFeatures = ["postgresqlExtensions"]
|
|
}
|
|
|
|
datasource db {
|
|
provider = "postgresql"
|
|
url = env("DATABASE_URL")
|
|
extensions = [postgis]
|
|
}
|
|
|
|
model Ad {
|
|
uuid String @id @default(uuid()) @db.Uuid
|
|
driver Boolean
|
|
passenger Boolean
|
|
frequency Int
|
|
from_date DateTime @db.Date
|
|
to_date DateTime @db.Date
|
|
mon_time DateTime @db.Timestamptz()
|
|
tue_time DateTime @db.Timestamptz()
|
|
wed_time DateTime @db.Timestamptz()
|
|
thu_time DateTime @db.Timestamptz()
|
|
fri_time DateTime @db.Timestamptz()
|
|
sat_time DateTime @db.Timestamptz()
|
|
sun_time DateTime @db.Timestamptz()
|
|
mon_margin Int
|
|
tue_margin Int
|
|
wed_margin Int
|
|
thu_margin Int
|
|
fri_margin Int
|
|
sat_margin Int
|
|
sun_margin Int
|
|
driver_duration Int
|
|
driver_distance Int
|
|
passenger_duration Int
|
|
passenger_distance Int
|
|
origin_type Int @db.SmallInt
|
|
destination_type Int @db.SmallInt
|
|
waypoints Unsupported("geography(LINESTRING)")
|
|
direction Unsupported("geography(LINESTRING)")
|
|
fwd_azimuth Int
|
|
back_azimuth Int
|
|
seats_driver Int @db.SmallInt
|
|
seats_passenger Int @db.SmallInt
|
|
seats_used Int @db.SmallInt
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @default(now()) @updatedAt
|
|
|
|
@@index([driver])
|
|
@@index([passenger])
|
|
@@index([from_date])
|
|
@@index([to_date])
|
|
@@index([fwd_azimuth])
|
|
@@index([direction], name: "direction_idx", type: Gist)
|
|
@@map("ad")
|
|
}
|