package com.czg.market.vo;

import com.czg.market.dto.MemberConfigDTO;
import jakarta.validation.Valid;
import jakarta.validation.constraints.DecimalMin;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

@Data
public class MemberConfigVO implements Serializable {
    /**
     * id
     */
    @NotNull(message = "id不能为空")
    private Long id;

    /**
     * 提交生日/姓名
     */
    @NotNull(message = "提交生日/姓名不能为空")
    private Integer isSubmitInfo;


    /**
     * 方案列表
     */
    @Valid
    private List<MemberConfigDTO.ConfigList> configList;

    /**
     * 条件开通条件项
     */
    @Valid
    private List<MemberConfigDTO.condition> conditionList;

    /**
     * 购买开通金额
     */
    @DecimalMin(value = "0.01", message = "金额不能小于0.01")
    private BigDecimal openAmount;

    /**
     * 参与会员价门店
     */
    private List<Long> memberPriceShopIdList;

    /**
     * 是否享受会员价
     */
    @NotNull(message = "是否享受会员价不能为空")
    private Integer isMemberPrice;

    /**
     * 每消费一元经验值
     */
    @Min(value = 0, message = "消费增成长值最小为0")
    private Long costReward;

    /**
     * 每充值一元经验值
     */
    @Min(value = 0, message = "充值增成长值最小为0")
    private Long rechargeReward;

    /**
     * 规则说明
     */
    @NotBlank(message = "规则说明不能为空")
    private String remark;

    private LocalDateTime createTime;

    /**
     * 修改时间
     */
    private LocalDateTime updateTime;

    private String openType;

    private String memberPriceShopType;

    private Long isOpen;
}
