mirror of
https://gitea.gofwd.group/dstrawsb/ballistic-builder.git
synced 2025-12-05 18:26:45 -05:00
fixed products/lower page
This commit is contained in:
16
src/app/Products/page.tsx
Normal file
16
src/app/Products/page.tsx
Normal 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>
|
||||
);
|
||||
}
|
||||
@@ -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(),
|
||||
});
|
||||
// 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(),
|
||||
// });
|
||||
@@ -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 }),
|
||||
});
|
||||
Reference in New Issue
Block a user