generator client {
  provider = "prisma-client-js"
}

datasource db {
  provider = "postgresql"
  url      = env("DATABASE_URL")
}

model Post {
  id        Int      @id @default(autoincrement())
  createdAt DateTime @default(now())
  updatedAt DateTime
  title     String?
  content   String?
  published Boolean  @default(false)
  authorId  Int
  User      User     @relation(fields: [authorId], references: [id])

  @@index([id])
}

model Profile {
  id     Int     @id @default(autoincrement())
  bio    String?
  userId Int     @unique
  User   User    @relation(fields: [userId], references: [id])

  @@index([id])
}

model User {
  id      Int      @id @default(autoincrement())
  email   String   @unique
  name    String?
  Post    Post[]
  Profile Profile?

  @@index([id])
}

model lipseycatalog {
  id                           Int       @id @default(autoincrement())
  itemno                       String    @db.VarChar(20)
  description1                 String?
  description2                 String?
  upc                          String?   @db.VarChar(20)
  manufacturermodelno          String?   @db.VarChar(30)
  msrp                         Float?
  model                        String?
  calibergauge                 String?
  manufacturer                 String?
  type                         String?
  action                       String?
  barrellength                 String?
  capacity                     String?
  finish                       String?
  overalllength                String?
  receiver                     String?
  safety                       String?
  sights                       String?
  stockframegrips              String?
  magazine                     String?
  weight                       String?
  imagename                    String?
  chamber                      String?
  drilledandtapped             String?
  rateoftwist                  String?
  itemtype                     String?
  additionalfeature1           String?
  additionalfeature2           String?
  additionalfeature3           String?
  shippingweight               String?
  boundbookmanufacturer        String?
  boundbookmodel               String?
  boundbooktype                String?
  nfathreadpattern             String?
  nfaattachmentmethod          String?
  nfabaffletype                String?
  silencercanbedisassembled    String?
  silencerconstructionmaterial String?
  nfadbreduction               String?
  silenceroutsidediameter      String?
  nfaform3caliber              String?
  opticmagnification           String?
  maintubesize                 String?
  adjustableobjective          String?
  objectivesize                String?
  opticadjustments             String?
  illuminatedreticle           String?
  reticle                      String?
  exclusive                    String?
  quantity                     String?   @db.VarChar(10)
  allocated                    String?
  onsale                       String?
  price                        Float?
  currentprice                 Float?
  retailmap                    Float?
  fflrequired                  String?
  sotrequired                  String?
  exclusivetype                String?
  scopecoverincluded           String?
  special                      String?
  sightstype                   String?
  case                         String?
  choke                        String?
  dbreduction                  String?
  family                       String?
  finishtype                   String?
  frame                        String?
  griptype                     String?   @db.VarChar(30)
  handgunslidematerial         String?
  countryoforigin              String?   @db.VarChar(4)
  itemlength                   String?
  itemwidth                    String?
  itemheight                   String?
  packagelength                Float?
  packagewidth                 Float?
  packageheight                Float?
  itemgroup                    String?   @db.VarChar(40)
  createdon                    DateTime? @db.Timestamp(6)
}
