package com.cyksj.model.views;

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;

/*
 *项目名: netflix
 *文件名: ExchangeCodeView
 *创建者: JavaZou
 *创建时间:2022/11/7 16:25
 */
@Getter
@Setter
@SearchBean(tables = "exchange_code ec left join user u on u.id = ec.user_id",
		where = "ec.type = 0 :condition:")
public class ExchangeCodeView {
	@DbField("ec.id")
	private Long id;

	@DbField("ec.code")
	private String code;

	@DbField("ec.sku_ids")
	private String skuIds;

	/**
	 * 平台规格
	 */
	@DbIgnore
	private String title;

	/**
	 * 使用状态
	 */
	@DbField("ec.use_status")
	private Boolean useStatus;

	/**
	 * 使用时间
	 */
	@DbField("ec.use_time")
	private Date useTime;

	/**
	 * 使用人id
	 */
	@DbField("ec.user_id")
	private Long userId;

	@DbField("ec.operator")
	private String operator;

	/**
	 * 用户昵称
	 */
	@DbField("u.nickname")
	private String nickName;

	/**
	 * 兑换形式 1兑换码 2兑换链接
	 */
	@DbField("ec.code_type")
	private Integer codeType;

	@DbIgnore
	private Long orderId;

	/**
	 * 生成日期
	 */
	@DbField("ec.created_time")
	private Date createdTime;
}
