package com.cyksj.model.manage.views;

import com.cyksj.model.entity.GoodsDon;
import com.cyksj.model.entity.OrderDon;
import com.cyksj.model.entity.OrderDonTransport;
import com.cyksj.model.entity.OrderDonWaybill;
import com.cyksj.model.views.GoodsDonSkuView;
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;
import java.util.List;

/*
 *项目名: netflix
 *文件名: OrderDonBackView
 *创建者: JavaZou
 *创建时间:2023/4/26 17:49
 */
@Getter
@Setter
@SearchBean(tables = "order_don o left join goods_don g on g.id = o.goods_id" +
		" left join order_don_transport odt on odt.order_id = o.id" +
		" left join goods_don_sku sku on sku.id = o.sku_id" +
		" :tb:",
		where = ":condition:"
)
public class OrderDonBackView {
	@DbField("o.id")
	private Long id;

	@DbIgnore
	private String channel;

	@DbField("o.relation_id")
	private Long relationId;

	/**
	 * 是否是额外硬塞的虚拟车票订单
	 */
	@DbField("o.is_ot")
	private Boolean isOt;

	/**
	 * 邀请制用户账号
	 */
	@DbIgnore
	private String account;

	/**
	 * 主账号
	 */
	@DbIgnore
	private String gtAccount;

	/**
	 * 激活码
	 */
	@DbIgnore
	private String actCode;

	@DbField("g.type")
	private Integer goodsDonType;

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

	@DbField("o.transaction_id")
	private String transactionId;

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

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

	@DbField("g.special_type")
	private GoodsDon.SpecialType specialType;

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

	/**
	 * 平台id
	 */
	@DbField("o.goods_id")
	private Long goodsId;

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

	@DbField("sku.is_benefits")
	private Boolean isBenefits;

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

	@DbIgnore
	private String nickname;

	@DbIgnore
	private String register;

	/**
	 * 登录注册手机号
	 */
	@DbIgnore
	private String loginPhone;

	/**
	 * 登录注册邮箱
	 */
	@DbIgnore
	private String email;

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

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

	@DbField("o.gc_cash")
	private BigDecimal gcCash;

	@DbField("o.refund_money")
	private BigDecimal refundMoney;

	/**
	 * 银河币
	 */
	@DbIgnore
	private BigDecimal galaxyCoin;

	/**
	 * 银河币抵扣金额
	 */
	@DbIgnore
	private BigDecimal galaxyCoinDeductMoney;

	@DbField("o.refund_balance")
	private BigDecimal refundBalance;

	@DbField("o.status")
	private OrderDon.Status status;

	@DbField("o.type")
	private OrderDon.Type type;

	@DbField("o.order_type")
	private Integer orderType;

	@DbField("o.source")
	private OrderDon.Source source;

	@DbField("o.label_source")
	private String labelSource;

	@DbField("o.tv_type")
	private Integer tvType;

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

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

	/**
	 * 是否是镜像服务
	 */
	@DbField("sku.is_mirror")
	private Boolean isMirror;


	@DbField("o.num")
	private Integer num;

	@DbField("o.created_time")
	private Date createdTime;

	@DbField("o.coupon_user_id")
	private Long couponUserId;

	@DbField("o.coupon_id")
	private Long couponId;

	@DbIgnore
	private String couponName;

	@DbField("o.coupon_money")
	private BigDecimal couponMoney;

	@DbField("o.popularize_id")
	private Long popularizeId;

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

	@DbField("o.is_dp")
	private Boolean isDp;

	@DbField("o.pay_title")
	private String payTitle;

	@DbField("o.ex_code")
	private String exCode;

	@DbField("o.sub_node")
	private String subNode;

	/**
	 * 收货人
	 */
	@DbField("odt.receiver")
	private String receiver;

	/**
	 * 手机号
	 */
	@DbField("odt.phone")
	private String phone;

	/**
	 * 省份
	 */
	@DbField("odt.province")
	private String province;

	/**
	 * 城市
	 */
	@DbField("odt.city")
	private String city;

	/**
	 * 区/县
	 */
	@DbField("odt.district")
	private String district;

	/**
	 * 详细地址
	 */
	@DbField("odt.address")
	private String address;

	/**
	 * 下单手机号
	 */
	@DbField("o.phone")
	private String orderPhone;

	@DbField("o.yhs_id")
	private Long yhsId;

	/**
	 * 店铺自定义id
	 */
	@DbIgnore
	private String customId;

	/**
	 * 店铺名
	 */
	@DbIgnore
	private String shopName;

	@DbIgnore
	private OrderDonWaybill waybill;

	@DbIgnore
	private OrderDonTransport transport;

	@DbIgnore
	private String beforeServiceName;

	@DbIgnore
	private String afterServiceName;

	/**
	 * 是否可领取实物购买权益
	 */
	@DbIgnore
	private Boolean isHasBenefits;

	@DbIgnore
	private List<GoodsDonSkuView> benefitsViews;

	/**
	 * 客服id
	 */
	@DbIgnore
	private Long cmsUserId;

	/**
	 * 客服名
	 */
	@DbIgnore
	private String serviceName;

	@DbField("sku.mj_fast_num")
	private Integer mjFastNum;

	@DbField("sku.mj_relax_num")
	private Integer mjRelaxNum;

	@DbIgnore
	private Date oriPayTime;

	@DbIgnore
	private String oriSpecVal;

	@DbIgnore
	private String expiryTime;

	/**
	 * 补差价平台
	 */
	@DbIgnore
	private Long diffGoodsId;

	@DbIgnore
	private String diffTitle;

	@DbIgnore
	private String diffOperator;

	/**
	 * 开通状态
	 */
	@DbIgnore
	private Boolean isTp;
}