<?php namespace {{namespace}};

use Andesite\Attachment\AttachmentCategoryManager;
use Andesite\DBAccess\Connection\Filter\Filter;
use Andesite\DBAccess\Connection\Filter\Comparison;
use Andesite\DBAccess\Connection\Finder;
use Andesite\Ghost\Field;
use Andesite\Ghost\Ghost;
use Andesite\Ghost\Model;

/**
 * @method static Ghost{{name}}Finder search(Filter $filter = null)
 * ghost-generator-annotations
 */
abstract class {{name}}Ghost extends Ghost{

	/** @var Model */
	public static $model;
	const Table = "{{table}}";
	const ConnectionName = "{{connectionName}}";

{{comparers}}

{{constants}}

{{fieldConstants}}

/*attachment-constants*/

/*ghost-generator-properties*/

/*ghost-generator-getters-setters*/

	final static protected function createModel(): Model{
		$model = new Model(get_called_class());
{{add-fields}}
{{validators}}
		return $model;
	}
}

/**
 * Nobody uses this class, it exists only to help the code completion
 * @method \{{namespace}}\{{name}}[] collect($limit = null, $offset = null)
 * @method \{{namespace}}\{{name}}[] collectPage($pageSize, $page, &$count = 0)
 * @method \{{namespace}}\{{name}} pick()
 */
abstract class Ghost{{name}}Finder extends Finder {}