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

/**
 * 项目名: yhlxj
 * 文件名: UserInvoiceChosseOrderViews
 * 创建者: JavaZou
 * 创建时间:2024/12/13 16:24
 */
@Getter
@Setter
@SearchBean(tables = " (:order:) o left join user_invoice_order_relate uor on uor.order_id = o.id and uor.type = o.type" +
		" inner join goods_don g on g.id = o.goods_id and (g.id in (select goods_id from goods_don_category_relate where category = 1) or g.id = 40)" +
		" left join goods_don_sku sku on sku.id = o.sku_id" +
		" inner join shop_config sc on sc.app_id = o.shop_id",
		where = " uor.id is null :dc:",
		orderBy = "o.id desc")
public class UserInvoiceChoseOrderViews {

	@DbField("o.id")
	private Long orderId;

	@DbField("o.order_no")
	private String orderNo;

	@DbField("o.money")
	private BigDecimal money;

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

	@DbField("g.logo")
	private String logo;

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

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

	@DbField("sc.payment")
	private String zfbPayment;

	@DbField("o.pay_time")
	private Date payTime;

	@DbField("o.shop_id")
	@JsonIgnore
	private Long shopId;

	/**
	 * 普通订单
	 */
	@DbField("o.type")
	private Integer type;
}
