package com.cf.imes.module.system.controller.admin.process.vo.process;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

@Schema(description = "管理后台 - 工序信息 process新增/修改 Request VO")
@Data
@Valid
public class ProcessUserSaveReqVO {
    @Schema(description = "工序 ID", example = "161")
    private Long id;

    @Schema(description = "工序名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
    @NotEmpty(message = "工序名称不能为空")
    private String name;

    @Schema(description = "计件工资", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "计件工资不能为空")
    private Double pieceRate;

    @Schema(description = "计件类型：1 数量 2 长度 3 平方 4 宽 5 高 6 体积 7 生产单金额百分比", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "计件类型：1 数量 2 长度 3 平方 4 宽 5 高 6 体积 7 生产单金额百分比不能为空")
    private Integer pieceType;

    @Schema(description = "工序类型：0 全部加工 1 开料 2 部件加工 3 异形封边 4 分堆 5 打包 6 出库 7 组件加工 8 板材", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "工序类型：0 全部加工 1 开料 2 部件加工 3 异形封边 4 分堆 5 打包 6 出库 7 组件加工 8 板材不能为空")
    private Integer type;

    @Schema(description = "是否推送终端客户：0 否 1 是", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "是否推送终端客户：0 否 1 是不能为空")
    private Boolean isCustom;

    @Schema(description = "是否推送经销商：0 否 1 是", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "是否推送经销商：0 否 1 是不能为空")
    private Boolean isDealer;

    @Schema(description = "排序优先级", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "排序优先级不能为空")
    private Short sort;

    @Schema(description = "小时产量", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "小时产量不能为空")
    private Double hourCapacity;

    @Schema(description = "单位", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "单位不能为空")
    private String unit;

    @Schema(description = "是否启用：0 否 1 是", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "是否启用：0 否 1 是不能为空")
    private Boolean isEnabled;

    @Schema(description = "准备时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "准备时间不能为空")
    private Double prepareTime;

    @Schema(description = "描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "你说的对")
    private String description;

    @Schema(description = "用户ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "12,13")
    private String users;

    @Schema(description = "组织Id", requiredMode = Schema.RequiredMode.REQUIRED, example = "181")
    private Long organId;
}
