package com.utopiaindustries.model.ctp;

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

public class InventoryTransactionLeg {

    public enum Type{
        IN,
        OUT
    }

    private long id;
    private long transactionId;
    private long itemId;
    private String sku;
    private String type;
    private BigDecimal quantity;
    private Integer accountId;
    private BigDecimal balance;
    private LocalDateTime transactionLegDateTime;
    private String parentDocumentType;
    private long parentDocumentId;
    private String parentDocumentPieceType;

    //wrapper
    private InventoryTransaction transaction;

    public long getId() {
        return id;
    }

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

    public long getTransactionId() {
        return transactionId;
    }

    public void setTransactionId(long transactionId) {
        this.transactionId = transactionId;
    }

    public long getItemId() {
        return itemId;
    }

    public void setItemId(long itemId) {
        this.itemId = itemId;
    }

    public String getSku() {
        return sku;
    }

    public void setSku(String sku) {
        this.sku = sku;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public BigDecimal getQuantity() {
        return quantity;
    }

    public void setQuantity(BigDecimal quantity) {
        this.quantity = quantity;
    }

    public Integer getAccountId() {
        return accountId;
    }

    public void setAccountId(Integer accountId) {
        this.accountId = accountId;
    }

    public BigDecimal getBalance() {
        return balance;
    }

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

    public LocalDateTime getTransactionLegDateTime() {
        return transactionLegDateTime;
    }

    public void setTransactionLegDateTime(LocalDateTime transactionLegDateTime) {
        this.transactionLegDateTime = transactionLegDateTime;
    }

    public String getParentDocumentType() {
        return parentDocumentType;
    }

    public void setParentDocumentType(String parentDocumentType) {
        this.parentDocumentType = parentDocumentType;
    }

    public long getParentDocumentId() {
        return parentDocumentId;
    }

    public void setParentDocumentId(long parentDocumentId) {
        this.parentDocumentId = parentDocumentId;
    }

    public String getParentDocumentPieceType() {
        return parentDocumentPieceType;
    }

    public void setParentDocumentPieceType(String parentDocumentPieceType) {
        this.parentDocumentPieceType = parentDocumentPieceType;
    }

    public InventoryTransaction getTransaction() {
        return transaction;
    }

    public void setTransaction(InventoryTransaction transaction) {
        this.transaction = transaction;
    }

    @Override
    public String toString() {
        return "InventoryTransactionLeg{" +
                "id=" + id +
                ", transactionId=" + transactionId +
                ", itemId=" + itemId +
                ", sku='" + sku + '\'' +
                ", type='" + type + '\'' +
                ", quantity=" + quantity +
                ", accountId=" + accountId +
                ", balance=" + balance +
                ", transactionLegDateTime=" + transactionLegDateTime +
                ", parentDocumentType='" + parentDocumentType + '\'' +
                ", parentDocumentId=" + parentDocumentId +
                ", parentDocumentPieceType='" + parentDocumentPieceType + '\'' +
                ", transaction=" + transaction +
                '}';
    }
}
