*/ final class StockLocationMapper extends DataMapperFactory { /** * Columns. * * @var array * @since 1.0.0 */ public const COLUMNS = [ 'warehousemgmt_stocklocation_id' => ['name' => 'warehousemgmt_stocklocation_id', 'type' => 'int', 'internal' => 'id'], 'warehousemgmt_stocklocation_name' => ['name' => 'warehousemgmt_stocklocation_name', 'type' => 'string', 'internal' => 'name'], 'warehousemgmt_stocklocation_stock' => ['name' => 'warehousemgmt_stocklocation_stock', 'type' => 'int', 'internal' => 'stock'], 'warehousemgmt_stocklocation_type' => ['name' => 'warehousemgmt_stocklocation_type', 'type' => 'int', 'internal' => 'type'], 'warehousemgmt_stocklocation_x' => ['name' => 'warehousemgmt_stocklocation_x', 'type' => 'int', 'internal' => 'x'], 'warehousemgmt_stocklocation_y' => ['name' => 'warehousemgmt_stocklocation_y', 'type' => 'int', 'internal' => 'y'], 'warehousemgmt_stocklocation_z' => ['name' => 'warehousemgmt_stocklocation_z', 'type' => 'int', 'internal' => 'z'], ]; /** * Belongs to. * * @var array * @since 1.0.0 */ public const BELONGS_TO = [ 'stock' => [ 'mapper' => StockMapper::class, 'external' => 'warehousemgmt_stocklocation_stock', ], ]; /** * Has one relation. * * @var array * @since 1.0.0 */ public const OWNS_ONE = [ 'type' => [ 'mapper' => StockTypeMapper::class, 'external' => 'warehousemgmt_stocklocation_type', ], ]; /** * Has many relation. * * @var array * @since 1.0.0 */ public const HAS_MANY = [ 'shelfs' => [ 'mapper' => StockShelfMapper::class, 'table' => 'warehousemgmt_stockshelf', 'self' => 'warehousemgmt_stockshelf_location', 'external' => null, ], ]; /** * Primary table. * * @var string * @since 1.0.0 */ public const TABLE = 'warehousemgmt_stocklocation'; /** * Primary field name. * * @var string * @since 1.0.0 */ public const PRIMARYFIELD = 'warehousemgmt_stocklocation_id'; }