-- 玉宗 - 珠宝设计大师 数据库初始化脚本
-- 使用前请先创建数据库: CREATE DATABASE yuzong CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
-- 导入命令: mysql --default-character-set=utf8mb4 -u root -p yuzong < init_data.sql
-- 注意: designs 表包含 6 个可选设计参数字段:
--   carving_technique(雕刻工艺), design_style(设计风格), motif(题材纹样),
--   size_spec(尺寸规格), surface_finish(表面处理), usage_scene(用途场景)

SET NAMES utf8mb4;

-- ========================================
-- 品类数据 (12个品类)
-- ========================================
INSERT INTO categories (id, name, icon, sort_order, flow_type) VALUES
(1, '牌子', NULL, 1, 'full'),
(2, '珠子', NULL, 2, 'size_color'),
(3, '手把件', NULL, 3, 'full'),
(4, '雕刻件', NULL, 4, 'full'),
(5, '摆件', NULL, 5, 'full'),
(6, '手镯', NULL, 6, 'full'),
(7, '耳钉', NULL, 7, 'full'),
(8, '耳饰', NULL, 8, 'full'),
(9, '手链', NULL, 9, 'size_color'),
(10, '项链', NULL, 10, 'full'),
(11, '戒指', NULL, 11, 'full'),
(12, '表带', NULL, 12, 'size_color');

-- ========================================
-- 牌子的子类型 (category_id=1) - 牌型
-- ========================================
INSERT INTO sub_types (category_id, name, description, preview_image, sort_order) VALUES
(1, '二五牌', NULL, NULL, 1),
(1, '三角牌', NULL, NULL, 2),
(1, '三五牌', NULL, NULL, 3),
(1, '四六牌', NULL, NULL, 4),
(1, '正方形', NULL, NULL, 5),
(1, '椭圆形', NULL, NULL, 6);

-- ========================================
-- 珠子的子类型 (category_id=2) - 尺寸
-- ========================================
INSERT INTO sub_types (category_id, name, description, preview_image, sort_order) VALUES
(2, '4mm', NULL, NULL, 1),
(2, '6mm', NULL, NULL, 2),
(2, '8mm', NULL, NULL, 3),
(2, '10mm', NULL, NULL, 4),
(2, '12mm', NULL, NULL, 5),
(2, '14mm', NULL, NULL, 6),
(2, '16mm', NULL, NULL, 7),
(2, '18mm', NULL, NULL, 8),
(2, '20mm', NULL, NULL, 9);

-- ========================================
-- 手把件的子类型 (category_id=3) - 题材
-- ========================================
INSERT INTO sub_types (category_id, name, description, preview_image, sort_order) VALUES
(3, '山水手把件', '山水意境题材', NULL, 1),
(3, '动物手把件', '动物造型题材', NULL, 2),
(3, '瑞兽手把件', '貔貅、麒麟等瑞兽', NULL, 3),
(3, '人物手把件', '人物造型题材', NULL, 4),
(3, '花鸟手把件', '花鸟自然题材', NULL, 5),
(3, '佛像手把件', '佛教题材', NULL, 6);

-- ========================================
-- 雕刻件的子类型 (category_id=4) - 题材
-- ========================================
INSERT INTO sub_types (category_id, name, description, preview_image, sort_order) VALUES
(4, '山水雕刻', '山水意境雕刻', NULL, 1),
(4, '花鸟雕刻', '花鸟自然雕刻', NULL, 2),
(4, '人物雕刻', '人物造型雕刻', NULL, 3),
(4, '佛像雕刻', '佛教题材雕刻', NULL, 4),
(4, '瑞兽雕刻', '瑞兽神兽雕刻', NULL, 5),
(4, '仿古雕刻', '仿古纹饰雕刻', NULL, 6);

-- ========================================
-- 摆件的子类型 (category_id=5) - 题材
-- ========================================
INSERT INTO sub_types (category_id, name, description, preview_image, sort_order) VALUES
(5, '山水摆件', '山水意境摆件', NULL, 1),
(5, '人物摆件', '人物造型摆件', NULL, 2),
(5, '动物摆件', '动物造型摆件', NULL, 3),
(5, '佛像摆件', '佛教题材摆件', NULL, 4),
(5, '花鸟摆件', '花鸟自然摆件', NULL, 5),
(5, '器皿摆件', '香炉、花瓶等器皿', NULL, 6);

-- ========================================
-- 手镯的子类型 (category_id=6) - 镯型
-- ========================================
INSERT INTO sub_types (category_id, name, description, preview_image, sort_order) VALUES
(6, '平安镯', '内平外圆，最经典的镯型', NULL, 1),
(6, '福镯', '内圆外圆，圆条造型', NULL, 2),
(6, '贵妃镯', '椭圆形，贴合手腕', NULL, 3),
(6, '美人镯', '条杆纤细，秀气典雅', NULL, 4),
(6, '方镯', '方形截面，棱角分明', NULL, 5),
(6, '雕花镯', '表面雕刻纹饰', NULL, 6);

-- ========================================
-- 耳钉的子类型 (category_id=7) - 形状
-- ========================================
INSERT INTO sub_types (category_id, name, description, preview_image, sort_order) VALUES
(7, '圆形耳钉', '经典圆形造型', NULL, 1),
(7, '水滴形耳钉', '水滴形优雅造型', NULL, 2),
(7, '方形耳钉', '方形简约造型', NULL, 3),
(7, '花朵形耳钉', '花朵造型', NULL, 4),
(7, '心形耳钉', '心形浪漫造型', NULL, 5),
(7, '几何形耳钉', '几何抽象造型', NULL, 6);

-- ========================================
-- 耳饰的子类型 (category_id=8) - 款式
-- ========================================
INSERT INTO sub_types (category_id, name, description, preview_image, sort_order) VALUES
(8, '耳环', '圆环形耳饰', NULL, 1),
(8, '耳坠', '垂坠型耳饰', NULL, 2),
(8, '耳夹', '无需耳洞的耳饰', NULL, 3),
(8, '流苏耳饰', '长款流苏造型', NULL, 4);

-- ========================================
-- 手链的子类型 (category_id=9) - 珠径
-- ========================================
INSERT INTO sub_types (category_id, name, description, preview_image, sort_order) VALUES
(9, '6mm', NULL, NULL, 1),
(9, '8mm', NULL, NULL, 2),
(9, '10mm', NULL, NULL, 3),
(9, '12mm', NULL, NULL, 4),
(9, '14mm', NULL, NULL, 5);

-- ========================================
-- 项链的子类型 (category_id=10) - 款式
-- ========================================
INSERT INTO sub_types (category_id, name, description, preview_image, sort_order) VALUES
(10, '锁骨链', '短款锁骨链', NULL, 1),
(10, '吊坠项链', '搭配玉石吊坠', NULL, 2),
(10, '串珠项链', '玉珠串联而成', NULL, 3),
(10, '编绳项链', '编织绳搭配玉石', NULL, 4),
(10, '毛衣链', '长款毛衣链', NULL, 5);

-- ========================================
-- 戒指的子类型 (category_id=11) - 款式
-- ========================================
INSERT INTO sub_types (category_id, name, description, preview_image, sort_order) VALUES
(11, '素面戒指', '光面简约戒指', NULL, 1),
(11, '镶嵌戒指', '金属镶嵌玉石', NULL, 2),
(11, '雕花戒指', '表面雕刻纹饰', NULL, 3),
(11, '扳指', '传统扳指造型', NULL, 4),
(11, '指环', '环形简约指环', NULL, 5);

-- ========================================
-- 表带的子类型 (category_id=12) - 宽度
-- ========================================
INSERT INTO sub_types (category_id, name, description, preview_image, sort_order) VALUES
(12, '18mm', NULL, NULL, 1),
(12, '20mm', NULL, NULL, 2),
(12, '22mm', NULL, NULL, 3),
(12, '24mm', NULL, NULL, 4);

-- ========================================
-- 颜色数据
-- 基于和田玉国标颜色分类及市场主流色种
-- ========================================

-- 牌子颜色 (category_id=1) - 全部10种
INSERT INTO colors (category_id, name, hex_code, sort_order) VALUES
(1, '白玉', '#FEFEF2', 1),
(1, '青白玉', '#E8EDE4', 2),
(1, '青玉', '#7A8B6E', 3),
(1, '碧玉', '#2D5F2D', 4),
(1, '翠青', '#6BAF8D', 5),
(1, '黄玉', '#D4A843', 6),
(1, '糖玉', '#C4856C', 7),
(1, '墨玉', '#2C2C2C', 8),
(1, '藕粉', '#E8B4B8', 9),
(1, '烟紫', '#8B7D9B', 10);

-- 珠子颜色 (category_id=2) - 11种(含糖白)
INSERT INTO colors (category_id, name, hex_code, sort_order) VALUES
(2, '糖白', '#F5F0E8', 1),
(2, '白玉', '#FEFEF2', 2),
(2, '碧玉', '#2D5F2D', 3),
(2, '青白玉', '#E8EDE4', 4),
(2, '青玉', '#7A8B6E', 5),
(2, '翠青', '#6BAF8D', 6),
(2, '黄玉', '#D4A843', 7),
(2, '糖玉', '#C4856C', 8),
(2, '墨玉', '#2C2C2C', 9),
(2, '藕粉', '#E8B4B8', 10),
(2, '烟紫', '#8B7D9B', 11);

-- 手把件颜色 (category_id=3) - 全部10种
INSERT INTO colors (category_id, name, hex_code, sort_order) VALUES
(3, '白玉', '#FEFEF2', 1),
(3, '青白玉', '#E8EDE4', 2),
(3, '青玉', '#7A8B6E', 3),
(3, '碧玉', '#2D5F2D', 4),
(3, '翠青', '#6BAF8D', 5),
(3, '黄玉', '#D4A843', 6),
(3, '糖玉', '#C4856C', 7),
(3, '墨玉', '#2C2C2C', 8),
(3, '藕粉', '#E8B4B8', 9),
(3, '烟紫', '#8B7D9B', 10);

-- 雕刻件颜色 (category_id=4) - 全部10种
INSERT INTO colors (category_id, name, hex_code, sort_order) VALUES
(4, '白玉', '#FEFEF2', 1),
(4, '青白玉', '#E8EDE4', 2),
(4, '青玉', '#7A8B6E', 3),
(4, '碧玉', '#2D5F2D', 4),
(4, '翠青', '#6BAF8D', 5),
(4, '黄玉', '#D4A843', 6),
(4, '糖玉', '#C4856C', 7),
(4, '墨玉', '#2C2C2C', 8),
(4, '藕粉', '#E8B4B8', 9),
(4, '烟紫', '#8B7D9B', 10);

-- 摆件颜色 (category_id=5) - 全部10种
INSERT INTO colors (category_id, name, hex_code, sort_order) VALUES
(5, '白玉', '#FEFEF2', 1),
(5, '青白玉', '#E8EDE4', 2),
(5, '青玉', '#7A8B6E', 3),
(5, '碧玉', '#2D5F2D', 4),
(5, '翠青', '#6BAF8D', 5),
(5, '黄玉', '#D4A843', 6),
(5, '糖玉', '#C4856C', 7),
(5, '墨玉', '#2C2C2C', 8),
(5, '藕粉', '#E8B4B8', 9),
(5, '烟紫', '#8B7D9B', 10);

-- 手镯颜色 (category_id=6) - 全部10种
INSERT INTO colors (category_id, name, hex_code, sort_order) VALUES
(6, '白玉', '#FEFEF2', 1),
(6, '青白玉', '#E8EDE4', 2),
(6, '青玉', '#7A8B6E', 3),
(6, '碧玉', '#2D5F2D', 4),
(6, '翠青', '#6BAF8D', 5),
(6, '黄玉', '#D4A843', 6),
(6, '糖玉', '#C4856C', 7),
(6, '墨玉', '#2C2C2C', 8),
(6, '藕粉', '#E8B4B8', 9),
(6, '烟紫', '#8B7D9B', 10);

-- 耳钉颜色 (category_id=7) - 全部10种
INSERT INTO colors (category_id, name, hex_code, sort_order) VALUES
(7, '白玉', '#FEFEF2', 1),
(7, '青白玉', '#E8EDE4', 2),
(7, '青玉', '#7A8B6E', 3),
(7, '碧玉', '#2D5F2D', 4),
(7, '翠青', '#6BAF8D', 5),
(7, '黄玉', '#D4A843', 6),
(7, '糖玉', '#C4856C', 7),
(7, '墨玉', '#2C2C2C', 8),
(7, '藕粉', '#E8B4B8', 9),
(7, '烟紫', '#8B7D9B', 10);

-- 耳饰颜色 (category_id=8) - 全部10种
INSERT INTO colors (category_id, name, hex_code, sort_order) VALUES
(8, '白玉', '#FEFEF2', 1),
(8, '青白玉', '#E8EDE4', 2),
(8, '青玉', '#7A8B6E', 3),
(8, '碧玉', '#2D5F2D', 4),
(8, '翠青', '#6BAF8D', 5),
(8, '黄玉', '#D4A843', 6),
(8, '糖玉', '#C4856C', 7),
(8, '墨玉', '#2C2C2C', 8),
(8, '藕粉', '#E8B4B8', 9),
(8, '烟紫', '#8B7D9B', 10);

-- 手链颜色 (category_id=9) - 全部10种
INSERT INTO colors (category_id, name, hex_code, sort_order) VALUES
(9, '白玉', '#FEFEF2', 1),
(9, '青白玉', '#E8EDE4', 2),
(9, '青玉', '#7A8B6E', 3),
(9, '碧玉', '#2D5F2D', 4),
(9, '翠青', '#6BAF8D', 5),
(9, '黄玉', '#D4A843', 6),
(9, '糖玉', '#C4856C', 7),
(9, '墨玉', '#2C2C2C', 8),
(9, '藕粉', '#E8B4B8', 9),
(9, '烟紫', '#8B7D9B', 10);

-- 项链颜色 (category_id=10) - 全部10种
INSERT INTO colors (category_id, name, hex_code, sort_order) VALUES
(10, '白玉', '#FEFEF2', 1),
(10, '青白玉', '#E8EDE4', 2),
(10, '青玉', '#7A8B6E', 3),
(10, '碧玉', '#2D5F2D', 4),
(10, '翠青', '#6BAF8D', 5),
(10, '黄玉', '#D4A843', 6),
(10, '糖玉', '#C4856C', 7),
(10, '墨玉', '#2C2C2C', 8),
(10, '藕粉', '#E8B4B8', 9),
(10, '烟紫', '#8B7D9B', 10);

-- 戒指颜色 (category_id=11) - 全部10种
INSERT INTO colors (category_id, name, hex_code, sort_order) VALUES
(11, '白玉', '#FEFEF2', 1),
(11, '青白玉', '#E8EDE4', 2),
(11, '青玉', '#7A8B6E', 3),
(11, '碧玉', '#2D5F2D', 4),
(11, '翠青', '#6BAF8D', 5),
(11, '黄玉', '#D4A843', 6),
(11, '糖玉', '#C4856C', 7),
(11, '墨玉', '#2C2C2C', 8),
(11, '藕粉', '#E8B4B8', 9),
(11, '烟紫', '#8B7D9B', 10);

-- 表带颜色 (category_id=12) - 全部10种
INSERT INTO colors (category_id, name, hex_code, sort_order) VALUES
(12, '白玉', '#FEFEF2', 1),
(12, '青白玉', '#E8EDE4', 2),
(12, '青玉', '#7A8B6E', 3),
(12, '碧玉', '#2D5F2D', 4),
(12, '翠青', '#6BAF8D', 5),
(12, '黄玉', '#D4A843', 6),
(12, '糖玉', '#C4856C', 7),
(12, '墨玉', '#2C2C2C', 8),
(12, '藕粉', '#E8B4B8', 9),
(12, '烟紫', '#8B7D9B', 10);
