*/ final class ChecklistTemplateMapper extends DataMapperFactory { /** * Columns. * * @var array * @since 1.0.0 */ public const COLUMNS = [ 'checklist_template_id' => ['name' => 'checklist_template_id', 'type' => 'int', 'internal' => 'id'], 'checklist_template_name' => ['name' => 'checklist_template_name', 'type' => 'string', 'internal' => 'name', 'autocomplete' => true], 'checklist_template_description' => ['name' => 'checklist_template_description', 'type' => 'string', 'internal' => 'description'], 'checklist_template_repeat' => ['name' => 'checklist_template_repeat', 'type' => 'int', 'internal' => 'repeat'], 'checklist_template_interval' => ['name' => 'checklist_template_interval', 'type' => 'string', 'internal' => 'interval'], 'checklist_template_start' => ['name' => 'checklist_template_start', 'type' => 'DateTime', 'internal' => 'start'], 'checklist_template_end' => ['name' => 'checklist_template_end', 'type' => 'DateTime', 'internal' => 'end'], ]; /** * Has many relation. * * @var array * @since 1.0.0 */ public const HAS_MANY = [ 'tasks' => [ 'mapper' => TaskMapper::class, 'table' => 'checklist_template_task', 'external' => 'checklist_template_task_task', 'self' => 'checklist_template_task_template', ], ]; /** * Primary table. * * @var string * @since 1.0.0 */ public const TABLE = 'checklist_template'; /** * Primary field name. * * @var string * @since 1.0.0 */ public const PRIMARYFIELD = 'checklist_template_id'; }