feat(consumable): 소모품 마스터에 "규격(spec)" 필드 추가

품목의 규격 정보(예: 4" 용접, M16)를 분리 저장할 수 있도록 spec 컬럼 추가.
DB ALTER 필요: ALTER TABLE consumable_items ADD COLUMN spec VARCHAR(200) DEFAULT NULL AFTER item_name;

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Hyungi Ahn
2026-03-16 13:34:43 +09:00
parent cc47d25851
commit 0a05bd8d76
10 changed files with 40 additions and 23 deletions

View File

@@ -6,7 +6,7 @@ const PurchaseRequestModel = {
async getAll(filters = {}) {
const db = await getDb();
let sql = `
SELECT pr.*, ci.item_name, ci.maker, ci.category, ci.base_price, ci.unit,
SELECT pr.*, ci.item_name, ci.spec, ci.maker, ci.category, ci.base_price, ci.unit,
ci.photo_path AS ci_photo_path, pr.photo_path AS pr_photo_path,
pr.custom_item_name, pr.custom_category,
su.name AS requester_name
@@ -35,7 +35,7 @@ const PurchaseRequestModel = {
async getById(requestId) {
const db = await getDb();
const [rows] = await db.query(`
SELECT pr.*, ci.item_name, ci.maker, ci.category, ci.base_price, ci.unit,
SELECT pr.*, ci.item_name, ci.spec, ci.maker, ci.category, ci.base_price, ci.unit,
ci.photo_path AS ci_photo_path, pr.photo_path AS pr_photo_path,
pr.custom_item_name, pr.custom_category,
su.name AS requester_name