package com.utopiaindustries.model.ctp;

import org.springframework.format.annotation.DateTimeFormat;

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

public class FinishedItem 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 boolean isQa;
    private long stitchedItemId;
    private boolean isSegregated;
    private String qaRemarks;
    // wrapper
    private JobCard jobCard;
    private long accountId;
    private String qaStatus;
    private boolean isPackaging;
    private boolean isStore;

    @DateTimeFormat( pattern = "yyyy-MM-dd HH:mm:ss" )
    private LocalDateTime operationDate;

    public long getId() {
        return id;
    }

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

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

    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 getBarcode() {
        return barcode;
    }

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

    public LocalDateTime getCreatedAt() {
        return createdAt;
    }

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

    public String getCreatedBy() {
        return createdBy;
    }

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

    public long getJobCardId() {
        return jobCardId;
    }

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

    public boolean getIsQa() {
        return isQa;
    }

    public void setIsQa(boolean qa) {
        isQa = qa;
    }

    public long getStitchedItemId() {
        return stitchedItemId;
    }

    public void setStitchedItemId(long stitchedItemId) {
        this.stitchedItemId = stitchedItemId;
    }

    public JobCard getJobCard() {
        return jobCard;
    }

    public void setJobCard(JobCard jobCard) {
        this.jobCard = jobCard;
    }

    public boolean getIsSegregated() {
        return isSegregated;
    }

    public void setIsSegregated(boolean segregated) {
        isSegregated = segregated;
    }

    public String getQaRemarks() {
        return qaRemarks;
    }

    public void setQaRemarks(String qaRemarks) {
        this.qaRemarks = qaRemarks;
    }

    public long getAccountId() {
        return accountId;
    }

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

    public String getQaStatus() {
        return qaStatus;
    }

    public void setQaStatus(String qaStatus) {
        this.qaStatus = qaStatus;
    }

    public BigDecimal getWrapQuantity(){
        return null;
    }

    public long getMasterBundleId(){
        return 0;
    }

    public long getBundleId(){
        return 0;
    }

    public boolean isPackaging() {
        return isPackaging;
    }

    public void setPackaging(boolean packaging) {
        isPackaging = packaging;
    }

    public LocalDateTime getOperationDate() {
        return operationDate;
    }

    public void setOperationDate(LocalDateTime operationDate) {
        this.operationDate = operationDate;
    }

    public boolean isStore() {
        return isStore;
    }

    public void setStore(boolean store) {
        isStore = store;
    }

    @Override
    public String toString() {
        return "FinishedItem{" +
                "id=" + id +
                ", itemId=" + itemId +
                ", sku='" + sku + '\'' +
                ", barcode='" + barcode + '\'' +
                ", jobCardId=" + jobCardId +
                ", createdAt=" + createdAt +
                ", createdBy='" + createdBy + '\'' +
                ", isQa=" + isQa +
                ", stitchedItemId=" + stitchedItemId +
                ", isSegregated=" + isSegregated +
                ", qaRemarks='" + qaRemarks + '\'' +
                ", jobCard=" + jobCard +
                ", accountId=" + accountId +
                ", qaStatus='" + qaStatus + '\'' +
                '}';
    }
}
