*/ final class WorkflowInstanceAbstractMapper extends DataMapperFactory { /** * Columns. * * @var array * @since 1.0.0 */ public const COLUMNS = [ 'workflow_instance_id' => ['name' => 'workflow_instance_id', 'type' => 'int', 'internal' => 'id'], 'workflow_instance_title' => ['name' => 'workflow_instance_title', 'type' => 'string', 'internal' => 'title'], 'workflow_instance_status' => ['name' => 'workflow_instance_status', 'type' => 'int', 'internal' => 'status'], 'workflow_instance_data' => ['name' => 'workflow_instance_data', 'type' => 'string', 'internal' => 'data'], 'workflow_instance_int' => ['name' => 'workflow_instance_int', 'type' => 'int', 'internal' => 'data_int'], 'workflow_instance_ref' => ['name' => 'workflow_instance_ref', 'type' => 'int', 'internal' => 'ref'], 'workflow_instance_template' => ['name' => 'workflow_instance_template', 'type' => 'int', 'internal' => 'template'], 'workflow_instance_created_at' => ['name' => 'workflow_instance_created_at', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt', 'readonly' => true], 'workflow_instance_created_by' => ['name' => 'workflow_instance_created_by', 'type' => 'int', 'internal' => 'createdBy', 'readonly' => true], ]; /** * Belongs to. * * @var array * @since 1.0.0 */ public const BELONGS_TO = [ 'createdBy' => [ 'mapper' => AccountMapper::class, 'external' => 'workflow_instance_created_by', ], 'template' => [ 'mapper' => WorkflowTemplateMapper::class, 'external' => 'workflow_instance_template', ], ]; /** * Has many relation. * * @var array * @since 1.0.0 */ public const HAS_MANY = [ 'steps' => [ 'mapper' => WorkflowStepMapper::class, 'table' => 'workflow_step', 'self' => 'workflow_step_instance', 'external' => null, ], ]; /** * Primary table. * * @var string * @since 1.0.0 */ public const TABLE = 'workflow_instance'; /** * Created at. * * @var string * @since 1.0.0 */ public const CREATED_AT = 'workflow_instance_created_at'; /** * Primary field name. * * @var string * @since 1.0.0 */ public const PRIMARYFIELD = 'workflow_instance_id'; }