39 lines
962 B
PHP
39 lines
962 B
PHP
<?php
|
|
|
|
class WarehouseStocktakeItemModel extends TTCrudBaseModel {
|
|
public int $id;
|
|
public int $stocktakeId;
|
|
public int $articleId;
|
|
public ?int $warehouseItemId;
|
|
public float $countedQuantity;
|
|
public ?string $rack;
|
|
public ?string $shelf;
|
|
public ?string $note;
|
|
public ?int $scannedAt;
|
|
public ?int $scannedBy;
|
|
public int $createBy;
|
|
public int $create;
|
|
|
|
/**
|
|
* Get the article object
|
|
*/
|
|
public function getArticle(): ?WarehouseArticleModel {
|
|
return WarehouseArticleModel::get($this->articleId);
|
|
}
|
|
|
|
/**
|
|
* Get the stocktake object
|
|
*/
|
|
public function getStocktake(): ?WarehouseStocktakeModel {
|
|
return WarehouseStocktakeModel::get($this->stocktakeId);
|
|
}
|
|
|
|
/**
|
|
* Get user who scanned this item
|
|
*/
|
|
public function getScannedByUser(): ?UserModel {
|
|
if (!$this->scannedBy) return null;
|
|
return UserModel::get($this->scannedBy);
|
|
}
|
|
}
|