package com.cyksj.model.views;

import com.ejlchina.searcher.bean.DbField;
import com.ejlchina.searcher.bean.SearchBean;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;
import java.util.Date;

/*
 *项目名: netflix
 *文件名: DistributeOrders
 *创建者: JavaZou
 *创建时间:2022/11/15 10:52
 */
@Getter
@Setter
@SearchBean(tables = "distribute_waiting_send_points dp left join order_don od on dp.order_id = od.id and dp.is_vip = false" +
		" left join vip_order_don vod on vod.id = dp.order_id and dp.is_vip = true",
		where = "ifnull(od.status,vod.status) not in ('close','noPayment','refund') :f:")
public class DistributeOrdersView {
	@DbField("dp.order_id")
	private Long id;

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

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

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