snipe-it/app/Models/Import.php
snipe 6f700ccc95 Added relationship for adminuser
Signed-off-by: snipe <snipe@snipe.net>
2024-11-13 18:42:44 +00:00

30 lines
634 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Import extends Model
{
use HasFactory;
protected $casts = [
'header_row' => 'array',
'first_row' => 'array',
'field_map' => 'json',
];
/**
* Establishes the license -> admin user relationship
*
* @author A. Gianotto <snipe@snipe.net>
* @since [v2.0]
* @return \Illuminate\Database\Eloquent\Relations\Relation
*/
public function adminuser()
{
return $this->belongsTo(\App\Models\User::class, 'created_by');
}
}