52 lines
1.2 KiB
PHP
52 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Database\Factories\ProfileFactory;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class Profile extends Model
|
|
{
|
|
/** @use HasFactory<ProfileFactory> */
|
|
use HasFactory;
|
|
|
|
protected $fillable = [
|
|
'user_id',
|
|
'salutation_key',
|
|
'title',
|
|
'first_name',
|
|
'last_name',
|
|
'phone',
|
|
'address',
|
|
'country_code',
|
|
'birthdate',
|
|
'backlink_url',
|
|
'show_stats',
|
|
'validation_date',
|
|
'contract_date',
|
|
'validate_token',
|
|
'tax_id_number',
|
|
'tax_exempt',
|
|
'tax_exempt_reason',
|
|
'disable_footer_code',
|
|
];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'birthdate' => 'date',
|
|
'show_stats' => 'boolean',
|
|
'validation_date' => 'datetime',
|
|
'contract_date' => 'datetime',
|
|
'tax_exempt' => 'boolean',
|
|
'disable_footer_code' => 'boolean',
|
|
];
|
|
}
|
|
|
|
public function user(): BelongsTo
|
|
{
|
|
return $this->belongsTo(User::class);
|
|
}
|
|
}
|