feat: items数据结构添加category字段
This commit is contained in:
@@ -17,6 +17,7 @@ model Item {
|
||||
id Int @id @default(autoincrement())
|
||||
name String // 名称(必填)
|
||||
source String? // 来源(可选)
|
||||
category String? // 分类(可选)
|
||||
|
||||
// 数量管理
|
||||
quantity Decimal? @db.Decimal(10, 3) // 总数量(如 1.5 kg)
|
||||
|
||||
@@ -20,6 +20,7 @@ const jsonValueSchema: z.ZodType<z.infer<typeof jsonValueSchema>> = z.lazy(() =>
|
||||
const createItemSchema = z.object({
|
||||
name: z.string().min(1, '名称不能为空'),
|
||||
source: z.string().optional().nullable(),
|
||||
category: z.string().optional().nullable(),
|
||||
|
||||
quantity: z
|
||||
.string()
|
||||
|
||||
Reference in New Issue
Block a user