package com.cyksj.model.views;

import com.ejlchina.searcher.bean.DbField;
import com.ejlchina.searcher.bean.SearchBean;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;

/**
 * 项目名: yhlxj
 * 文件名: CouponDistributePopularizeDetailView
 * 创建者: JavaZou
 * 创建时间:2023/11/27 12:14
 */
@Getter
@Setter
@SearchBean(tables = "coupon_distribute_popularize cp inner join coupon c on c.id = cp.coupon_id",
		where = "cp.deleted is true and cp.is_general is false and c.deleted is true")
public class CouponDistributePopularizeDetailView {
	@DbField("cp.id")
	private Long id;

	@DbField("cp.coupon_id")
	private Long couponId;

	@DbField("c.name")
	private String couponName;

	@DbField("c.classification_id")
	private Long classificationId;
	/**
	 * 固定推广者id
	 */
	@DbField("cp.distribute_id")
	private Long distributeId;

	@DbField("cp.user_id")
	private Long userId;

	/**
	 * 是否是普通 默认不是
	 */
	@DbField("cp.is_general")
	private Boolean isGeneral;

	/**
	 * 兑换码
	 */
	@DbField("cp.ex_code")
	private String exCode;

	@DbField("c.is_valid_time")
	private Boolean isValidTime;

	@DbField("c.valid_start_time")
	private Date validStartTime;

	@DbField("c.valid_end_time")
	private Date validEndTime;
}
