fixed products/lower page

This commit is contained in:
2024-12-11 14:07:54 -05:00
parent 80c23f1518
commit 925cf2ca75
4 changed files with 66 additions and 17 deletions

16
src/app/Products/page.tsx Normal file
View File

@@ -0,0 +1,16 @@
export default function ProductsPage() {
return (
<div className="container mx-auto p-4">
<h1 className="text-2xl font-bold mb-4">Products</h1>
<div className="grid gap-4">
<div className="p-4 border rounded shadow">
<h2 className="font-semibold">Sample Lower Receiver</h2>
<p>Price: $199.99</p>
<button className="mt-2 px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600">
Buy Now
</button>
</div>
</div>
</div>
);
}

View File

@@ -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', { // import { pgTable, text, decimal, serial, integer } from 'drizzle-orm/pg-core';
id: integer().primaryKey().generatedAlwaysAsIdentity({ name: "brands_id_seq", startWith: 1, increment: 1, minValue: 1, maxValue: 2147483647, cache: 1 }),
category: text('category').notNull(), // export const psa = pgTable('psa', {
department: text('department').notNull(), // id: integer().primaryKey().generatedAlwaysAsIdentity({ name: "brands_id_seq", startWith: 1, increment: 1, minValue: 1, maxValue: 2147483647, cache: 1 }),
saleprice: decimal('saleprice', { precision: 10, scale: 2 }).notNull(), // category: text('category').notNull(),
}); // department: text('department').notNull(),
// saleprice: decimal('saleprice', { precision: 10, scale: 2 }).notNull(),
// });

View File

@@ -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" import { sql } from "drizzle-orm"
@@ -99,15 +99,14 @@ export const builds = pgTable("builds", {
updatedAt: timestamp("updated_at", { mode: 'string' }).defaultNow().notNull(), updatedAt: timestamp("updated_at", { mode: 'string' }).defaultNow().notNull(),
createdAt: timestamp("created_at", { mode: 'string' }).defaultNow().notNull(), createdAt: timestamp("created_at", { mode: 'string' }).defaultNow().notNull(),
deletedAt: timestamp("deleted_at", { mode: 'string' }), deletedAt: timestamp("deleted_at", { mode: 'string' }),
}); }, (table) => {
return {
export const compartment = pgTable("compartment", { buildsBalAccountsFk: foreignKey({
id: uuid().defaultRandom().primaryKey().notNull(), columns: [table.accountId],
name: varchar({ length: 100 }).notNull(), foreignColumns: [balAccounts.id],
description: varchar({ length: 300 }), name: "builds_bal_accounts_fk"
updatedAt: timestamp("updated_at", { mode: 'string' }).defaultNow().notNull(), }),
createdAt: timestamp("created_at", { mode: 'string' }).defaultNow().notNull(), }
deletedAt: timestamp("deleted_at", { mode: 'string' }),
}); });
export const lipseycatalog = pgTable("lipseycatalog", { export const lipseycatalog = pgTable("lipseycatalog", {
@@ -203,3 +202,35 @@ export const balResellers = pgTable("bal_resellers", {
createdAt: timestamp("created_at", { mode: 'string' }).defaultNow().notNull(), createdAt: timestamp("created_at", { mode: 'string' }).defaultNow().notNull(),
deletedAt: timestamp("deleted_at", { mode: 'string' }), 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 }),
});