package com.utopiaindustries.model.ctp;

import org.springframework.format.annotation.DateTimeFormat;

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

public class Bundle implements InventoryArtifact {

    private long id;
    private long itemId;
    private String sku;
    private BigDecimal wrapQuantity;
    private BigDecimal production;
    private BigDecimal currentProduction;
    private String barcode;
    private String type;
    private String createdBy;
    @DateTimeFormat( pattern = "yyyy-MM-dd HH:mm:ss" )
    private LocalDateTime createdAt;
    private long jobCardId;
    private long masterBundleId;

    // wrapper
    private MasterBundle masterBundle;

    public long getId() {
        return id;
    }

    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 BigDecimal getWrapQuantity() {
        return wrapQuantity;
    }

    public void setWrapQuantity(BigDecimal wrapQuantity) {
        this.wrapQuantity = wrapQuantity;
    }

    public String getBarcode() {
        return barcode;
    }

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

    public String getType() {
        return type;
    }

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

    public String getCreatedBy() {
        return createdBy;
    }

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

    public LocalDateTime getCreatedAt() {
        return createdAt;
    }

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

    public long getJobCardId() {
        return jobCardId;
    }

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

    public long getMasterBundleId() {
        return masterBundleId;
    }

    public BigDecimal getProduction() {
        return production;
    }

    public void setProduction(BigDecimal production) {
        this.production = production;
    }

    public BigDecimal getCurrentProduction() {
        return currentProduction;
    }

    public void setCurrentProduction(BigDecimal currentProduction) {
        this.currentProduction = currentProduction;
    }

    public void setMasterBundleId(long masterBundleId) {
        this.masterBundleId = masterBundleId;
    }

    public MasterBundle getMasterBundle() {
        return masterBundle;
    }

    public void setMasterBundle(MasterBundle masterBundle) {
        this.masterBundle = masterBundle;
    }

    public long getBundleId(){
        return 0;
    }

    @Override
    public String toString() {
        return "Bundle{" +
                "id=" + id +
                ", itemId=" + itemId +
                ", sku='" + sku + '\'' +
                ", wrapQuantity=" + wrapQuantity +
                ", barcode='" + barcode + '\'' +
                ", type='" + type + '\'' +
                ", createdBy='" + createdBy + '\'' +
                ", createdAt=" + createdAt +
                ", jobCardId=" + jobCardId +
                ", masterBundleId=" + masterBundleId +
                ", masterBundle=" + masterBundle +
                '}';
    }
}
