package com.payment_system.entity;

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

public class TradeOrder {
    private long id;
    private long userId; //用户id
    private String tradeNumber; //商家交易订单号
    private short status; //支付状态 0：未支付 1：已支付
    private BigDecimal amount; //订单金额
    private BigDecimal balance; //余额
    private LocalDateTime createTime; //订单创建时间

    public TradeOrder() {
    }

    public TradeOrder(long id, long userId, String tradeNumber, short status, BigDecimal amount, BigDecimal balance, LocalDateTime createTime) {
        this.id = id;
        this.userId = userId;
        this.tradeNumber = tradeNumber;
        this.status = status;
        this.amount = amount;
        this.balance = balance;
        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 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 BigDecimal getBalance() {
        return balance;
    }

    public void setBalance(BigDecimal balance) {
        this.balance = balance;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

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

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