|Provider newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|Provider newQuery() * @method static \Illuminate\Database\Eloquent\Builder|Provider onlyTrashed() * @method static \Illuminate\Database\Eloquent\Builder|Provider query() * @method static \Illuminate\Database\Eloquent\Builder|Provider withTrashed(bool $withTrashed = true) * @method static \Illuminate\Database\Eloquent\Builder|Provider withoutTrashed() * @mixin \Eloquent */ class Provider extends Model { use HasFactory, SoftDeletes; protected $table = "providers"; protected $guarded = ["id"]; /** * Get the attributes that should be cast. * * @return array */ protected function casts(): array { return [ "birth_date" => "date", "selfie_verified" => "boolean", "document_verified" => "boolean", "is_approved" => "boolean", "average_rating" => "decimal:1", "daily_price_8h" => "decimal:2", "daily_price_6h" => "decimal:2", "daily_price_4h" => "decimal:2", "daily_price_2h" => "decimal:2", "total_services" => "integer", ]; } /** * @return BelongsTo */ public function user(): BelongsTo { return $this->belongsTo(User::class, "user_id"); } /** * @return BelongsTo */ public function profileMedia(): BelongsTo { return $this->belongsTo(Media::class, "profile_media_id"); } }