-- 给lq_xmzl表添加四个手工费字段
-- 医美手工费、科美手工费、生美手工费、健康师手工费

-- 添加医美手工费字段
ALTER TABLE lq_xmzl 
ADD COLUMN F_MedicalBeautyLaborCost DECIMAL(18,2) DEFAULT 0.00 COMMENT '医美手工费' AFTER sgf;

-- 添加科美手工费字段
ALTER TABLE lq_xmzl 
ADD COLUMN F_TechBeautyLaborCost DECIMAL(18,2) DEFAULT 0.00 COMMENT '科美手工费' AFTER F_MedicalBeautyLaborCost;

-- 添加生美手工费字段
ALTER TABLE lq_xmzl 
ADD COLUMN F_LifeBeautyLaborCost DECIMAL(18,2) DEFAULT 0.00 COMMENT '生美手工费' AFTER F_TechBeautyLaborCost;

-- 添加健康师手工费字段
ALTER TABLE lq_xmzl 
ADD COLUMN F_HealthCoachLaborCost DECIMAL(18,2) DEFAULT 0.00 COMMENT '健康师手工费' AFTER F_LifeBeautyLaborCost;

-- 更新已有数据：如果原有sgf字段有值，将值复制到四个新字段（可根据业务需求调整）
-- UPDATE lq_xmzl SET F_MedicalBeautyLaborCost = sgf, F_TechBeautyLaborCost = sgf, F_LifeBeautyLaborCost = sgf, F_HealthCoachLaborCost = sgf WHERE sgf IS NOT NULL AND sgf > 0;

-- ============================================
-- 给lq_xmzl表添加是否允许陪同字段
-- ============================================

-- 添加是否允许陪同字段
ALTER TABLE lq_xmzl 
ADD COLUMN F_IsAllowAccompanied INT DEFAULT 0 COMMENT '是否允许陪同（0-否，1-是）' AFTER F_HealthCoachLaborCost;

