import { APP_ID } from '~/constants/api.constants';
import { BaseInput } from '~/core/entities/input/baseInput';

export class WarehouseItemUpdate extends BaseInput {
    /* tslint:disable variable-name */
    ID_Login: string;
    ID: number;
    DisplayName: string;
    ID_Warehouse: number;
    ID_WarehouseItemCategory: string;
    InventoryNumber: string;
    Description: string;
    PurchaseDate: string;
    ID_PurchaseType: string;
    PurchaseNote: string;
    SerialNumber: string;
    AccountNumber: string;
    PurchasePrice: number;
    ActualPrice: number;
    EventRent: boolean;
    UnitRent: boolean;
    CommercialRent: boolean;
    RentPrice: number;
    RentNote: string;
    Note: string;

    wrapper: string;

    /* tslint:enable variable-name */

    constructor(appId = APP_ID, login = null, id = null, displayName = null, warehouseId = undefined, categoryId = undefined, invNumber = null, description = null,
                purchaseDate = undefined, purchaseType = undefined, purchaseNote = null, serialNumber = null, accountNumber = null,
                purchasePrice = undefined, actualPrice = undefined, eventRent = null, unitRent = null, commercialRent = null, rentPrice = undefined,
                rentNote = null, note = null) {
        super(appId);
        this.ID_Login = login;
        this.ID = id;
        this.DisplayName = displayName;
        this.ID_Warehouse = warehouseId;
        this.ID_WarehouseItemCategory = categoryId;

        this.InventoryNumber = invNumber;
        this.Description = description;
        this.PurchaseDate = purchaseDate;
        this.ID_PurchaseType = purchaseType;
        this.PurchaseNote = purchaseNote;
        this.SerialNumber = serialNumber;
        this.AccountNumber = accountNumber;
        this.PurchasePrice = purchasePrice;
        this.ActualPrice = actualPrice;
        this.EventRent = eventRent;
        this.UnitRent = unitRent;
        this.CommercialRent = commercialRent;
        this.RentPrice = rentPrice;
        this.RentNote = rentNote;
        this.Note = note;

        this.wrapper = 'warehouseItem';
    }

    toFullString() {
        return `ID_Login: ${this.ID_Login}
ID: ${this.ID};
ID_Warehouse: ${this.ID_Warehouse}
ID_WarehouseItemCategory: ${this.ID_WarehouseItemCategory}`;
    }
}
