package com.cyksj.model.manage.views;

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

/**
 * @author chan
 * @date 2022/9/27 6:56 PM
 */
@Getter
@Setter
@SearchBean(tables = "order_don_renew_record orr left join order_don o on o.id = orr.order_id" +
        " left join goods_don g on g.id = o.goods_id" +
        " left join goods_don_sku sku on o.sku_id = sku.id")
public class RenewUpgradeOrderDonView {

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

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

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

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

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

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

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

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


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

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

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

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

    @DbField("o.refund_desc")
    private String refundDesc;

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

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

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

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

}