ticket View

This commit is contained in:
Javi Gallego 2019-05-09 11:25:46 +02:00
parent 4281181602
commit ac5b17be31
2 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,26 @@
CREATE OR REPLACE
ALGORITHM = UNDEFINED
DEFINER = `root`@`%`
SQL SECURITY DEFINER
VIEW `vn`.`ticket` AS
SELECT
`t`.`Id_Ticket` AS `id`,
`t`.`Id_Cliente` AS `clientFk`,
`t`.`warehouse_id` AS `warehouseFk`,
`t`.`Fecha` AS `shipped`,
`t`.`landing` AS `landed`,
`t`.`Alias` AS `nickname`,
`t`.`Factura` AS `refFk`,
`t`.`Id_Consigna` AS `addressFk`,
`t`.`Localizacion` AS `location`,
`t`.`Solucion` AS `solution`,
`t`.`Id_Ruta` AS `routeFk`,
`t`.`empresa_id` AS `companyFk`,
`t`.`Id_Agencia` AS `agencyModeFk`,
`t`.`Prioridad` AS `priority`,
`t`.`Bultos` AS `packages`,
`t`.`isDeleted` AS `isDeleted`,
`t`.`odbc_date` AS `created`,
`t`.`zoneFk` AS `zoneFk`
FROM
`vn2008`.`Tickets` `t`;

View File

@ -111,6 +111,11 @@
"type": "hasOne",
"model": "TicketState",
"foreignKey": "ticketFk"
},
"zone": {
"type": "hasOne",
"model": "Zone",
"foreignKey": "zoneFk"
}
}
}