package org.springblade.finance.dto;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Data
public class ChannelSpidDTO implements Serializable {

	private static final long serialVersionUID = 1L;

	@ApiModelProperty(value = "公司名称")
	@TableField("COMPANY")
	@NotBlank(message = "公司名称不能为空")
	private String company;

	@ApiModelProperty(value = "渠道ID")
	@TableField("CHANNELID")
	@NotBlank(message = "渠道ID不能为空")
	private String channelid;

	@ApiModelProperty(value = "渠道名称")
	@TableField("CHANNELNAME")
	@NotBlank(message = "渠道名称不能为空")
	private String channelname;

	@ApiModelProperty(value = "合作开始月份")
	@TableField("ACCOUNT_STARTDATE")
	@JsonFormat(pattern = "yyyy-MM-dd")
	@NotNull(message = "合作开始月份不能为空")
	private Date accountStartdate;

	@ApiModelProperty(value = "合作结束月份")
	@TableField("ACCOUNT_ENDDATE")
	@JsonFormat(pattern = "yyyy-MM-dd")
	private Date accountEnddate;

	@ApiModelProperty(value = "推广省份")
	@TableField("PROVINCES")
	private String provinces;

	@ApiModelProperty(value = "产品ID")
	@TableField("SPID")
	@NotBlank(message = "产品ID不能为空")
	private String spid;

	@ApiModelProperty(value = "产品价格")
	@TableField("PRICE")
	@NotNull(message = "产品价格不能为空")
	private BigDecimal price;

	@ApiModelProperty(value = "分成金额")
	@TableField("PARTNER_INCOME")
	@NotNull(message = "分成金额不能为空")
	private BigDecimal partnerIncome;

	@ApiModelProperty(value = "省分分成（元/月）")
	@TableField("PROVINCE_MONEY")
	private BigDecimal provinceMoney;

	@ApiModelProperty(value = "分成月份")
	@TableField("MONTHS")
	@NotNull(message = "分成月份不能为空")
	private Long months;

	@ApiModelProperty(value = "是否有效。1：有效；0：无效")
	@TableField("IS_VALID")
	private Integer isValid;

	@ApiModelProperty(value = "是否一次性结算产品。1：是；0：否")
	@TableField("IS_ONCE")
	@NotNull(message = "是否一次性结算产品不能为空")
	private Integer isOnce;

	@ApiModelProperty(value = "是否需要扣罚。1：是；0：否；")
	@TableField("NEED_DISCOUNT")
	@NotNull(message = "是否需要扣罚不能为空")
	private Integer needDiscount;

	@ApiModelProperty(value = "结算类型。1：有效用户；2：会员权益；3：出账用户；")
	@TableField("DEAL_TYPE")
	//@NotNull(message = "结算类型不能为空")
	private Integer dealType;

	@ApiModelProperty(value = "去重月份数")
	@TableField("DMONTHS")
	//@NotNull(message = "去重月份数不能为空")
	private Integer dmonths;


}
