package com.backendsys.entity.Ai.Aiivh;

import com.backendsys.entity.validator.RangeArray;
import com.backendsys.entity.validator.RangeStringArray;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

/**
 * AI数智人-用户配额订单记录
 */
@Data
public class AiivhQuotaOrderDTO {

    public static interface Create{}
    public static interface Update{}

    private Long id;
    private String order_code;
    private Long user_id;

    // 仅实体类有，作为数量依据 (
    @RangeArray(message="兑换类型取值有误，范围应是(1形象+音色, 2形象, 3音色)", value = {"1", "2", "3"})
    private Integer order_type;

    @RangeStringArray(message="兑换来源取值有误，范围应是(POINT:积分兑换)", value = {"POINT"})
    private String order_origin;

    @NotNull(message = "兑换数量不能为空", groups = { Create.class })
    @Range(min = 1, max = 10, message = "兑换数量范围在{min}~{max}")
    private Integer quantity;

    private Float anchor_subtotal_point;
    private Float timbre_subtotal_point;
    private Float total_point;

    private Integer validity_year;
    private String expire_date;

    private String create_time;
    private String create_time_begin;
    private String create_time_end;
    private String update_time;

}
