package cn.iocoder.yudao.module.asset.controller.admin.contract.vo;

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

import jakarta.validation.Valid;
import jakarta.validation.constraints.NotEmpty;
import java.util.List;

/**
 * 车辆租赁合同创建/更新 Request VO
 *
 * @author 芋道源码
 */
@Schema(description = "管理后台 - 车辆租赁合同创建/更新 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ContractSaveReqVO extends ContractBaseVO {

    @Schema(description = "主键ID", example = "1")
    private Long id;

    @Schema(description = "车辆订单列表", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "车辆订单列表不能为空")
    @Valid
    private List<ContractVehicleSaveVO> vehicles;

    @Schema(description = "被授权人列表")
    @Valid
    private List<ContractAuthorizedVO> authorizedPersons;

    @Data
    public static class ContractVehicleSaveVO extends ContractVehicleVO {

        @Schema(description = "服务项目列表")
        @Valid
        private List<ContractVehicleServiceVO> services;
    }

}
