package com.cyksj.model.views;

import com.ejlchina.searcher.bean.DbField;
import com.ejlchina.searcher.bean.SearchBean;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;

/**
 * 项目名: yhlxj
 * 文件名: ExternalExchangeCodeView
 * 创建者: JavaZou
 * 创建时间:2024/6/11 15:02
 */
@Getter
@Setter
@SearchBean(tables = "exchange_code ec left join user u on u.id = ec.user_id" +
		" left join goods_don gd on ec.goods_id = gd.id" +
		" left join goods_don_sku gdk on gdk.id = ec.sku_id",
		where = "ec.type = 0",
		orderBy = "ec.id desc")
public class ExternalExchangeCodeView {
	@DbField("ec.id")
	private Long id;

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

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

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

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

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

	/**
	 * 规格名称,金额
	 */
	@DbField("gdk.spec_val")
	private String specVal;

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

	/**
	 * 订单状态
	 */
	@DbField("ec.order_status")
	private String orderStatus;

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

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

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