command #1 migracion usuarios

parent a8be4b16
...@@ -10,3 +10,4 @@ ...@@ -10,3 +10,4 @@
/vendor/ /vendor/
/bin/ /bin/
/composer.phar /composer.phar
/nbproject/private/
\ No newline at end of file
<?php
namespace AppBundle\Model;
use AppBundle\Model\om\BaseMcafeeTransaccion;
class McafeeTransaccion extends BaseMcafeeTransaccion
{
const TIPO_ALTA = 1;
const TIPO_AGREGAR_LICS = 2;
const TIPO_CANCELAR_SUS= 3;
const TIPO_ACTUALIZA_PERF= 4;
const TIPO_DESCONTAR_LICS= 5;
const ESTADO_NO_ENVIADA=0;
const ESTADO_SUCCESS=1;
const ESTADO_FRACASADA=2;
public function generarNroReferencia() {
$nroRef = 'GL_ES_SUS_'.$this->getUmcId().'_'.date('dmYHis');
$this->setMtrReferencia($nroRef);
}
public function getMtrNombreTipo() {
switch ($this->getMtrTipo()):
case self::TIPO_ALTA:
return 'Alta SKU';
case self::TIPO_AGREGAR_LICS:
return 'Agrega Licencias';
case self::TIPO_CANCELAR_SUS:
return 'Cancela Suscripcion SKU';
case self::TIPO_ACTUALIZA_PERF:
return 'Actualiza Datos del Perfil ';
case self::TIPO_DESCONTAR_LICS:
return 'Quitar licencias';
default :
return 'Desconocida';
endswitch;
}
public function getMtrNombreEstado() {
switch ($this->getMtrEstado()):
case self::ESTADO_NO_ENVIADA:
return 'No enviada';
case self::ESTADO_SUCCESS:
return 'Exitosa';
case self::ESTADO_FRACASADA:
return 'Fracasada';
default :
return 'Desconocida';
endswitch;
}
}
<?php
namespace AppBundle\Model;
use AppBundle\Model\om\BaseMcafeeTransaccionPeer;
class McafeeTransaccionPeer extends BaseMcafeeTransaccionPeer
{
}
<?php
namespace AppBundle\Model;
use AppBundle\Model\om\BaseMcafeeTransaccionPendiente;
use AppBundle\Model\UsuarioMcafee;
class McafeeTransaccionPendiente extends BaseMcafeeTransaccionPendiente
{
const TIPO_ALTA = 1;
const TIPO_AGREGAR_LICS = 2;
const TIPO_CANCELAR_SUS= 3;
const TIPO_ACTUALIZA_PERF= 4;
const TIPO_DESCONTAR_LICS= 5;
const ESTADO_PENDIENTE=0;//Transaccion pendiente que buscara la tarea.
const ESTADO_DESECHADA=1;//Transaccion que despues de ciertos intentos se desecho.
const ESTADO_EXITOSA=2;//Transaccion que se pudo llevar acabo.
/**
* Agrega una transaccion pendiente que queda en cola en la tabla 'mcafee_transaccion_pendiente'
*
* @param \AppBundle\Model\UsuarioMcafee $umc
* @param type $tipo
*/
public static function generarTransaccionPendiente(UsuarioMcafee $umc,$tipo){
$txPendiente = new McafeeTransaccionPendiente();
$txPendiente->setUmcId($umc);
$txPendiente->setMtpEstado(McafeeTransaccionPendiente::ESTADO_PENDIENTE);
$txPendiente->setMtpTipo($tipo);
$txPendiente->setMtpIntento(0);
$txPendiente->save();
}
}
<?php
namespace AppBundle\Model;
use AppBundle\Model\om\BaseMcafeeTransaccionPendientePeer;
class McafeeTransaccionPendientePeer extends BaseMcafeeTransaccionPendientePeer
{
}
<?php
namespace AppBundle\Model;
use AppBundle\Model\om\BaseMcafeeTransaccionPendienteQuery;
class McafeeTransaccionPendienteQuery extends BaseMcafeeTransaccionPendienteQuery
{
}
<?php
namespace AppBundle\Model;
use AppBundle\Model\om\BaseMcafeeTransaccionQuery;
class McafeeTransaccionQuery extends BaseMcafeeTransaccionQuery
{
}
<?php
namespace AppBundle\Model;
use AppBundle\Model\om\BaseMcafeeUltimoProcesoMigracion;
class McafeeUltimoProcesoMigracion extends BaseMcafeeUltimoProcesoMigracion
{
}
<?php
namespace AppBundle\Model;
use AppBundle\Model\om\BaseMcafeeUltimoProcesoMigracionPeer;
class McafeeUltimoProcesoMigracionPeer extends BaseMcafeeUltimoProcesoMigracionPeer
{
}
<?php
namespace AppBundle\Model;
use AppBundle\Model\om\BaseMcafeeUltimoProcesoMigracionQuery;
class McafeeUltimoProcesoMigracionQuery extends BaseMcafeeUltimoProcesoMigracionQuery
{
}
<?php
namespace AppBundle\Model;
use AppBundle\Model\om\BaseUsuariosMcafeeMovistarMigrar;
class UsuariosMcafeeMovistarMigrar extends BaseUsuariosMcafeeMovistarMigrar
{
}
<?php
namespace AppBundle\Model;
use AppBundle\Model\om\BaseUsuariosMcafeeMovistarMigrarPeer;
class UsuariosMcafeeMovistarMigrarPeer extends BaseUsuariosMcafeeMovistarMigrarPeer
{
}
<?php
namespace AppBundle\Model;
use AppBundle\Model\om\BaseUsuariosMcafeeMovistarMigrarQuery;
class UsuariosMcafeeMovistarMigrarQuery extends BaseUsuariosMcafeeMovistarMigrarQuery
{
}
<?php
namespace AppBundle\Model\map;
use \RelationMap;
use \TableMap;
/**
* This class defines the structure of the 'mcafee_transaccion_pendiente' table.
*
*
*
* This map class is used by Propel to do runtime db structure discovery.
* For example, the createSelectSql() method checks the type of a given column used in an
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
* (i.e. if it's a text column type).
*
* @package propel.generator.src.AppBundle.Model.map
*/
class McafeeTransaccionPendienteTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'src.AppBundle.Model.map.McafeeTransaccionPendienteTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('mcafee_transaccion_pendiente');
$this->setPhpName('McafeeTransaccionPendiente');
$this->setClassname('AppBundle\\Model\\McafeeTransaccionPendiente');
$this->setPackage('src.AppBundle.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('mtp_id', 'MtpId', 'INTEGER', true, null, null);
$this->addForeignKey('umc_id', 'UmcId', 'INTEGER', 'usuario_mcafee', 'umc_id', false, null, null);
$this->addColumn('mtp_tipo', 'MtpTipo', 'SMALLINT', false, null, null);
$this->addColumn('mtp_estado', 'MtpEstado', 'SMALLINT', false, null, null);
$this->addColumn('mtp_intento', 'MtpIntento', 'SMALLINT', false, null, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('UsuarioMcafee', 'AppBundle\\Model\\UsuarioMcafee', RelationMap::MANY_TO_ONE, array('umc_id' => 'umc_id', ), null, null);
} // buildRelations()
/**
*
* Gets the list of behaviors registered for this table
*
* @return array Associative array (name => parameters) of behaviors
*/
public function getBehaviors()
{
return array(
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
);
} // getBehaviors()
} // McafeeTransaccionPendienteTableMap
<?php
namespace AppBundle\Model\map;
use \RelationMap;
use \TableMap;
/**
* This class defines the structure of the 'mcafee_transaccion' table.
*
*
*
* This map class is used by Propel to do runtime db structure discovery.
* For example, the createSelectSql() method checks the type of a given column used in an
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
* (i.e. if it's a text column type).
*
* @package propel.generator.src.AppBundle.Model.map
*/
class McafeeTransaccionTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'src.AppBundle.Model.map.McafeeTransaccionTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('mcafee_transaccion');
$this->setPhpName('McafeeTransaccion');
$this->setClassname('AppBundle\\Model\\McafeeTransaccion');
$this->setPackage('src.AppBundle.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('mtr_id', 'MtrId', 'INTEGER', true, null, null);
$this->addForeignKey('umc_id', 'UmcId', 'INTEGER', 'usuario_mcafee', 'umc_id', false, null, null);
$this->addColumn('mtr_tipo', 'MtrTipo', 'SMALLINT', false, null, null);
$this->addColumn('mtr_referencia', 'MtrReferencia', 'VARCHAR', false, 50, null);
$this->addColumn('mtr_referencia_mcafee', 'MtrReferenciaMcafee', 'VARCHAR', false, 50, null);
$this->addColumn('mtr_xml_envio', 'MtrXmlEnvio', 'LONGVARCHAR', false, null, null);
$this->addColumn('mtr_codigo_retorno', 'MtrCodigoRetorno', 'VARCHAR', false, 20, null);
$this->addColumn('mtr_xml_respuesta', 'MtrXmlRespuesta', 'LONGVARCHAR', false, null, null);
$this->addColumn('mtr_estado', 'MtrEstado', 'SMALLINT', false, null, null);
$this->addColumn('mtr_productdownloadurl', 'MtrProductdownloadurl', 'VARCHAR', false, 250, null);
$this->addColumn('mtr_short_productdownloadurl', 'MtrShortProductdownloadurl', 'VARCHAR', false, 40, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('UsuarioMcafee', 'AppBundle\\Model\\UsuarioMcafee', RelationMap::MANY_TO_ONE, array('umc_id' => 'umc_id', ), null, null);
} // buildRelations()
/**
*
* Gets the list of behaviors registered for this table
*
* @return array Associative array (name => parameters) of behaviors
*/
public function getBehaviors()
{
return array(
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
);
} // getBehaviors()
} // McafeeTransaccionTableMap
<?php
namespace AppBundle\Model\map;
use \RelationMap;
use \TableMap;
/**
* This class defines the structure of the 'mcafee_ultimo_proceso_migracion' table.
*
*
*
* This map class is used by Propel to do runtime db structure discovery.
* For example, the createSelectSql() method checks the type of a given column used in an
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
* (i.e. if it's a text column type).
*
* @package propel.generator.src.AppBundle.Model.map
*/
class McafeeUltimoProcesoMigracionTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'src.AppBundle.Model.map.McafeeUltimoProcesoMigracionTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('mcafee_ultimo_proceso_migracion');
$this->setPhpName('McafeeUltimoProcesoMigracion');
$this->setClassname('AppBundle\\Model\\McafeeUltimoProcesoMigracion');
$this->setPackage('src.AppBundle.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('mup_id', 'MupId', 'INTEGER', true, null, null);
$this->addForeignKey('ultimo_umc_id', 'UltimoUmcId', 'INTEGER', 'usuario_mcafee', 'umc_id', true, null, null);
$this->addColumn('mup_cantidad_procesados', 'MupCantidadProcesados', 'INTEGER', false, null, null);
$this->addColumn('mup_cantidad_pendientes', 'MupCantidadPendientes', 'INTEGER', false, null, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
$this->addRelation('UsuarioMcafee', 'AppBundle\\Model\\UsuarioMcafee', RelationMap::MANY_TO_ONE, array('ultimo_umc_id' => 'umc_id', ), null, null);
} // buildRelations()
/**
*
* Gets the list of behaviors registered for this table
*
* @return array Associative array (name => parameters) of behaviors
*/
public function getBehaviors()
{
return array(
'timestampable' => array (
'create_column' => 'created_at',
'update_column' => 'updated_at',
'disable_updated_at' => 'false',
),
);
} // getBehaviors()
} // McafeeUltimoProcesoMigracionTableMap
...@@ -57,6 +57,8 @@ class UsuarioMcafeeTableMap extends TableMap ...@@ -57,6 +57,8 @@ class UsuarioMcafeeTableMap extends TableMap
$this->addColumn('umc_parametro_encriptado', 'UmcParametroEncriptado', 'VARCHAR', false, 300, null); $this->addColumn('umc_parametro_encriptado', 'UmcParametroEncriptado', 'VARCHAR', false, 300, null);
$this->addColumn('umc_permite_email', 'UmcPermiteEmail', 'BOOLEAN', false, 1, true); $this->addColumn('umc_permite_email', 'UmcPermiteEmail', 'BOOLEAN', false, 1, true);
$this->addColumn('umc_fecha_desuscripcion_email', 'UmcFechaDesuscripcionEmail', 'TIMESTAMP', false, null, null); $this->addColumn('umc_fecha_desuscripcion_email', 'UmcFechaDesuscripcionEmail', 'TIMESTAMP', false, null, null);
$this->addColumn('umc_movil', 'UmcMovil', 'VARCHAR', false, 200, null);
$this->addColumn('umc_customer_id', 'UmcCustomerId', 'VARCHAR', false, 250, null);
$this->addColumn('umc_eliminado', 'UmcEliminado', 'BOOLEAN', false, 1, null); $this->addColumn('umc_eliminado', 'UmcEliminado', 'BOOLEAN', false, 1, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null); $this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
$this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null); $this->addColumn('updated_at', 'UpdatedAt', 'TIMESTAMP', false, null, null);
...@@ -69,6 +71,9 @@ class UsuarioMcafeeTableMap extends TableMap ...@@ -69,6 +71,9 @@ class UsuarioMcafeeTableMap extends TableMap
public function buildRelations() public function buildRelations()
{ {
$this->addRelation('EnvioEmail', 'AppBundle\\Model\\EnvioEmail', RelationMap::ONE_TO_MANY, array('umc_id' => 'umc_id', ), null, null, 'EnvioEmails'); $this->addRelation('EnvioEmail', 'AppBundle\\Model\\EnvioEmail', RelationMap::ONE_TO_MANY, array('umc_id' => 'umc_id', ), null, null, 'EnvioEmails');
$this->addRelation('McafeeTransaccion', 'AppBundle\\Model\\McafeeTransaccion', RelationMap::ONE_TO_MANY, array('umc_id' => 'umc_id', ), null, null, 'McafeeTransaccions');
$this->addRelation('McafeeTransaccionPendiente', 'AppBundle\\Model\\McafeeTransaccionPendiente', RelationMap::ONE_TO_MANY, array('umc_id' => 'umc_id', ), null, null, 'McafeeTransaccionPendientes');
$this->addRelation('McafeeUltimoProcesoMigracion', 'AppBundle\\Model\\McafeeUltimoProcesoMigracion', RelationMap::ONE_TO_MANY, array('umc_id' => 'ultimo_umc_id', ), null, null, 'McafeeUltimoProcesoMigracions');
$this->addRelation('Tracking', 'AppBundle\\Model\\Tracking', RelationMap::ONE_TO_MANY, array('umc_id' => 'umc_id', ), null, null, 'Trackings'); $this->addRelation('Tracking', 'AppBundle\\Model\\Tracking', RelationMap::ONE_TO_MANY, array('umc_id' => 'umc_id', ), null, null, 'Trackings');
} // buildRelations() } // buildRelations()
......
<?php
namespace AppBundle\Model\map;
use \RelationMap;
use \TableMap;
/**
* This class defines the structure of the 'usuarios_mcafee_movistar_migrar' table.
*
*
*
* This map class is used by Propel to do runtime db structure discovery.
* For example, the createSelectSql() method checks the type of a given column used in an
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
* (i.e. if it's a text column type).
*
* @package propel.generator.src.AppBundle.Model.map
*/
class UsuariosMcafeeMovistarMigrarTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'src.AppBundle.Model.map.UsuariosMcafeeMovistarMigrarTableMap';
/**
* Initialize the table attributes, columns and validators
* Relations are not initialized by this method since they are lazy loaded
*
* @return void
* @throws PropelException
*/
public function initialize()
{
// attributes
$this->setName('usuarios_mcafee_movistar_migrar');
$this->setPhpName('UsuariosMcafeeMovistarMigrar');
$this->setClassname('AppBundle\\Model\\UsuariosMcafeeMovistarMigrar');
$this->setPackage('src.AppBundle.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('id', 'Id', 'INTEGER', true, null, null);
$this->addColumn('id_mov', 'IdMov', 'INTEGER', false, null, 0);
$this->addColumn('area_tel', 'AreaTel', 'INTEGER', false, null, null);
$this->addColumn('rut', 'Rut', 'INTEGER', false, null, null);
$this->addColumn('nombres', 'Nombres', 'VARCHAR', false, 45, null);
$this->addColumn('correo', 'Correo', 'VARCHAR', false, 64, null);
$this->addColumn('fono_contacto_fijo_1', 'FonoContactoFijo1', 'INTEGER', false, null, null);
$this->addColumn('fono_contacto_fijo_2', 'FonoContactoFijo2', 'INTEGER', false, null, null);
$this->addColumn('fono_contacto_movil_1', 'FonoContactoMovil1', 'INTEGER', false, null, null);
$this->addColumn('fono_contacto_movil_2', 'FonoContactoMovil2', 'INTEGER', false, null, null);
$this->addColumn('ps_6094', 'Ps6094', 'INTEGER', false, null, null);
$this->addColumn('ps_5679', 'Ps5679', 'INTEGER', false, null, null);
$this->addColumn('ps_2989', 'Ps2989', 'INTEGER', false, null, null);
$this->addColumn('ps_6753', 'Ps6753', 'INTEGER', false, null, null);
$this->addColumn('ps_6759', 'Ps6759', 'INTEGER', false, null, null);
$this->addColumn('id_mc', 'IdMc', 'INTEGER', true, null, 0);
$this->addColumn('Ccid', 'Ccid', 'VARCHAR', false, 25, null);
$this->addColumn('Email_Address', 'EmailAddress', 'VARCHAR', false, 60, null);
$this->addColumn('New_Registration_Date', 'NewRegistrationDate', 'DATE', false, null, null);
$this->addColumn('Last_Login_Date', 'LastLoginDate', 'DATE', false, null, null);
$this->addColumn('Installation_Date', 'InstallationDate', 'DATE', false, null, null);
$this->addColumn('Last_Update_Date', 'LastUpdateDate', 'DATE', false, null, null);
$this->addColumn('License_Activity', 'LicenseActivity', 'VARCHAR', false, 20, null);
$this->addColumn('License_Activity_Qty', 'LicenseActivityQty', 'INTEGER', false, null, null);
$this->addColumn('Total_Activated_Devices_PC', 'TotalActivatedDevicesPc', 'INTEGER', false, null, null);
$this->addColumn('Total_Activated_Devices_MAC', 'TotalActivatedDevicesMac', 'INTEGER', false, null, null);
$this->addColumn('Total_Activated_Devices_Mobile', 'TotalActivatedDevicesMobile', 'INTEGER', false, null, null);
$this->addColumn('Active_Devices_PC', 'ActiveDevicesPc', 'INTEGER', false, null, null);
$this->addColumn('Active_Devices_MAC', 'ActiveDevicesMac', 'INTEGER', false, null, null);
$this->addColumn('Active_Devices_Mobile', 'ActiveDevicesMobile', 'INTEGER', false, null, null);
$this->addColumn('Device_Type', 'DeviceType', 'VARCHAR', false, 20, null);
$this->addColumn('Numero_Mcafee', 'NumeroMcafee', 'INTEGER', false, 20, null);
$this->addColumn('sku', 'Sku', 'VARCHAR', false, 20, null);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
} // buildRelations()
} // UsuariosMcafeeMovistarMigrarTableMap
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment