initial: bootstrap from BukidBountyApp base
This commit is contained in:
44
app/Models/Market/MainOrganization.php
Normal file
44
app/Models/Market/MainOrganization.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Models\Market;
|
||||
|
||||
use App\Models\Model;
|
||||
use App\Models\User;
|
||||
|
||||
class MainOrganization extends Model
|
||||
{
|
||||
protected ?string $table = 'main_organizations';
|
||||
|
||||
protected array $fillable = [
|
||||
'organization_id',
|
||||
'role',
|
||||
'priority',
|
||||
'is_active',
|
||||
'metadata',
|
||||
'created_by',
|
||||
'updated_by',
|
||||
];
|
||||
|
||||
protected array $casts = [
|
||||
'is_active' => 'boolean',
|
||||
'priority' => 'integer',
|
||||
'metadata' => 'array',
|
||||
];
|
||||
|
||||
public function organization()
|
||||
{
|
||||
return $this->belongsTo(Organization::class, 'organization_id');
|
||||
}
|
||||
|
||||
public function creator()
|
||||
{
|
||||
return $this->belongsTo(User::class, 'created_by');
|
||||
}
|
||||
|
||||
public function updater()
|
||||
{
|
||||
return $this->belongsTo(User::class, 'updated_by');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user