diff --git a/app/Models/CheckPointName.php b/app/Models/CheckPointName.php new file mode 100644 index 000000000..335aeb9f3 --- /dev/null +++ b/app/Models/CheckPointName.php @@ -0,0 +1,38 @@ +belongsTo(Plant::class); + } + + public function checkPointTimes1() + { + return $this->hasMany(CheckPointTime::class, 'check_point1_id', 'id'); + } + + public function checkPointTimes2() + { + return $this->hasMany(CheckPointTime::class, 'check_point2_id', 'id'); + } + + public function guardPatrolEntries() + { + return $this->hasMany(GuardPatrolEntry::class, 'check_point_name_id', 'id'); + } +}