*/ public function city(): BelongsTo { return $this->belongsTo(City::class); } /** * Character that commissioned the building. * * @return BelongsTo */ public function owner(): BelongsTo { return $this->belongsTo(Character::class, 'owner_character_id'); } /** * Get the attributes that should be cast. * * @return array */ protected function casts(): array { return [ 'pos_x' => 'float', 'pos_z' => 'float', 'width' => 'float', 'depth' => 'float', 'height' => 'float', 'is_complete' => 'boolean', 'build_progress' => 'integer', ]; } }