package com.huiju.estateagents.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 订单表 
 * </p>
 *
 * @author jobob
 * @since 2020-02-26
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class TaOrder implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 订单id
     */
    @TableId(value = "order_id", type = IdType.AUTO)
    private Integer orderId;

    /**
     * 公司id
     */
    private Integer orgId;

    /**
     * 创建时间
     */
    private LocalDateTime createDate;

    /**
     * 支付时间
     */
    private LocalDateTime payTime;

    /**
     * targetId
     */
    private String targetId;

    /**
     * targetType
     */
    private String targetType;

    /**
     * 小程序用户id
     */
    private String personId;

    /**
     * 微信订单号
     */
    private String tradeNo;

    /**
     * 实付金额 单位分
     */
    private Integer totalFee;

    /**
     * 缴费状态 unpaid未缴费paid已缴费refunded已退费
     */
    private String payStatus;

    /**
     * 如果是退费需要知道是那个订单退费
     */
    private Integer parentOrderId;

    /**
     * 微信订单号
     */
    private String transactionId;

    /**
     * 退款单号
     */
    private String refundNo;

    /**
     * 退款原因
     */
    @TableField(exist = false)
    private String refundReason;
}
