42 lines
890 B
PHP
Executable File
42 lines
890 B
PHP
Executable File
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
|
|
class FeXsdVersion extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $table = 'fe_xsd_versions';
|
|
|
|
protected $fillable = [
|
|
'version_label',
|
|
'original_filename',
|
|
'stored_path',
|
|
'sha256',
|
|
'created_by_user_id',
|
|
'imported_at',
|
|
'note',
|
|
'meta',
|
|
];
|
|
|
|
protected $casts = [
|
|
'imported_at' => 'datetime',
|
|
'meta' => 'array',
|
|
];
|
|
|
|
public function createdBy(): BelongsTo
|
|
{
|
|
return $this->belongsTo(User::class, 'created_by_user_id');
|
|
}
|
|
|
|
public function domains(): HasMany
|
|
{
|
|
return $this->hasMany(FeXsdCodeDomain::class, 'version_id');
|
|
}
|
|
}
|