package org.dromara.work.domain.bo;

import org.dromara.work.domain.TpProd;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

/**
 * 商品业务对象 tp_prod
 *
 * @author Maosw
 * @date 2025-03-15
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = TpProd.class, reverseConvertGenerate = false)
public class TpProdBo extends BaseEntity {

    /**
     * 商品ID
     */
    @NotNull(message = "商品ID不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 商品标题
     */
    @NotBlank(message = "商品标题不能为空", groups = { AddGroup.class, EditGroup.class })
    private String title;

    /**
     * 商品主图
     */
    @NotBlank(message = "商品主图不能为空", groups = { AddGroup.class, EditGroup.class })
    private String pic;

    /**
     * 商品图片，以,分割
     */
    private String imgs;

    /**
     * 视频地址
     */
    private String video;

    /**
     * 详细描述
     */
    private String content;

    /**
     * 商品参数json
     */
    private String parame;

    /**
     * 展示价
     */
    @NotNull(message = "展示价不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long price;

    /**
     * 成本价
     */
    private Long oriPrice;

    /**
     * 状态：1-上架，2-下架
     */
    @NotNull(message = "状态：1-上架，2-下架不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long status;

    /**
     * 库存
     */
    private Long stocks;

    /**
     * 备注
     */
    private String remark;


}
