53 lines
895 B
TypeScript
53 lines
895 B
TypeScript
// Grouping for nav + layout
|
|
export type CategoryGroup = "lower" | "upper" | "accessories";
|
|
|
|
export type CategoryId =
|
|
| "upper"
|
|
| "completeUpper"
|
|
| "barrel"
|
|
| "gasBlock"
|
|
| "gasTube"
|
|
| "muzzleDevice"
|
|
| "suppressor"
|
|
| "handguard"
|
|
| "chargingHandle"
|
|
| "bcg"
|
|
| "buffer"
|
|
| "lower"
|
|
| "completeLower"
|
|
| "lowerParts"
|
|
| "trigger"
|
|
| "grip"
|
|
| "safety"
|
|
| "sights"
|
|
| "optic"
|
|
| "stock"
|
|
// NEW ACCESSORY CATEGORIES
|
|
| "magazine"
|
|
| "weaponLight"
|
|
| "foregrip"
|
|
| "bipod"
|
|
| "sling"
|
|
| "railAccessory"
|
|
| "tools";
|
|
|
|
export interface Category {
|
|
id: CategoryId;
|
|
name: string;
|
|
description?: string;
|
|
/** used for nav & grouping */
|
|
group?: CategoryGroup;
|
|
}
|
|
|
|
export interface Part {
|
|
id: string;
|
|
name: string;
|
|
brand: string;
|
|
categoryId: CategoryId;
|
|
price: number;
|
|
affiliateUrl?: string;
|
|
url?: string;
|
|
imageUrl?: string;
|
|
notes?: string;
|
|
}
|