Files
pathfinder/app/main/model/universe/constellationmodel.php
Exodus4D d00e550972 - new import for static "region"/"constellation" universe data #515
- refactored DB connection handling
- removed build.js (RequireJs is now handled by Gulp task)
2017-07-30 15:34:32 +02:00

57 lines
1.2 KiB
PHP

<?php
/**
* Created by PhpStorm.
* User: exodus4d
* Date: 29.07.2017
* Time: 16:49
*/
namespace Model\Universe;
use DB\SQL\Schema;
class ConstellationModel extends BasicUniverseModel {
protected $table = 'constellation';
/**
* No static columns added
* @var bool
*/
protected $addStaticFields = false;
protected $fieldConf = [
'name' => [
'type' => Schema::DT_VARCHAR128,
'nullable' => false,
'default' => ''
],
'regionId' => [
'type' => Schema::DT_INT,
'index' => true,
'belongs-to-one' => 'Model\Universe\RegionModel',
'constraint' => [
[
'table' => 'region',
'on-delete' => 'CASCADE'
]
]
],
'x' => [
'type' => Schema::DT_INT8,
'nullable' => false,
'default' => 0
],
'y' => [
'type' => Schema::DT_INT8,
'nullable' => false,
'default' => 0
],
'z' => [
'type' => Schema::DT_INT8,
'nullable' => false,
'default' => 0
]
];
}