package com.cyksj.model.views;

import com.cyksj.model.entity.OrderDon;
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;

/*
 *项目名: netflix
 *文件名: RegisterDistributeOrdersDetailView
 *创建者: JavaZou
 *创建时间:2022/12/15 11:22
 */
@Getter
@Setter
@SearchBean(tables = "distribute_waiting_send_points dw left join order_don od on od.id = dw.order_id and dw.is_vip = false" +
		" left join vip_order_don vod on vod.id = dw.order_id and dw.is_vip = true" +
		" left join goods_don gd on gd.id = ifnull(od.goods_id,vod.goods_id)")
public class RegisterDistributeOrdersDetailView {

	@DbField("ifnull(od.created_time,vod.created_time)")
	private Date createdTime;

	@DbField("ifnull(od.money,vod.money)")
	private BigDecimal money;

	@DbField("ifnull(od.status,vod.status)")
	private OrderDon.Status status;

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

	@DbIgnore
	private String nickname;

	@DbField("gd.id")
	private Long goodsId;

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

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

	@DbIgnore
	private String specVal;
}
