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.TpOrderModel;

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

/**
 * 订单模型业务对象 tp_order_model
 *
 * @author Maosw
 * @date 2024-08-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@AutoMapper(target = TpOrderModel.class, reverseConvertGenerate = false)
public class TpOrderModelBo {

    /**
     *
     */
    @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<>();

}
