forked from syntaxbullet/aurorabot
refactor: Abbreviate item rarity values from full names to single-letter codes across the application.
This commit is contained in:
@@ -59,7 +59,7 @@ export const items = pgTable('items', {
|
||||
id: serial('id').primaryKey(),
|
||||
name: varchar('name', { length: 255 }).unique().notNull(),
|
||||
description: text('description'),
|
||||
rarity: varchar('rarity', { length: 20 }).default('Common'),
|
||||
rarity: varchar('rarity', { length: 20 }).default('C'),
|
||||
|
||||
// Economy & Visuals
|
||||
type: varchar('type', { length: 50 }).notNull().default('MATERIAL'),
|
||||
|
||||
@@ -16,7 +16,7 @@ import type { ItemType } from "@shared/lib/constants";
|
||||
export interface CreateItemDTO {
|
||||
name: string;
|
||||
description?: string | null;
|
||||
rarity?: 'Common' | 'Uncommon' | 'Rare' | 'Epic' | 'Legendary';
|
||||
rarity?: 'C' | 'R' | 'SR' | 'SSR';
|
||||
type: 'MATERIAL' | 'CONSUMABLE' | 'EQUIPMENT' | 'QUEST';
|
||||
price?: bigint | null;
|
||||
iconUrl: string;
|
||||
@@ -27,7 +27,7 @@ export interface CreateItemDTO {
|
||||
export interface UpdateItemDTO {
|
||||
name?: string;
|
||||
description?: string | null;
|
||||
rarity?: 'Common' | 'Uncommon' | 'Rare' | 'Epic' | 'Legendary';
|
||||
rarity?: 'C' | 'R' | 'SR' | 'SSR';
|
||||
type?: 'MATERIAL' | 'CONSUMABLE' | 'EQUIPMENT' | 'QUEST';
|
||||
price?: bigint | null;
|
||||
iconUrl?: string;
|
||||
@@ -122,7 +122,7 @@ export const itemsService = {
|
||||
.values({
|
||||
name: data.name,
|
||||
description: data.description ?? null,
|
||||
rarity: data.rarity ?? 'Common',
|
||||
rarity: data.rarity ?? 'C',
|
||||
type: data.type,
|
||||
price: data.price ?? null,
|
||||
iconUrl: data.iconUrl,
|
||||
|
||||
Reference in New Issue
Block a user