package com.cyksj.model.views;

import com.cyksj.model.entity.UserBenefits;
import com.ejlchina.searcher.bean.DbField;
import com.ejlchina.searcher.bean.DbIgnore;
import com.ejlchina.searcher.bean.SearchBean;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;
import java.util.List;

/**
 * 项目名: yhlxj2
 * 文件名: UserBenefitsView
 * 创建者: JavaZou
 * 创建时间:2024/9/23 14:29
 */
@Getter
@Setter
@SearchBean(tables = "user_benefits ub left join goods_don g on g.id = ub.goods_id" +
		" left join goods_don_sku sku on sku.id = ub.sku_id")
public class UserBenefitsView {
	@DbField("ub.id")
	private Long id;

	/**
	 * 权益类型
	 */
	@DbField("ub.type")
	private UserBenefits.Type type;

	/**
	 * 生效平台
	 */
	@DbField("ub.goods_id")
	private Long goodsId;

	@DbField("g.title")
	private String title;

	/**
	 * 实物套餐权益 生效套餐ids
	 */
	@DbField("ub.combo_sku_ids")
	private String comboSkuIds;

	/**
	 * 续费减免生效规格（购买那个规格可享受权益）
	 */
	@DbField("ub.sku_id")
	private Long skuId;

	@DbField("sku.spec_val")
	private String specVal;

	/**
	 * 续费减免配置
	 */
	@DbField("ub.renew_config")
	private String renewConfig;

	/**
	 * 续费减免配置
	 */
	@DbIgnore
	private List<UserBenefits.RenewConfig> renewConfigList;

	/**
	 * 续费减免前几次减免
	 */
	@DbField("ub.start_renew")
	private Integer startRenew;

	@DbField("ub.sorted")
	private Integer sorted;

	@DbField("ub.status")
	private Boolean status;

	@DbField("ub.description")
	private String description;

	@DbField("ub.created_time")
	private Date createdTime;

	@DbField("ub.update_time")
	private Date updateTime;
}
