Commit e3b72a8e authored by Ana's avatar Ana

agregar modelo

parent b21e2c82
......@@ -10,4 +10,13 @@
<parameter name="Engine" value="MyISAM"/>
</vendor>
</table>
<table name="parametro_configuracion" phpName="ParametroConfiguracion" idMethod="native">
<column name="pco_id" phpName="PcoId" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="pco_nombre" phpName="PcoNombre" type="VARCHAR" size="100" required="false"/>
<column name="pco_valor" phpName="PcoValor" type="VARCHAR" size="1000" required="false"/>
<column name="pco_descripcion" phpName="PcoDescripcion" type="VARCHAR" size="1000" required="false"/>
<vendor type="mysql">
<parameter name="Engine" value="InnoDB"/>
</vendor>
</table>
</database>
<?php
namespace AppBundle\Model;
use AppBundle\Model\om\BaseParametroConfiguracion;
class ParametroConfiguracion extends BaseParametroConfiguracion
{
}
<?php
namespace AppBundle\Model;
use AppBundle\Model\om\BaseParametroConfiguracionPeer;
class ParametroConfiguracionPeer extends BaseParametroConfiguracionPeer
{
}
<?php
namespace AppBundle\Model;
use AppBundle\Model\om\BaseParametroConfiguracionQuery;
class ParametroConfiguracionQuery extends BaseParametroConfiguracionQuery
{
}
<?php
namespace AppBundle\Model\map;
use \RelationMap;
use \TableMap;
/**
* This class defines the structure of the 'parametro_configuracion' 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 ParametroConfiguracionTableMap extends TableMap
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'src.AppBundle.Model.map.ParametroConfiguracionTableMap';
/**
* 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('parametro_configuracion');
$this->setPhpName('ParametroConfiguracion');
$this->setClassname('AppBundle\\Model\\ParametroConfiguracion');
$this->setPackage('src.AppBundle.Model');
$this->setUseIdGenerator(true);
// columns
$this->addPrimaryKey('pco_id', 'PcoId', 'INTEGER', true, null, null);
$this->addColumn('pco_nombre', 'PcoNombre', 'VARCHAR', false, 100, null);
$this->addColumn('pco_valor', 'PcoValor', 'VARCHAR', false, 1000, null);
$this->addColumn('pco_descripcion', 'PcoDescripcion', 'VARCHAR', false, 1000, null);
// validators
} // initialize()
/**
* Build the RelationMap objects for this table relationships
*/
public function buildRelations()
{
} // buildRelations()
} // ParametroConfiguracionTableMap
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -10,4 +10,13 @@
<parameter name="Engine" value="MyISAM"/>
</vendor>
</table>
<table name="parametro_configuracion" phpName="ParametroConfiguracion" idMethod="native">
<column name="pco_id" phpName="PcoId" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
<column name="pco_nombre" phpName="PcoNombre" type="VARCHAR" size="100" required="false"/>
<column name="pco_valor" phpName="PcoValor" type="VARCHAR" size="1000" required="false"/>
<column name="pco_descripcion" phpName="PcoDescripcion" type="VARCHAR" size="1000" required="false"/>
<vendor type="mysql">
<parameter name="Engine" value="InnoDB"/>
</vendor>
</table>
</database>
\ No newline at end of file
......@@ -19,6 +19,7 @@ use FOS\RestBundle\View\View;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
class EnvioSmsController extends FOSRestController
{
......@@ -110,7 +111,7 @@ class EnvioSmsController extends FOSRestController
$post['to'] = array($movil);
$post['text'] = $mensaje;
$post['from'] = $movil;
$post['dlr-url'] ="http://localhost/apirestsms/notifica.php?idenvio=". $campana . "&tel=%P&estado=%d"; //esta url debe ser cambiada
$post['dlr-url'] ="http://localhost/apirestsms/notifica/". $campana . "/%P/%d";
$user = $usuario;
$password = $password;
$ch = curl_init();
......@@ -253,4 +254,19 @@ $val=strVal($messageId);
}
}
/**
* @Route("/notifica/{idenvio}/{tel}/{estado}")
*/
public function notificaAction($idenvio, $tel,$estado){
$notifica = new Notifica();
$notifica->setCampana($idenvio);
$notifica->setTelefono($tel);
$notifica->setEstado($estado);
$notifica->save();
}
}
\ No newline at end of file
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