diff --git a/app/Models/AtmTransactionReportLog.php b/app/Models/AtmTransactionReportLog.php new file mode 100644 index 0000000..09cfbbb --- /dev/null +++ b/app/Models/AtmTransactionReportLog.php @@ -0,0 +1,69 @@ + 'date', + 'downloaded_at' => 'datetime', + 'authorized_at' => 'datetime', + 'is_downloaded' => 'boolean', + 'file_size' => 'integer', + 'record_count' => 'integer', + ]; + + /** + * Get the user who created this report request. + */ + public function user(): BelongsTo + { + return $this->belongsTo(User::class, 'user_id'); + } + + /** + * Get the user who created this report request. + */ + public function creator(): BelongsTo + { + return $this->belongsTo(User::class, 'created_by'); + } + + /** + * Get the user who authorized this report request. + */ + public function authorizer(): BelongsTo + { + return $this->belongsTo(User::class, 'authorized_by'); + } +}