mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-11 02:51:06 +03:30
24 lines
538 B
PHP
24 lines
538 B
PHP
<?php
|
|
|
|
namespace App;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Pack extends Model
|
|
{
|
|
public $fillable = ['name', 'sterile_date', 'expire_date', 'sterilizer_id', 'cycle_number', 'lot_number', 'department', 'user_id', 'note'];
|
|
public function user()
|
|
{
|
|
return $this->belongsTo('App\User');
|
|
}
|
|
public function packages()
|
|
{
|
|
return $this->belongsToMany('App\Package', 'pack_package');
|
|
}
|
|
public function cycles()
|
|
{
|
|
return $this->belongsToMany('App\Cycle', 'cycle_pack');
|
|
}
|
|
|
|
}
|