mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-10 21:51:06 +03:30
24 lines
523 B
PHP
24 lines
523 B
PHP
<?php
|
|
|
|
namespace App;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Label extends Model
|
|
{
|
|
public $fillable = ['sterile_date', 'expire_date', 'sterilizer_id', 'cycle_number', 'lot_number', 'user_id', 'package_id'];
|
|
public function user()
|
|
{
|
|
return $this->belongsTo('App\User');
|
|
}
|
|
public function package()
|
|
{
|
|
return $this->belongsTo('App\Package');
|
|
}
|
|
public function cycles()
|
|
{
|
|
return $this->belongsToMany('App\Cycle', 'cycle_label')->withPivot('count');
|
|
}
|
|
|
|
}
|