mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-12 05:51:08 +03:30
add pack and update items & packegs & cycles
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<?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');
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user