package org.agt.module.license.controller.admin.license.vo;

import com.mzt.logapi.starter.annotation.DiffLogField;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.agt.module.license.framework.operatelog.core.CommonAdminUserParseFunction;
import org.agt.module.license.framework.operatelog.core.LocalDateParseFunction;

import java.time.LocalDateTime;
import java.util.List;

@Schema(description = "管理后台 - License新增/修改 Request VO")
@Data
public class LicenseSaveReqVO {

    @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "24876")
    private Long id;

    @Schema(description = "客户ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "31667")
    @NotNull(message = "客户ID不能为空")
    private Long customerId;

    @Schema(description = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "2496")
    @NotNull(message = "项目ID不能为空")
    private Long projectId;

    @Schema(description = "sn", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "sn不能为空")
    @DiffLogField(name = "SN")
    private String serialNo;

    @Schema(description = "到期时间")
    @DiffLogField(name = "到期时间", function = LocalDateParseFunction.NAME)
    private LocalDateTime expiryDate;

    @Schema(description = "用户数")
    @DiffLogField(name = "用户数")
    private Integer userNumber;

    @Schema(description = "基站数")
    @DiffLogField(name = "基站数")
    private Integer ranNumber;

    @Schema(description = "网元激活码列表")
    private List<LicenseDetailVO> neCodeList;

    @Schema(description = "文件URL")
    private String fileUrl;

    @Schema(description = "申请人")
    private Long applicant;

    @Schema(description = "申请时间")
    private LocalDateTime applicationTime;

    @Schema(description = "审批人")
    @DiffLogField(name = "审批人", function = CommonAdminUserParseFunction.NAME)
    private Long approver;

    @Schema(description = "状态", example = "1")
    private Integer status;

    @Schema(description = "说明", example = "随便")
    @DiffLogField(name = "说明")
    private String remark;
}