package org.dromara.work.domain.bo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.work.domain.TpOrderSmall;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * 订单小图业务对象 tp_order_small
 *
 * @author Maosw
 * @date 2024-08-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@AutoMapper(target = TpOrderSmall.class, reverseConvertGenerate = false)
public class TpOrderSmallBo {

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

    /**
     * 所属订单
     */
    @NotNull(message = "所属订单不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long oid;

    /**
     * 图片名称
     */
    @NotBlank(message = "图片名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String name;

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

    /**
     * 上传时间
     */
    private Date addTime;

    /**
     * 操作人
     */
    private Long addUser;

    /**
     * 请求参数
     */
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    @TableField(exist = false)
    private Map<String, Object> params = new HashMap<>();

}
