package com.crm.rely.backend.core.entity.custom.group.demo;

import com.crm.rely.backend.core.constant.Constants;
import com.crm.rely.backend.core.constant.ManagerConstant;
import com.crm.rely.backend.core.entity.base.BaseAddEntity;
import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;

/**
 * Created by max on 2020/7/8.
 */
@Data
public class CustomGroupDemoAddEntity extends BaseAddEntity {

    @NotBlank(message = ManagerConstant.CUSTOM_GROUP_NAME_NOT_NULL)
    @NotNull(message = ManagerConstant.CUSTOM_GROUP_NAME_NOT_NULL)
    private String name;

    @NotBlank(message = ManagerConstant.CUSTOM_GROUP_CODE_NOT_NULL)
    @NotNull(message = ManagerConstant.CUSTOM_GROUP_CODE_NOT_NULL)
    private String code;

    @NotBlank(message = Constants.PLATFORM_NOT_NULL)
    @NotNull(message = Constants.PLATFORM_NOT_NULL)
    private String platform;

    @NotNull(message = ManagerConstant.CUSTOM_GROUP_TYPE_NOT_NULL)
    @Min(value = 0, message = Constants.PARAMETER_ERROR)
    private Long type;


    @NotBlank(message = ManagerConstant.CUSTOM_GROUP_CURRENCY_NOT_NULL)
    @NotNull(message = ManagerConstant.CUSTOM_GROUP_CURRENCY_NOT_NULL)
    private String currency;

    @NotNull(message = ManagerConstant.CUSTOM_GROUP_BALANCE_NOT_NULL)
    @Min(value = 0, message = Constants.PARAMETER_ERROR)
    private BigDecimal balance;

    @NotNull(message = ManagerConstant.CUSTOM_GROUP_EXPIRATION_TIME_DAY_NOT_NULL)
    @Min(value = 0, message = Constants.PARAMETER_ERROR)
    private Integer expirationTimeDay;

    private List<Integer> leverages;
}
