package com.payment_system.entity;

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

public class FreezeOrder {
    private long id;
    private long userId; //用户id
    private String tradeNumber; //商家授权资金订单号
    private String authNumber; //支付宝授权资金订单号
    private String operationNumber; //支付宝的资金操作流水号
    private short status; //支付状态 0：未支付 1：已支付
    private BigDecimal amount; //订单金额
    private LocalDateTime createTime; //订单创建时间

    public FreezeOrder() {
    }

    public FreezeOrder(long id, long userId, String tradeNumber, String authNumber, String operationNumber, short status, BigDecimal amount, LocalDateTime createTime) {
        this.id = id;
        this.userId = userId;
        this.tradeNumber = tradeNumber;
        this.authNumber = authNumber;
        this.operationNumber = operationNumber;
        this.status = status;
        this.amount = amount;
        this.createTime = createTime;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    public String getTradeNumber() {
        return tradeNumber;
    }

    public void setTradeNumber(String tradeNumber) {
        this.tradeNumber = tradeNumber;
    }

    public String getAuthNumber() {
        return authNumber;
    }

    public void setAuthNumber(String authNumber) {
        this.authNumber = authNumber;
    }

    public String getOperationNumber() {
        return operationNumber;
    }

    public void setOperationNumber(String operationNumber) {
        this.operationNumber = operationNumber;
    }

    public short getStatus() {
        return status;
    }

    public void setStatus(short status) {
        this.status = status;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "FeezeOrder{" +
                "id=" + id +
                ", userId=" + userId +
                ", tradeNumber='" + tradeNumber + '\'' +
                ", authNumber='" + authNumber + '\'' +
                ", operationNumber='" + operationNumber + '\'' +
                ", status=" + status +
                ", amount=" + amount +
                ", createTime=" + createTime +
                '}';
    }
}
