feat : 자재관리, 수입관리, 로트관리 모델링 추가
This commit is contained in:
23
app/Models/Lot.php
Normal file
23
app/Models/Lot.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class Lot extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
// 자재 마스터
|
||||
public function material()
|
||||
{
|
||||
return $this->belongsTo(Material::class, 'material_id');
|
||||
}
|
||||
|
||||
// 판매 기록
|
||||
public function sales()
|
||||
{
|
||||
return $this->hasMany(LotSale::class, 'lot_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user