mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-05-07 20:32:26 +00:00
45 lines
970 B
PHP
45 lines
970 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Models;
|
|
|
|
use Database\Factories\ClientFactory;
|
|
use Illuminate\Database\Eloquent\Concerns\HasUuids;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
/**
|
|
* @property string $id
|
|
* @property string $name
|
|
* @property string $organization_id
|
|
* @property string $created_at
|
|
* @property string $updated_at
|
|
* @property-read Organization $organization
|
|
*
|
|
* @method static ClientFactory factory()
|
|
*/
|
|
class Client extends Model
|
|
{
|
|
use HasFactory;
|
|
use HasUuids;
|
|
|
|
/**
|
|
* The attributes that should be cast.
|
|
*
|
|
* @var array<string, string>
|
|
*/
|
|
protected $casts = [
|
|
'name' => 'string',
|
|
];
|
|
|
|
/**
|
|
* @return BelongsTo<Organization, Client>
|
|
*/
|
|
public function organization(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Organization::class, 'organization_id');
|
|
}
|
|
}
|