diff --git a/src/app/Products/page.tsx b/src/app/Products/page.tsx new file mode 100644 index 0000000..f7f8db1 --- /dev/null +++ b/src/app/Products/page.tsx @@ -0,0 +1,16 @@ +export default function ProductsPage() { + return ( +
+

Products

+
+
+

Sample Lower Receiver

+

Price: $199.99

+ +
+
+
+ ); + } \ No newline at end of file diff --git a/src/db/schema/Psa.ts b/src/db/schema/Psa.ts index 6cd3f98..d4ac91e 100644 --- a/src/db/schema/Psa.ts +++ b/src/db/schema/Psa.ts @@ -1,8 +1,10 @@ -import { pgTable, text, decimal, serial, integer } from 'drizzle-orm/pg-core'; +// Dont think this is need with the Drizzle schema -export const psa = pgTable('psa', { - id: integer().primaryKey().generatedAlwaysAsIdentity({ name: "brands_id_seq", startWith: 1, increment: 1, minValue: 1, maxValue: 2147483647, cache: 1 }), - category: text('category').notNull(), - department: text('department').notNull(), - saleprice: decimal('saleprice', { precision: 10, scale: 2 }).notNull(), -}); \ No newline at end of file +// import { pgTable, text, decimal, serial, integer } from 'drizzle-orm/pg-core'; + +// export const psa = pgTable('psa', { +// id: integer().primaryKey().generatedAlwaysAsIdentity({ name: "brands_id_seq", startWith: 1, increment: 1, minValue: 1, maxValue: 2147483647, cache: 1 }), +// category: text('category').notNull(), +// department: text('department').notNull(), +// saleprice: decimal('saleprice', { precision: 10, scale: 2 }).notNull(), +// }); \ No newline at end of file diff --git a/src/drizzle/schema.ts b/src/drizzle/schema.ts index 3a790fd..c3e4388 100644 --- a/src/drizzle/schema.ts +++ b/src/drizzle/schema.ts @@ -1,4 +1,4 @@ -import { pgTable, integer, varchar, timestamp, text, numeric, unique, uuid, doublePrecision } from "drizzle-orm/pg-core" +import { pgTable, integer, varchar, timestamp, text, numeric, unique, foreignKey, doublePrecision, real, bigint } from "drizzle-orm/pg-core" import { sql } from "drizzle-orm" @@ -99,15 +99,14 @@ export const builds = pgTable("builds", { updatedAt: timestamp("updated_at", { mode: 'string' }).defaultNow().notNull(), createdAt: timestamp("created_at", { mode: 'string' }).defaultNow().notNull(), deletedAt: timestamp("deleted_at", { mode: 'string' }), -}); - -export const compartment = pgTable("compartment", { - id: uuid().defaultRandom().primaryKey().notNull(), - name: varchar({ length: 100 }).notNull(), - description: varchar({ length: 300 }), - updatedAt: timestamp("updated_at", { mode: 'string' }).defaultNow().notNull(), - createdAt: timestamp("created_at", { mode: 'string' }).defaultNow().notNull(), - deletedAt: timestamp("deleted_at", { mode: 'string' }), +}, (table) => { + return { + buildsBalAccountsFk: foreignKey({ + columns: [table.accountId], + foreignColumns: [balAccounts.id], + name: "builds_bal_accounts_fk" + }), + } }); export const lipseycatalog = pgTable("lipseycatalog", { @@ -203,3 +202,35 @@ export const balResellers = pgTable("bal_resellers", { createdAt: timestamp("created_at", { mode: 'string' }).defaultNow().notNull(), deletedAt: timestamp("deleted_at", { mode: 'string' }), }); + +export const psa = pgTable("psa", { + sku: varchar({ length: 255 }), + manufacturerId: varchar("Manufacturer_Id", { length: 255 }), + brandName: varchar("Brand_Name", { length: 255 }), + productName: varchar("Product_Name", { length: 256 }), + longDescription: text("Long_Description"), + shortDescription: varchar("Short_Description", { length: 255 }), + department: varchar({ length: 255 }), + category: varchar({ length: 255 }), + subcategory: varchar({ length: 255 }), + thumbUrl: varchar("Thumb_URL", { length: 255 }), + imageUrl: varchar("Image_URL", { length: 255 }), + buyLink: varchar("Buy_Link", { length: 255 }), + keywords: varchar({ length: 255 }), + reviews: varchar({ length: 255 }), + retailPrice: real("Retail_Price"), + salePrice: real("Sale_Price"), + brandPageLink: varchar("Brand_Page_Link", { length: 255 }), + brandLogoImage: varchar("Brand_Logo_Image", { length: 255 }), + productPageViewTracking: varchar("Product_Page_View_Tracking", { length: 256 }), + parentGroupId: varchar("Parent_Group_ID", { length: 255 }), + fineline: varchar({ length: 255 }), + superfineline: varchar({ length: 255 }), + modelnumber: varchar({ length: 255 }), + caliber: varchar({ length: 255 }), + // You can use { mode: "bigint" } if numbers are exceeding js number limitations + upc: bigint({ mode: "number" }), + mediumImageUrl: varchar("Medium_Image_URL", { length: 255 }), + googleCategorization: varchar("Google_Categorization", { length: 255 }), + itemBasedCommission: varchar("Item_Based_Commission", { length: 255 }), +}); \ No newline at end of file diff --git a/src/pages/products.js b/src/pages/products-old.js similarity index 100% rename from src/pages/products.js rename to src/pages/products-old.js