package com.crm.rely.backend.core.entity.web.activity;

import com.crm.rely.backend.core.constant.ManagerConstant;
import com.crm.rely.backend.core.entity.base.BaseUpdateEntity;
import com.crm.rely.backend.core.entity.web.activity.close.function.WebActivityCloseFunctionSaveEntity;
import com.crm.rely.backend.core.entity.web.activity.group.type.WebActivityGroupTypeSaveEntity;
import com.crm.rely.backend.core.entity.web.activity.login.type.WebActivityLoginTypeSaveEntity;
import com.crm.rely.backend.core.entity.web.activity.tag.WebActivityTagSaveEntity;
import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;

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

@Data
public class WebActivityUpdateEntity extends BaseUpdateEntity {

    @NotNull(message = ManagerConstant.TITLE_NOT_NULL)
    @NotBlank(message = ManagerConstant.TITLE_NOT_NULL)
    private String title;

    @NotNull(message = ManagerConstant.SUB_TITLE_NOT_NULL)
    @NotBlank(message = ManagerConstant.SUB_TITLE_NOT_NULL)
    private String subTitle;

    @NotNull(message = ManagerConstant.LANG_NOT_NULL)
    @NotBlank(message = ManagerConstant.LANG_NOT_NULL)
    private String lang;

    private List<String> countrys;
    //    @NotNull(message = ManagerConstant.ADVERT_IMAGE_NOT_NULL)
//    @NotBlank(message = ManagerConstant.ADVERT_IMAGE_NOT_NULL)
    private String advertImage;

    //    @NotNull(message = ManagerConstant.ADVERT_URL_NOT_NULL)
//    @NotBlank(message = ManagerConstant.ADVERT_URL_NOT_NULL)
    private String advertUrl;

    //    @NotNull(message = ManagerConstant.COVER_IMAGE_NOT_NULL)
//    @NotBlank(message = ManagerConstant.COVER_IMAGE_NOT_NULL)
    private String coverImage;

    //    @NotNull(message = ManagerConstant.ACTIVITY_IMAGE_NOT_NULL)
//    @NotBlank(message = ManagerConstant.ACTIVITY_IMAGE_NOT_NULL)
    private String activityImage;

    @NotNull(message = ManagerConstant.CONTENT_NOT_NULL)
    @NotBlank(message = ManagerConstant.CONTENT_NOT_NULL)
    private String content;

    @NotNull(message = ManagerConstant.DELIVERY_TIME_NOT_NULL)
    private Date deliveryTime;

    @NotNull(message = ManagerConstant.START_TIME_NOT_NULL)
    private Date startTime;

    @NotNull(message = ManagerConstant.END_TIME_NOT_NULL)
    private Date endTime;

    @NotNull(message = ManagerConstant.HOT_NOT_NULL)
    private Integer hot;

    @NotNull(message = ManagerConstant.VALID_NOT_NULL)
    private Integer valid;

    @NotNull(message = ManagerConstant.TAG_NOT_NULL)
    private List<WebActivityTagSaveEntity> tags;

    @NotNull(message = ManagerConstant.LOGIN_TYPE_NOT_NULL)
    private List<WebActivityLoginTypeSaveEntity> loginTypes;

    private Integer number;

    /**
     * 高级设置开关 0关 1开 在关的时候 下列所有功能不开启
     */
    private Integer seniorSetting;

    /**
     * 组别类型-活动中调整到的组别  如果为null不修改
     */
    private Long groupTypeActivity;

    /**
     * 组别类型-活动完成调整的组别 如果为null不修改
     */
    private Long groupTypeComplete;

    /**
     * 资金类型 1出入金 2 信用金  如果为null 则下列give_amount金额不触发
     */
    private Integer fundType;

    private Integer creditLoss;

    /**
     * 赠送金额 usd
     */
    private BigDecimal giveAmount;

    private List<WebActivityCloseFunctionSaveEntity> closeFunctions;

    private List<WebActivityGroupTypeSaveEntity> groupTypes;
}
