* @since 1.0.0 */ public const COLUMNS = [ 'organization_unit_id' => ['name' => 'organization_unit_id', 'type' => 'int', 'internal' => 'id'], 'organization_unit_name' => ['name' => 'organization_unit_name', 'type' => 'string', 'internal' => 'name', 'autocomplete' => true], 'organization_unit_image' => ['name' => 'organization_unit_image', 'type' => 'int', 'internal' => 'image'], 'organization_unit_description' => ['name' => 'organization_unit_description', 'type' => 'string', 'internal' => 'description'], 'organization_unit_descriptionraw' => ['name' => 'organization_unit_descriptionraw', 'type' => 'string', 'internal' => 'descriptionRaw'], 'organization_unit_parent' => ['name' => 'organization_unit_parent', 'type' => 'int', 'internal' => 'parent'], 'organization_unit_status' => ['name' => 'organization_unit_status', 'type' => 'int', 'internal' => 'status'], ]; /** * Has one relation. * * @var array * @since 1.0.0 */ public const OWNS_ONE = [ 'image' => [ 'mapper' => MediaMapper::class, 'external' => 'organization_unit_image', ], ]; /** * Belongs to. * * @var array * @since 1.0.0 */ public const BELONGS_TO = [ 'parent' => [ 'mapper' => self::class, 'external' => 'organization_unit_parent', ], ]; /** * Model to use by the mapper. * * @var string * @since 1.0.0 */ public const MODEL = Unit::class; /** * Primary table. * * @var string * @since 1.0.0 */ public const TABLE = 'organization_unit'; /** * Primary field name. * * @var string * @since 1.0.0 */ public const PRIMARYFIELD ='organization_unit_id'; }