2024-11-18 23:48:33 -05:00
|
|
|
import { pgTable, integer, varchar, text, doublePrecision, timestamp } from "drizzle-orm/pg-core"
|
|
|
|
|
import { sql } from "drizzle-orm"
|
2024-11-20 09:02:38 -05:00
|
|
|
import { timestamps } from "./helpers/columns.helpers";
|
2024-11-18 23:48:33 -05:00
|
|
|
|
|
|
|
|
|
2024-11-19 21:15:15 -05:00
|
|
|
export const LipseyCatalog = pgTable("lipseycatalog", {
|
2024-11-18 23:48:33 -05:00
|
|
|
id: integer().primaryKey().generatedAlwaysAsIdentity({ name: "lipseycatalog_id_seq", startWith: 1, increment: 1, minValue: 1, maxValue: 2147483647, cache: 1 }),
|
|
|
|
|
itemno: varchar({ length: 20 }).notNull(),
|
|
|
|
|
description1: text(),
|
|
|
|
|
description2: text(),
|
|
|
|
|
upc: varchar({ length: 20 }),
|
|
|
|
|
manufacturermodelno: varchar({ length: 30 }),
|
|
|
|
|
msrp: doublePrecision(),
|
|
|
|
|
model: text(),
|
|
|
|
|
calibergauge: text(),
|
|
|
|
|
manufacturer: text(),
|
|
|
|
|
type: text(),
|
|
|
|
|
action: text(),
|
|
|
|
|
barrellength: text(),
|
|
|
|
|
capacity: text(),
|
|
|
|
|
finish: text(),
|
|
|
|
|
overalllength: text(),
|
|
|
|
|
receiver: text(),
|
|
|
|
|
safety: text(),
|
|
|
|
|
sights: text(),
|
|
|
|
|
stockframegrips: text(),
|
|
|
|
|
magazine: text(),
|
|
|
|
|
weight: text(),
|
|
|
|
|
imagename: text(),
|
|
|
|
|
chamber: text(),
|
|
|
|
|
drilledandtapped: text(),
|
|
|
|
|
rateoftwist: text(),
|
|
|
|
|
itemtype: text(),
|
|
|
|
|
additionalfeature1: text(),
|
|
|
|
|
additionalfeature2: text(),
|
|
|
|
|
additionalfeature3: text(),
|
|
|
|
|
shippingweight: text(),
|
|
|
|
|
boundbookmanufacturer: text(),
|
|
|
|
|
boundbookmodel: text(),
|
|
|
|
|
boundbooktype: text(),
|
|
|
|
|
nfathreadpattern: text(),
|
|
|
|
|
nfaattachmentmethod: text(),
|
|
|
|
|
nfabaffletype: text(),
|
|
|
|
|
silencercanbedisassembled: text(),
|
|
|
|
|
silencerconstructionmaterial: text(),
|
|
|
|
|
nfadbreduction: text(),
|
|
|
|
|
silenceroutsidediameter: text(),
|
|
|
|
|
nfaform3Caliber: text(),
|
|
|
|
|
opticmagnification: text(),
|
|
|
|
|
maintubesize: text(),
|
|
|
|
|
adjustableobjective: text(),
|
|
|
|
|
objectivesize: text(),
|
|
|
|
|
opticadjustments: text(),
|
|
|
|
|
illuminatedreticle: text(),
|
|
|
|
|
reticle: text(),
|
|
|
|
|
exclusive: text(),
|
|
|
|
|
quantity: varchar({ length: 10 }).default(sql`NULL`),
|
|
|
|
|
allocated: text(),
|
|
|
|
|
onsale: text(),
|
|
|
|
|
price: doublePrecision(),
|
|
|
|
|
currentprice: doublePrecision(),
|
|
|
|
|
retailmap: doublePrecision(),
|
|
|
|
|
fflrequired: text(),
|
|
|
|
|
sotrequired: text(),
|
|
|
|
|
exclusivetype: text(),
|
|
|
|
|
scopecoverincluded: text(),
|
|
|
|
|
special: text(),
|
|
|
|
|
sightstype: text(),
|
|
|
|
|
case: text(),
|
|
|
|
|
choke: text(),
|
|
|
|
|
dbreduction: text(),
|
|
|
|
|
family: text(),
|
|
|
|
|
finishtype: text(),
|
|
|
|
|
frame: text(),
|
|
|
|
|
griptype: varchar({ length: 30 }),
|
|
|
|
|
handgunslidematerial: text(),
|
|
|
|
|
countryoforigin: varchar({ length: 4 }),
|
|
|
|
|
itemlength: text(),
|
|
|
|
|
itemwidth: text(),
|
|
|
|
|
itemheight: text(),
|
|
|
|
|
packagelength: doublePrecision(),
|
|
|
|
|
packagewidth: doublePrecision(),
|
|
|
|
|
packageheight: doublePrecision(),
|
|
|
|
|
itemgroup: varchar({ length: 40 }),
|
|
|
|
|
...timestamps
|
|
|
|
|
});
|
|
|
|
|
|
2024-11-19 15:21:30 -05:00
|
|
|
|