|Address newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|Address newQuery() * @method static \Illuminate\Database\Eloquent\Builder|Address onlyTrashed() * @method static \Illuminate\Database\Eloquent\Builder|Address query() * @method static \Illuminate\Database\Eloquent\Builder|Address whereAddress($value) * @method static \Illuminate\Database\Eloquent\Builder|Address whereAddressType($value) * @method static \Illuminate\Database\Eloquent\Builder|Address whereCityId($value) * @method static \Illuminate\Database\Eloquent\Builder|Address whereComplement($value) * @method static \Illuminate\Database\Eloquent\Builder|Address whereCreatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|Address whereDeletedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|Address whereDistrict($value) * @method static \Illuminate\Database\Eloquent\Builder|Address whereHasComplement($value) * @method static \Illuminate\Database\Eloquent\Builder|Address whereId($value) * @method static \Illuminate\Database\Eloquent\Builder|Address whereInstructions($value) * @method static \Illuminate\Database\Eloquent\Builder|Address whereIsPrimary($value) * @method static \Illuminate\Database\Eloquent\Builder|Address whereLatitude($value) * @method static \Illuminate\Database\Eloquent\Builder|Address whereLongitude($value) * @method static \Illuminate\Database\Eloquent\Builder|Address whereNickname($value) * @method static \Illuminate\Database\Eloquent\Builder|Address whereNumber($value) * @method static \Illuminate\Database\Eloquent\Builder|Address whereSource($value) * @method static \Illuminate\Database\Eloquent\Builder|Address whereSourceId($value) * @method static \Illuminate\Database\Eloquent\Builder|Address whereStateId($value) * @method static \Illuminate\Database\Eloquent\Builder|Address whereUpdatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|Address whereZipCode($value) * @method static \Illuminate\Database\Eloquent\Builder|Address withTrashed(bool $withTrashed = true) * @method static \Illuminate\Database\Eloquent\Builder|Address withoutTrashed() * @mixin \Eloquent */ class Address extends Model { use HasFactory, SoftDeletes; protected $fillable = [ 'source', 'source_id', 'zip_code', 'address', 'number', 'district', 'has_complement', 'complement', 'nickname', 'instructions', 'city_id', 'state_id', 'address_type', 'is_primary', 'latitude', 'longitude', ]; protected $casts = [ 'has_complement' => 'boolean', 'is_primary' => 'boolean', 'latitude' => 'float', 'longitude' => 'float', 'created_at' => 'datetime', 'updated_at' => 'datetime', 'deleted_at' => 'datetime', ]; public function city() { return $this->belongsTo(City::class)->select('id', 'name'); } public function state() { return $this->belongsTo(State::class)->select('id', 'name', 'code'); } }