package com.cyksj.model.views;

/*
 *项目名: netflix
 *文件名: LuckyDrawRecordView
 *创建者: JavaZou
 *创建时间:2022/12/28 16:56
 */

import com.cyksj.model.entity.LuckyDraw;
import com.cyksj.model.entity.LuckyDrawRecord;
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;

@Getter
@Setter
@SearchBean(tables = "lucky_draw_record lr" +
		" left join coupon c on c.id = lr.coupon_id" +
		" left join goods_don gd on gd.id = lr.goods_id" +
		" left join goods_don_sku gdk on gdk.id = lr.sku_id")
public class LuckyDrawRecordView {
	@DbField("lr.id")
	private Long id;

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

	@DbField("lr.type")
	private LuckyDraw.Type type;

	@DbField("lr.name")
	private String name;

	@DbIgnore
	private String nickname;

	@DbField("lr.points")
	private Integer points;

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

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

	@DbField("lr.goods_id")
	private Long goodsId;

	@DbField("gd.title")
	private String goodsName;

	@DbField("lr.sku_id")
	private Long skuId;

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

	@DbField("lr.ex_code")
	private String exCode;

	@DbField("lr.picture")
	private String picture;

	@DbField("lr.cost")
	private Integer cost;

	@DbField("lr.days")
	private Integer days;

	@DbField("lr.draw_type")
	private LuckyDraw.DrawType drawType;

	@DbField("lr.status")
	private LuckyDrawRecord.Status status;

	@DbField("lr.created_time")
	private Date createdTime;
}
