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.math.BigDecimal;
import java.util.Date;

@Getter
@Setter
@SearchBean(tables = "groups_relation gr left join groups_trips gt on gt.id = gr.groups_id" +
		" left join account a on a.id = gt.account_id" +
		" left join goods_don gd on gd.id = a.goods_id" +
		" left join goods_don_sku gdk on gdk.id = gt.sku_id",
		where = ":condition:")
public class TicketView {
	@DbField("gr.user_id")
	private Long userId;

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

	/**
	 * 平台
	 */
	@DbField("gd.title")
	private String title;

	@DbField("gdk.price")
	private BigDecimal money;

	/**
	 * 规格
	 */
	@DbField("gdk.spec_val")
	private String specVal;

	/**
	 * 主账号
	 */
	@DbField("a.account")
	private String account;

	/**
	 * 主账号密码
	 */
	@DbField("a.password")
	private String password;

	@DbField("if(a.api_secret='',false,true)")
	private Boolean isVerify;

	/**
	 * 国区id
	 */
	@DbField("a.cn_account")
	private String cnAccount;

	@DbField("gr.id")
	private Long relationId;

	/**
	 * 座位号
	 */
	@DbField("gr.num")
	private Integer num;

	/**
	 * 过期时间
	 */
	@DbField("gr.expiry_time")
	private Date expiryTime;

	@DbField("gr.status")
	private String grStatus;

	/**
	 * 状态
	 */
	@DbField("gt.status")
	private String groupsTripStatus;

	@DbField("gdk.id")
	private Long skuId;

	@DbField("gd.status")
	private Boolean goodsStatus;

	/**
	 * 二级分类
	 * 虚物品 1邀请制 2非邀请制
	 */
	@DbField("gd.second_type")
	private Integer secondType;

	@DbField("gdk.status")
	private Boolean skuStatus;

	@DbField("gdk.months")
	private Integer months;

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

	@DbField("gdk.num")
	private Integer skuNum;

	@DbField("gdk.price")
	private BigDecimal price;

	@DbField("gdk.is_mirror")
	private Boolean isMirror;

	@DbIgnore
	private String orderNo;

	@DbIgnore
	private Long orderId;

	@DbIgnore
	private String transactionId;

	/**
	 * 邀请制是否完成
	 */
	@DbIgnore
	private Boolean isComplete;
}