Count stock and correct the differences on confirmation
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace App\Modules\Inventory\Infrastructure\Persistence\Eloquent;
|
||||
|
||||
use Illuminate\Database\Eloquent\Attributes\Fillable;
|
||||
use Illuminate\Database\Eloquent\Attributes\Table;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Carbon;
|
||||
|
||||
/**
|
||||
* Persistence model, used only inside the Inventory Infrastructure layer.
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $inventory_count_id
|
||||
* @property int $stock_item_id
|
||||
* @property int $book_quantity_milli
|
||||
* @property int $counted_quantity_milli
|
||||
* @property int|null $unit_cost_hundredths
|
||||
* @property int $counted_by
|
||||
* @property Carbon $counted_at
|
||||
*/
|
||||
#[Table('inventory_count_lines')]
|
||||
#[Fillable(['inventory_count_id', 'stock_item_id', 'book_quantity_milli', 'counted_quantity_milli', 'unit_cost_hundredths', 'counted_by', 'counted_at'])]
|
||||
class InventoryCountLineModel extends Model
|
||||
{
|
||||
/**
|
||||
* @return array<string, string>
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'inventory_count_id' => 'integer',
|
||||
'stock_item_id' => 'integer',
|
||||
'book_quantity_milli' => 'integer',
|
||||
'counted_quantity_milli' => 'integer',
|
||||
'unit_cost_hundredths' => 'integer',
|
||||
'counted_by' => 'integer',
|
||||
'counted_at' => 'immutable_datetime',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user