chore: initial commit of existing codebase
This commit is contained in:
commit
11e94889b2
292 files changed
+38586
No files matched your search
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class StockMovement extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = ['item_id', 'warehouse_id', 'type', 'quantity', 'reference_type', 'reference_id', 'notes', 'created_by'];
|
||||
|
||||
protected $casts = ['quantity' => 'decimal:2'];
|
||||
|
||||
public function item()
|
||||
{
|
||||
return $this->belongsTo(Item::class);
|
||||
}
|
||||
|
||||
public function warehouse()
|
||||
{
|
||||
return $this->belongsTo(Warehouse::class);
|
||||
}
|
||||
|
||||
public function createdBy()
|
||||
{
|
||||
return $this->belongsTo(\App\Models\User::class, 'created_by');
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user