package com.hotwj.platform.resourceManagement.vehicleRepair.domain.bo;

import com.hotwj.platform.resourceManagement.vehicleRepair.domain.HotVehicleRepair;
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.common.mybatis.core.domain.BaseEntity;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 车辆维修记录业务对象 hot_vehicle_repair
 *
 * @author shihongwei
 * @date 2025-12-15
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = HotVehicleRepair.class, reverseConvertGenerate = false)
public class HotVehicleRepairBo extends BaseEntity {

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

    /**
     * 主键集合(用于批量导出等场景)
     */
    private List<String> ids;

    /**
     * 公司ID
     */
    @NotNull(message = "公司ID不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long companyId;

    /**
     * 车辆ID
     */
    private String vehicleId;

    /**
     * 车牌号
     */
    private String plateNumber;

    /**
     * 运营状态:1=正常,2=暂停,3=过户,4=报废
     */
    private Long operationStatus;

    /**
     * 维修类别
     */
    @NotBlank(message = "维修类别不能为空", groups = {AddGroup.class, EditGroup.class})
    private String repairCategory;

    /**
     * 维修缘由
     */
    @NotBlank(message = "维修缘由不能为空", groups = {AddGroup.class, EditGroup.class})
    private String repairReason;

    /**
     * 维修单位
     */
    private String repairUnit;

    /**
     * 维修单位电话
     */
    private String repairUnitPhone;

    /**
     * 维修金额
     */
    private BigDecimal repairAmount;

    /**
     * 是否主要部件更换:0=否,1=是
     */
    @NotNull(message = "是否主要部件更换:0=否,1=是不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long isMajorPartReplaced;

    /**
     * 记录人
     */
    @NotBlank(message = "记录人不能为空", groups = {AddGroup.class, EditGroup.class})
    private String recorder;

    /**
     * 维修日期
     */
    @NotNull(message = "维修日期不能为空", groups = {AddGroup.class, EditGroup.class})
    private Date repairDate;

    /**
     * 维修完成日期
     */
    @NotNull(message = "维修完成日期不能为空", groups = {AddGroup.class, EditGroup.class})
    private Date finishDate;

    /**
     * 更换部件
     */
    private String replacedParts;

    /**
     * 部件规格
     */
    private String partSpec;

    /**
     * 维修内容
     */
    private String repairContent;

    /**
     * 维修凭据图片URL(多个逗号分隔)
     */
    private String proofImageUrls;

    /**
     * 0=正常, 1=已删除
     */
//    @NotNull(message = "0=正常, 1=已删除不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long isDeleted;


}
