* @since 1.0.0 */ protected static array $columns = [ 'hr_staff_work_history_id' => ['name' => 'hr_staff_work_history_id', 'type' => 'int', 'internal' => 'id'], 'hr_staff_work_history_staff' => ['name' => 'hr_staff_work_history_staff', 'type' => 'int', 'internal' => 'employee'], 'hr_staff_work_history_address' => ['name' => 'hr_staff_work_history_address', 'type' => 'Serializable', 'internal' => 'address'], 'hr_staff_work_history_title' => ['name' => 'hr_staff_work_history_title', 'type' => 'string', 'internal' => 'jobTitle'], 'hr_staff_work_history_start' => ['name' => 'hr_staff_work_history_start', 'type' => 'DateTime', 'internal' => 'start'], 'hr_staff_work_history_end' => ['name' => 'hr_staff_work_history_end', 'type' => 'DateTime', 'internal' => 'end'], ]; /** * Belongs to. * * @var array * @since 1.0.0 */ protected static array $belongsTo = [ 'employee' => [ 'mapper' => EmployeeMapper::class, 'external' => 'hr_staff_work_history_staff', ], ]; /** * Has many relation. * * @var array * @since 1.0.0 */ protected static array $hasMany = [ 'files' => [ 'mapper' => MediaMapper::class, /* mapper of the related object */ 'table' => 'hr_staff_work_history_media', /* table of the related object, null if no relation table is used (many->1) */ 'external' => 'hr_staff_work_history_media_media', 'self' => 'hr_staff_work_history_media_item', ], ]; /** * Primary field name. * * @var string * @since 1.0.0 */ protected static string $primaryField = 'hr_staff_work_history_id'; /** * Primary table. * * @var string * @since 1.0.0 */ protected static string $table = 'hr_staff_work_history'; }