Skip to content

Instantly share code, notes, and snippets.

@noahpryor
Created July 27, 2018 19:21
Show Gist options
  • Save noahpryor/9f95a77e4b1335f9daca99d9ba8ad3a6 to your computer and use it in GitHub Desktop.
Save noahpryor/9f95a77e4b1335f9daca99d9ba8ad3a6 to your computer and use it in GitHub Desktop.
prisma db schema
type Comedian @model {
id: ID! @unique
slug: String! @unique
name: String!
website: String
url: String
imageUrl: String
stubsiteId: Int @unique
ticketmasterId: String @unique
shows: [Show!]!
createdAt: DateTime! # optional system field
updatedAt: DateTime! # optional system field
}
enum VideoSource {
YOUTUBE
OTHER
}
type Video {
url: String! @unique
title: String!
source: VideoSource
comedian: Comedian!
}
enum ScraperType {
COMEDYCELLAR
STUBSITES
TICKETMASTER
}
type Show @model {
id: ID! @unique
name: String!
comedians: [Comedian!]!
description: String
startTime: DateTime!
checkoutUrl: String!
venue: Venue!
price: Float
soldOut: Boolean @default(value: "false")
stubsiteId: Int @unique
cellarId: Int @unique
ticketmasterId: String @unique
createdAt: DateTime! # optional system field
updatedAt: DateTime! # optional system field
}
type Venue @model {
id: ID! @unique
name: String!
slug: String! @unique
description: String
url: String!
stubsiteId: Int @unique
ticketmasterId: String @unique
shows: [Show!]!
lineOne: String!
lineTwo: String
zip: Int!
city: String!
state: String!
latitude: Float!
longitude: Float!
scraper: ScraperType!
createdAt: DateTime! # optional system field
updatedAt: DateTime! # optional system field
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment