'Varchar', 'DatabaseField' => 'HTMLVarchar', 'NumericField' => 'Int', ]; private static $has_one = [ "Captain" => Player::class, "Founder" => Player::class, 'HasOneRelationship' => Player::class, ]; private static $has_many = [ 'SubTeams' => SubTeam::class, 'Comments' => TeamComment::class, 'Fans' => Fan::class . '.Favourite', // Polymorphic - Team fans 'PlayerFans' => Player::class . '.FavouriteTeam' ]; private static $many_many = [ 'Players' => Player::class ]; private static $many_many_extraFields = [ 'Players' => [ 'Position' => 'Varchar(100)' ] ]; private static $belongs_many_many = [ 'Sponsors' => EquipmentCompany::class . '.SponsoredTeams', 'EquipmentSuppliers' => EquipmentCompany::class . '.EquipmentCustomers' ]; private static $summary_fields = [ 'Title', // Overridden by Team_Extension 'Title.UpperCase' => 'Title', 'Captain.ShirtNumber' => 'Captain\'s shirt number', 'Captain.FavouriteTeam.Title' => 'Captain\'s favourite team' ]; private static $default_sort = '"Title"'; private static $extensions = [ Team_Extension::class ]; public function MyTitle() { return 'Team ' . $this->Title; } public function getDynamicField() { return 'dynamicfield'; } public function ReturnsNull() { return null; } }