update
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\DomainFluctuation\App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\Relations\HasOne;
|
||||
|
||||
class DomainFluctuationTerm extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'domain_fluctuation_terms';
|
||||
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'term_name',
|
||||
'description',
|
||||
'date_create',
|
||||
'status',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'status' => 'boolean',
|
||||
'date_create' => 'integer',
|
||||
];
|
||||
|
||||
public function fluctuations(): HasMany
|
||||
{
|
||||
return $this->hasMany(DomainFluctuation::class, 'term_id');
|
||||
}
|
||||
|
||||
public function type(): HasOne
|
||||
{
|
||||
return $this->hasOne(TermFluctuationType::class, 'term_fluctuation_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user