| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Factories\HasFactory;
- use Illuminate\Database\Eloquent\Model;
- use Illuminate\Database\Eloquent\SoftDeletes;
- use Illuminate\Database\Eloquent\Relations\BelongsTo;
- use Illuminate\Database\Eloquent\Relations\HasMany;
- class Client extends Model
- {
- use HasFactory, SoftDeletes;
- protected $fillable = [
- 'document',
- 'user_id',
- ];
- protected $casts = [
- 'created_at' => 'datetime',
- 'updated_at' => 'datetime',
- 'deleted_at' => 'datetime',
- ];
- /**
- * @return BelongsTo
- */
- public function user(): BelongsTo
- {
- return $this->belongsTo(User::class);
- }
- /**
- * @return HasMany
- */
- public function blockedByProviders(): HasMany
- {
- return $this->hasMany(ProviderClientBlock::class);
- }
- /**
- * @return HasMany
- */
- public function blockedProviders(): HasMany
- {
- return $this->hasMany(ClientProviderBlock::class);
- }
- }
|