package com.utopiaindustries.model.ctp;

import org.springframework.format.annotation.DateTimeFormat;

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

public class StoreItem implements InventoryArtifact {

    private long id;
    private long itemId;
    private String sku;
    private String barcode;
    private long jobCardId;
    @DateTimeFormat( pattern = "yyyy-MM-dd HH:mm:ss" )
    private LocalDateTime createdAt;
    private String createdBy;
    private long finishedItemId;
    private long bundleId;
    private long accountId;
    private String rejectedReason;


    @Override
    public long getId() {
        return id;
    }

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

    @Override
    public long getItemId() {
        return itemId;
    }

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

    @Override
    public String getSku() {
        return sku;
    }

    @Override
    public String getType() {
        return "";
    }

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

    @Override
    public String getBarcode() {
        return barcode;
    }

    public void setBarcode(String barcode) {
        this.barcode = barcode;
    }

    @Override
    public long getJobCardId() {
        return jobCardId;
    }

    public void setJobCardId(long jobCardId) {
        this.jobCardId = jobCardId;
    }

    @Override
    public LocalDateTime getCreatedAt() {
        return createdAt;
    }

    @Override
    public BigDecimal getWrapQuantity() {
        return null;
    }

    @Override
    public long getMasterBundleId() {
        return 0;
    }

    public void setCreatedAt(LocalDateTime createdAt) {
        this.createdAt = createdAt;
    }

    @Override
    public String getCreatedBy() {
        return createdBy;
    }

    public void setCreatedBy(String createdBy) {
        this.createdBy = createdBy;
    }

    public long getFinishedItemId() {
        return finishedItemId;
    }

    public void setFinishedItemId(long finishedItemId) {
        this.finishedItemId = finishedItemId;
    }

    @Override
    public long getBundleId() {
        return bundleId;
    }

    public void setBundleId(long bundleId) {
        this.bundleId = bundleId;
    }

    public long getAccountId() {
        return accountId;
    }

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

    public String getRejectedReason() {
        return rejectedReason;
    }

    public void setRejectedReason(String rejectedReason) {
        this.rejectedReason = rejectedReason;
    }

    @Override
    public String toString() {
        return "StoreItem{" +
                "id=" + id +
                ", itemId=" + itemId +
                ", sku='" + sku + '\'' +
                ", barcode='" + barcode + '\'' +
                ", jobCardId=" + jobCardId +
                ", createdAt=" + createdAt +
                ", createdBy='" + createdBy + '\'' +
                ", finishedItemId=" + finishedItemId +
                ", bundleId=" + bundleId +
                ", accountId=" + accountId +
                ", rejectedReason='" + rejectedReason + '\'' +
                '}';
    }
}
