<?php

use SilverStripe\CMS\Model\SiteTree;
use SilverStripe\Assets\Image;
use SilverStripe\AssetAdmin\Forms\UploadField;

class Page extends SiteTree
{
    private static $db = [];

    private static $has_one = [
        'MastHead' => Image::class
    ];
    
    private static $owns = [
        'MastHead'
    ];
    
public function getCMSFields() 
  {
    $fields = parent::getCMSFields();

    $fields->addFieldToTab('Root.Main', UploadField::create('MastHead', 'MastHead Image (1300x360)'), 'Content');
    return $fields;
  }
}
