From 019329867518e78680138ba4e614a9f12a4e1092 Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Mon, 23 Jun 2025 18:05:28 +0530 Subject: [PATCH] Added check_point_name model file --- app/Models/CheckPointName.php | 38 +++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 app/Models/CheckPointName.php diff --git a/app/Models/CheckPointName.php b/app/Models/CheckPointName.php new file mode 100644 index 0000000..335aeb9 --- /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'); + } +}