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

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.util.List;

/**
 * Created by max on 2020/7/8.
 */
@Data
public class CustomGroupAddEntity 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;

    /**
     * 1:a,2:b
     */
    @NotNull(message = ManagerConstant.CUSTOM_GROUP_POS_NOT_NULL)
    @Min(value = 0, message = Constants.PARAMETER_ERROR)
    private Integer pos;

    @NotNull(message = ManagerConstant.CUSTOM_GROUP_HIDE_NOT_NULL)
    private List<Integer> hides;

    @NotNull(message = ManagerConstant.CUSTOM_GROUP_COM_POINT_NOT_NULL)
    private List<Float> comPoints;

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

    private List<Integer> leverages;

    private Integer rebateValid;

    private Integer commissionValid;

    /**
     * 是否参与积分计算
     */
    private Integer integralValid;

    /**
     * 是否参与销售佣金计算
     */
    private Integer salesCommissionValid;

    /**
     * 是否参与仓息
     * 1：是，0：否
     */
    private Integer storageValid;
    /**
     * 是否参与加点
     * 1：是，0：否
     */
    private Integer pointValid;
    /**
     * 是否参与暗点
     * 1：是，0：否
     */
    private Integer hideValid;

}
