package com.cyksj.model.views;

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

import java.util.Date;

/*
 *项目名: netflix
 *文件名: UserTicketClearedRecordView
 *创建者: JavaZou
 *创建时间:2023/3/7 17:09
 */
@Getter
@Setter
@SearchBean(tables = "user_ticket_cleared_record ur left join account a on a.id = ur.account_id" +
		" left join goods_don g on g.id = ur.goods_id left join goods_don_sku gdk on gdk.id = ur.sku_id" +
		" left join user u on u.id = ur.user_id left join corp_user cu on cu.unionid = u.unionid and cu.unionid != ''",
		where = "ur.deleted is true")
public class UserTicketClearedRecordView {
	@DbField("ur.id")
	private Long recordId;

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

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

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

	@DbField("ur.relation_id")
	private Long relationId;

	@DbField("ur.num")
	private Integer num;

	@DbField("ur.account_id")
	private Long accountId;

	@DbField("ur.account")
	private String account;

	@DbField("a.password")
	private String password;

	@DbField("ur.source")
	private UserTicketClearedRecord.Source source;

	@DbField("ur.start_time")
	private Date startTime;

	@DbField("ur.expiry_time")
	private Date expiryTime;

	@DbField("ur.deleted")
	private Boolean deleted;

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

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

	@DbField("u.nickname")
	private String nickname;

	@DbField("u.headimgurl")
	private String img;

	@DbField("if(cu.id is null,false,true)")
	private Boolean isCorpWx;
}

