[ 'type' => Schema::DT_VARCHAR128, 'nullable' => false, 'default' => '', 'index' => true, 'unique' => true ], 'security' => [ 'type' => Schema::DT_VARCHAR128, 'nullable' => false, 'default' => '' ], 'massTotal' => [ 'type' => Schema::DT_VARCHAR128, // varchar because > max int value 'nullable' => false, 'default' => 0 ], 'massIndividual' => [ 'type' => Schema::DT_VARCHAR128, // varchar because > max int value 'nullable' => false, 'default' => 0 ], 'massRegeneration' => [ 'type' => Schema::DT_VARCHAR128, // varchar because > max int value 'nullable' => false, 'default' => 0 ], 'maxStableTime' => [ 'type' => Schema::DT_INT, 'nullable' => false, 'default' => 1, 'index' => true, ] ]; /** * No static columns added * @var bool */ protected $addStaticFields = false; /** * get wormhole data as object * @return object */ public function getData(){ $systemStaticData = (object) []; $systemStaticData->name = $this->name; $systemStaticData->security = $this->security; // total (max) available wormhole mass $systemStaticData->massTotal = $this->massTotal; // individual jump mass (max) per jump $systemStaticData->massIndividual = $this->massIndividual; // lifetime (max) for this wormhole $systemStaticData->maxStableTime = $this->maxStableTime; // mass regeneration value per day if($this->massRegeneration > 0){ $systemStaticData->massRegeneration = $this->massRegeneration; } return $systemStaticData; } }