package com.huiju.estateagents.redpack.entity;

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

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;

/**
 * <p>
 * 组织订单表
 * </p>
 *
 * @author fxf
 * @since 2020-06-03
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class TaOrgOrder implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 订单ID
     */
    @TableId(value = "order_id", type = IdType.UUID)
    private String orderId;

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

    /**
     * 交易号
     */
    private String tradeNo;

    /**
     * 发生金额 单位分
     */
    private Integer amount;

    /**
     * 发生时间
     */
    private LocalDateTime createDate;

    /**
     * 过期时间
     */
    private LocalDateTime expiryDate;

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

    /**
     * 微信订单ID
     */
    private String wxOrderId;

    /**
     * 备注
     */
    private String remark;

    /**
     * 状态 记录是否有效
     */
    private Integer status;

    /**
     * 交易状态 进行中,成功,失败
     */
    private String tradingStatus;

    /**
     * 线下操作
     */
    private Boolean isOffline;

    /**
     * 下单人
     */
    private Integer userId;

    /**
     * 下单人名称
     */
    private String userName;

    @TableField(exist = false)
    private String miniAppName;

    @TableField(exist = false)
    private String certificateUrl;

    @TableField(exist = false)
    private List<String> certificateUrlList;

    @TableField(exist = false)
    private List<TaOrgAccountCertificate> certificateList;

    @TableField(exist = false)
    private String auditStatus;

    @TableField(exist = false)
    private String auditResult;

    @TableField(exist = false)
    private String phone;

    /**
     * 接收红包人昵称
     */
    @TableField(exist = false)
    private String nickname;

    /**
     * 子订单金额
     */
    @TableField(exist = false)
    private String detailAmount;

    /**
     * 接受红包人头像
     */
    @TableField(exist = false)
    private String avatarurl;

    /**
     * 消费方式
     */
    @TableField(exist = false)
    private String consumeType;

    /**
     * 活动名称
     */
    @TableField(exist = false)
    private String activityName;

    /**
     * 账户实际余额
     */
    @TableField(exist = false)
    private Integer realBalance;

    /**
     * 账户可用余额
     */
    @TableField(exist = false)
    private Integer availableBalance;

    /**
     * 实付金额
     */
    private Integer realAmount;

    /**
     * 用户姓名
     */
    @TableField(exist = false)
    private String name;

}
