package com.sckw.payment.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 结算-交易订单
 * @author xucaiqin
 * @date 2023-07-18 14:51:38
 */
@Getter
@Setter
@ToString
@TableName(value = "kwp_settlement_trade")
public class KwpSettlementTrade {
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.INPUT)
    private Long id;

    /**
     * 企业id
     */
    @TableField(value = "ent_id")
    private Long entId;

    /**
     * 交易订单对账id
     */
    @TableField(value = "t_ledger_id")
    private Long tLedgerId;

    /**
     * 结算单编号
     */
    @TableField(value = "st_order_no")
    private String stOrderNo;

    /**
     * 结算单名称
     */
    @TableField(value = "`name`")
    private String name;

    /**
     * 对账金额（对账单表的实际结算金额字段settle_price）
     */
    @TableField(value = "total_price")
    private BigDecimal totalPrice;

    /**
     * 已收款/元
     */
    @TableField(value = "actual_price")
    private BigDecimal actualPrice;

    /**
     * 预计收款日期
     */
    @TableField(value = "receipt_time")
    private LocalDateTime receiptTime;
    /**
     * 对账采购财务联系人
     */
    @TableField(value = "audit_user_id")
    private Long auditUserId;
    /**
     * 对账采购财务联系人名称
     */
    @TableField(value = "audit_user")
    private String auditUser;

    /**
     * 对账采购财务联系人电话
     */
    @TableField(value = "audit_phone")
    private String auditPhone;

    /**
     * 对账销售财务联系人
     */
    @TableField(value = "success_user_id")
    private Long successUserId;

    /**
     * 对账销售财务联系人名称
     */
    @TableField(value = "success_user")
    private String successUser;

    /**
     * 对账销售财务联系人电话
     */
    @TableField(value = "success_phone")
    private String successPhone;
    /**
     * 冗余字段，写统计接口时增加
     */
    @TableField(value = "trading")
    private String trading;
    /**
     * 备注
     */
    @TableField(value = "remark")
    private String remark;

    /**
     * 状态（待回款、部分回款、全部回款、回退）
     */
    @TableField(value = "`status`")
    private Integer status;

    @TableField(value = "create_by")
    private Long createBy;

    @TableField(value = "create_time")
    private LocalDateTime createTime;

    @TableField(value = "update_by")
    private Long updateBy;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private LocalDateTime updateTime;

    /**
     * 是否删除（0未删除，1删除）
     */
    @TableField(value = "del_flag")
    private Integer delFlag;
}
