*/ use HasFactory; /** * Attributes that should be cast to native types. * * @return array */ protected function casts(): array { return [ 'last_decision' => 'array', 'last_think_at' => 'datetime', 'pos_x' => 'float', 'pos_y' => 'float', 'pos_z' => 'float', 'rotation_y' => 'float', 'error_count' => 'integer', ]; } /** * Stores managed by this agent (shopkeepers, mayors, etc.). * * @return HasMany */ public function stores(): HasMany { return $this->hasMany(Store::class, 'agent_id'); } }