package com.jeesharp.business.modules.mall.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

/**
 * 商品发布模板明细保存行，与 {@link com.jeesharp.business.modules.mall.entity.MallProductTemplateItem} 对应。
 *
 * @author jeesharp
 * @since 2026-05-15
 */
@Data
@Schema(description = "模板明细保存行")
public class MallProductTemplateItemSaveDTO {

    @NotNull(message = "行类型不能为空")
    @Schema(description = "行类型：1-规格维度 2-扩展属性", requiredMode = Schema.RequiredMode.REQUIRED)
    private Integer itemType;

    @Schema(description = "规格ID（规格行必填）")
    private String specId;

    @Schema(description = "属性键（属性行必填）")
    private String attrKey;

    @Schema(description = "属性展示名")
    private String attrName;

    @Schema(description = "录入方式：1-文本 2-数字 3-单选 4-多选 5-日期")
    private Integer inputType;

    @Schema(description = "可选项 JSON 数组字符串")
    private String optionsJson;

    @Schema(description = "是否必填：0-否 1-是")
    private Integer requiredFlag;

    @Schema(description = "排序号")
    private Integer sortOrder;
}
