Files
monica/app/Models/RelationshipGroupType.php
T
2021-12-04 18:26:14 -05:00

46 lines
920 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class RelationshipGroupType extends Model
{
use HasFactory;
protected $table = 'relationship_group_types';
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'account_id',
'name',
];
/**
* Get the account associated with the relationship type.
*
* @return BelongsTo
*/
public function account()
{
return $this->belongsTo(Account::class);
}
/**
* Get the account associated with the relationship type.
*
* @return HasMany
*/
public function types()
{
return $this->hasMany(RelationshipType::class);
}
}