package com.hys.app.model.erp.dos;

import com.baomidou.mybatisplus.annotation.*;
import com.hys.app.framework.database.mybatisplus.base.BaseDO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 订单 DO
 *
 * @author 张崧
 * 2024-01-24 15:58:30
 */
@TableName(value = "erp_product_group", autoResultMap = true)
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ProductGroupDO extends BaseDO {

    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    @NotBlank
    private String name;

    @ApiModelProperty(name = "imageList", value = "商品相册")
    @NotBlank(message = "出租商品  售卖商品")
    private String hireOrSail;


    private String remark;

    @TableField(exist = false)
    @Valid
    @NotEmpty
    List<ProductGroupItemDO> itemDoList;

}
