*/ final class CostCenterMapper extends DataMapperFactory { /** * Columns. * * @var array * @since 1.0.0 */ public const COLUMNS = [ 'accounting_costcenter_id' => ['name' => 'accounting_costcenter_id', 'type' => 'int', 'internal' => 'id'], 'accounting_costcenter_code' => ['name' => 'accounting_costcenter_code', 'type' => 'string', 'internal' => 'code'], 'accounting_costcenter_unit' => ['name' => 'accounting_costcenter_unit', 'type' => 'int', 'internal' => 'unit'], ]; /** * Has many relation. * * @var array * @since 1.0.0 */ public const HAS_MANY = [ 'l11n' => [ 'mapper' => CostCenterL11nMapper::class, 'table' => 'accounting_costcenter_l11n', 'self' => 'accounting_costcenter_l11n_costcenter', 'column' => 'content', 'external' => null, ], ]; /** * Model to use by the mapper. * * @var class-string * @since 1.0.0 */ public const MODEL = CostCenter::class; /** * Primary table. * * @var string * @since 1.0.0 */ public const TABLE = 'accounting_costcenter'; /** * Primary field name. * * @var string * @since 1.0.0 */ public const PRIMARYFIELD = 'accounting_costcenter_id'; }