Actualizacion de logs y restricciones

parent 81db466c
{% extends 'base.html.twig' %} {% extends 'base.html.twig' %}
{% block head %} {% block head %}
{% if idp == "none" and fa == 1%} {% if idp == "none" and fa == 1%}
<meta property="fb:app_id" content="270251791049405" /> <meta property="fb:app_id" content="{{facebookAppId}}" />
<meta property="og:url" content="https://test-inovage.gearlabs.cl/nutrapharm/index?idp={{idp}}&fa={{fa}}&r=0" /> <meta property="og:url" content="{{urlSitio}}nutrapharm/index?idp={{idp}}&fa={{fa}}&r=0" />
<meta property="og:type" content="website" /> <meta property="og:type" content="website" />
<meta property="og:title" content="NutraPharm" /> <meta property="og:title" content="NutraPharm" />
<meta property="og:description" content="Producto Nutrapharm - Sacate una foto y compara en 30 días!" /> <meta property="og:description" content="Producto Nutrapharm - Sacate una foto y compara en 30 días!" />
<meta property="og:image:type" content="image/png"/> <meta property="og:image:type" content="image/png"/>
<meta property="og:image:width" content="1200" /> <meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" /> <meta property="og:image:height" content="630" />
<meta property="og:image" content="https://www.nutrapharmsa.com/imagenes/template/logo.png"/> <meta property="og:image" content="{{urlSitio}}imagenes/template/logo.png"/>
{% elseif idp!="none" and fa == 0%} {% elseif idp!="none" and fa == 0%}
<meta property="fb:app_id" content="270251791049405" /> <meta property="fb:app_id" content="{{facebookAppId}}" />
<meta property="og:url" content="https://test-inovage.gearlabs.cl/nutrapharm/index?idp={{idp}}&fa={{fa}}&r=0" /> <meta property="og:url" content="{{urlSitio}}nutrapharm/index?idp={{idp}}&fa={{fa}}&r=0" />
<meta property="og:type" content="website" /> <meta property="og:type" content="website" />
<meta property="og:title" content="NutraPharm Comparacion Foto" /> <meta property="og:title" content="NutraPharm - Comparación Foto" />
<meta property="og:description" content="{{comentarioFinal}}" /> <meta property="og:description" content="{{comentarioFinal}}" />
<meta property="og:image:width" content="1200" /> <meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" /> <meta property="og:image:height" content="630" />
<meta property="og:image" content="https://test-inovage.gearlabs.cl/uploads/users/{{idp}}_comparacion.png"/ <meta property="og:image" content="{{urlSitio}}uploads/users/{{idp}}_comparacion.png"/>
{%endif%} {%endif%}
<link href="{{asset('frontend/css/camara.css')}}" rel="stylesheet" /> <link href="{{asset('frontend/css/camara.css')}}" rel="stylesheet" />
<script> <script>
(function (d, s, id) { (function (d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0]; var js, fjs = d.getElementsByTagName(s)[0];
...@@ -38,31 +38,32 @@ ...@@ -38,31 +38,32 @@
<div class="col-lg-12"> <div class="col-lg-12">
{%if idp == "none" and fa == 1 and r == 0%} {%if idp == "none" and fa == 1 and r == 0%}
<div class="panel-body"> <div class="panel-body">
<div id="mensaje-nutrapharm" style="display:none" class="alert alert-success" role="alert"></div>
<div class="form-group"> <div class="form-group">
<label class="col-md-3 control-label">Nombre</label> <label class="col-md-3 control-label">Nombre</label>
<div class="col-md-8"> <div class="col-md-9">
<input id="nombreUsuario" type="text" placeholder="Nombre..."/> <input id="nombreUsuario" type="text" placeholder="Nombre..."/>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-md-3 control-label">Mail</label> <label class="col-md-3 control-label">Mail</label>
<div class="col-md-8"> <div class="col-md-9">
<input id="mailUsuario" type="text" placeholder="Mail..."/> <input id="mailUsuario" type="text" placeholder="Mail..."/>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-md-3 control-label">Comentarios</label> <label class="col-md-3 control-label">Comentarios</label>
<div class="col-md-8"> <div class="col-md-9">
<input id="comentarioFotoUsuario" type="textarea" placeholder="Comentarios..."/> <input id="comentarioFotoUsuario" type="textarea" placeholder="Comentarios..."/>
</div> </div>
</div> </div>
</div> </div>
{%elseif idp != "none" and fa == 0 and r == 0 %} {%elseif idp != "none" and fa == 0 and r == 0 %}
<label>Foto Subida antes</label> <label>Foto Subida antes</label>
<img src="https://test-inovage.gearlabs.cl/nutrapharm/get/photo?file_name={{idp}}.{{extInicial}}" /> <img src="{{urlSitio}}nutrapharm/get/photo?file_name={{idp}}.{{extInicial}}" />
<div class="form-group"> <div class="form-group">
<label class="col-md-3 control-label">Comentarios</label> <label class="col-md-3 control-label">Comentarios</label>
<div class="col-md-8"> <div class="col-md-9">
<input id="comentarioFotoUsuario" type="textarea" placeholder="Comentarios..."/> <input id="comentarioFotoUsuario" type="textarea" placeholder="Comentarios..."/>
</div> </div>
</div> </div>
...@@ -105,206 +106,263 @@ ...@@ -105,206 +106,263 @@
<button id="btnGuardar">Guardar</button> <button id="btnGuardar">Guardar</button>
</div> </div>
</div> </div>
<div id="mensajeFormulario"></div> <div class="row">
<span>RELLENA TUS DATOS Y SUBE TU FOTO</span> <div id="mensajeFormulario"></div>
<span>RELLENA TUS DATOS Y SUBE TU FOTO</span>
<div id="shareButtonContainer" style="display:none">
<div class="form-group"> <div id="shareButtonContainer" style="display:none">
<button id="buttonShare" class="btn">Compartir En Facebook</button> <div class="form-group">
<button id="buttonShare" class="btn">Compartir En Facebook</button>
</div>
</div> </div>
</div> </div>
{% endblock %} {% endblock %}
{% block javascripts %} {% block javascripts %}
<script src="{{asset('frontend/js/capture.js')}}"></script> <script src="{{asset('frontend/js/capture.js')}}"></script>
<script> <script>
var imagenSubida = false; var imagenSubida = false;
var imagenTomada = false; var imagenTomada = false;
{%if idp != "none" and fa == 0 and r == 0 %} {%if idp != "none" and fa == 0 and r == 0 %}
var usuarioNutraPharm = "{{idp}}"; //por defecto var usuarioNutraPharm = "{{idp}}"; //por defecto
var tipoUsuarioFormulario = 3; //Segunda vez que entra por link de invitacion var tipoUsuarioFormulario = 3; //Segunda vez que entra por link de invitacion
{%else%} {%else%}
var usuarioNutraPharm = "none"; //por defecto var usuarioNutraPharm = "none"; //por defecto
var tipoUsuarioFormulario = 1; var tipoUsuarioFormulario = 1;
{%endif%} {%endif%}
var upload; var upload;
var url = 'https://test-inovage.gearlabs.cl/nutrapharm/index?idp={{idp}}&fa={{fa}}&r=0'; var url = '{{urlSitio}}nutrapharm/index?idp={{idp}}&fa={{fa}}&r=0';
var description = $("#comentarioFotoUsuario").val(); var description = $("#comentarioFotoUsuario").val();
</script> </script>
<script> <script>
window.fbAsyncInit = function () { window.fbAsyncInit = function () {
FB.init({ FB.init({
appId: '270251791049405', appId: '{{facebookAppId}}',
status: true, status: true,
xfbml: true, xfbml: true,
cookie: true, cookie: true,
version: 'v7.0' version: 'v7.0'
}); });
} }
$("#buttonShare").click(function () { $("#buttonShare").click(function () {
console.log("compartiendo"); console.log("compartiendo");
FB.ui({ FB.ui({
xfbml: true, xfbml: true,
method: 'share', method: 'share',
href: url href: url
}, function (response) { }, function (response) {
if (response && response.post_id) { if (response && response.post_id) {
console.log('Post Compartido en Facebook.'); console.log('Post Compartido en Facebook.');
} else { countCompartirFacebook(usuarioNutraPharm);
console.log('Post No Compartido en Facebook.'); } else {
} console.log('Post No Compartido en Facebook.');
}); }
}) });
})
</script> </script>
<script> <script>
function mostrarTomarFoto(event) {
event.preventDefault(); function countCompartirFacebook(idUsuario){
console.log("mostrando tomar foto..."); var url = "{{ path('nutrapharm_compartir_facebook') }}";
$("#tomarFotoContainer").show(); var formData = new FormData();
$("#subirFotoContainer").hide(); $.ajax
imagenTomada = false; ({
imagenTomada = true; type: "POST",
} url: url,
data: formData,
async: true,
cache: false,
contentType: false,
processData: false,
timeout: 60000,
statusCode: {
400: function (respuesta) {
console.log(respuesta.responseText);
var respuestaJson = JSON.parse(respuesta.responseText);
$("#mensaje-nutrapharm").removeClass("alert-success");
$("#mensaje-nutrapharm").addClass("alert-danger");
$("#mensaje-nutrapharm").html(respuestaJson.msg);
$("#mensaje-nutrapharm").show();
$("#btnGuardar").prop("disabled", false);
},
500: function (respuesta) {
console.log(respuesta.responseText);
var respuestaJson = JSON.parse(respuesta.responseText);
$("#mensaje-nutrapharm").removeClass("alert-success");
$("#mensaje-nutrapharm").addClass("alert-danger");
$("#mensaje-nutrapharm").html(respuestaJson.msg);
$("#mensaje-nutrapharm").show();
$("#btnGuardar").prop("disabled", false);
}
},
success: function (data) {
$("#mensaje-nutrapharm").removeClass("alert-danger");
$("#mensaje-nutrapharm").addClass("alert-success");
$("#mensaje-nutrapharm").html(data.msg);
$("#mensaje-nutrapharm").show();
}
});
}
function mostrarTomarFoto(event) {
event.preventDefault();
console.log("mostrando tomar foto...");
$("#tomarFotoContainer").show();
$("#subirFotoContainer").hide();
imagenTomada = false;
imagenTomada = true;
}
function mostrarSubirFoto(event) { function mostrarSubirFoto(event) {
event.preventDefault(); event.preventDefault();
console.log("mostrando subir foto..."); console.log("mostrando subir foto...");
$("#tomarFotoContainer").hide(); $("#tomarFotoContainer").hide();
$("#subirFotoContainer").show(); $("#subirFotoContainer").show();
imagenTomada = false; imagenTomada = false;
imagenSubida = true; imagenSubida = true;
} }
function readURL(input) { function readURL(input) {
if (input.files && input.files[0]) { if (input.files && input.files[0]) {
var reader = new FileReader(); var reader = new FileReader();
reader.onload = function (e) { reader.onload = function (e) {
$('#imagenUsuario').attr('src', e.target.result); $('#imagenUsuario').attr('src', e.target.result);
}
reader.readAsDataURL(input.files[0]); // convert to base64 string
$('#imagenUsuario').show();
} }
reader.readAsDataURL(input.files[0]); // convert to base64 string
$('#imagenUsuario').show();
} }
}
$("#imgInp").change(function () { $("#imgInp").change(function () {
readURL(this); readURL(this);
}); });
var Upload = function (file) { var Upload = function (file) {
this.file = file; this.file = file;
}; };
Upload.prototype.getType = function () { Upload.prototype.getType = function () {
return this.file.type; return this.file.type;
}; };
Upload.prototype.getSize = function () { Upload.prototype.getSize = function () {
return this.file.size; return this.file.size;
}; };
Upload.prototype.getName = function () { Upload.prototype.getName = function () {
if (this.file != null) if (this.file != null)
return this.file.name; return this.file.name;
else else
return ""; return "";
}; };
Upload.prototype.doUpload = function () { Upload.prototype.doUpload = function () {
var that = this; var that = this;
var url = "{{ path('nutrapharm_upload') }}"; var url = "{{ path('nutrapharm_upload') }}";
var formData = new FormData(); var formData = new FormData();
$("#btnGuardar").prop("disabled", true); $("#btnGuardar").prop("disabled", true);
if(imagenTomada == true && imagenSubida == false){ if (imagenTomada == true && imagenSubida == false) {
formData.append("upload_file", 0); formData.append("upload_file", 0);
formData.append("imagen", $("#photo").attr('src')); formData.append("imagen", $("#photo").attr('src'));
}else if(imagenSubida == true && imagenTomada == false){ } else if (imagenSubida == true && imagenTomada == false) {
formData.append("upload_file", 1); formData.append("upload_file", 1);
} }
console.log(this.file); console.log(this.file);
if (this.file != null) { if (this.file != null) {
formData.append("imagen", this.file, this.getName()); formData.append("imagen", this.file, this.getName());
} }
{% if idp == "none" and fa == 1 and r == 0%}
formData.append("nombreUsuario", $("#nombreUsuario").val());
formData.append("mailUsuario", $("#mailUsuario").val());
formData.append("comentarioFotoUsuario", $("#comentarioFotoUsuario").val());
formData.append("tipoUsuarioFormulario", tipoUsuarioFormulario);
formData.append("usuarioNutraPharm", usuarioNutraPharm);
{% elseif idp != "none" and fa == 0 and r == 0 %}
formData.append("comentarioFotoUsuario", $("#comentarioFotoUsuario").val());
formData.append("usuarioNutraPharm", usuarioNutraPharm);
formData.append("tipoUsuarioFormulario", tipoUsuarioFormulario);
{%endif%}
$.ajax
({
type: "POST",
url: url,
data: formData,
async: true,
cache: false,
contentType: false,
processData: false,
timeout: 60000,
statusCode: {
400: function (respuesta) {
console.log(respuesta.responseText);
var respuestaJson = JSON.parse(respuesta.responseText);
$("#mensaje-nutrapharm").removeClass("alert-success");
$("#mensaje-nutrapharm").addClass("alert-danger");
$("#mensaje-nutrapharm").html(respuestaJson.msg);
$("#mensaje-nutrapharm").show();
$("#btnGuardar").prop("disabled", false);
},
500: function (respuesta) {
console.log(respuesta.responseText);
var respuestaJson = JSON.parse(respuesta.responseText);
$("#mensaje-nutrapharm").removeClass("alert-success");
$("#mensaje-nutrapharm").addClass("alert-danger");
$("#mensaje-nutrapharm").html(respuestaJson.msg);
$("#mensaje-nutrapharm").show();
$("#btnGuardar").prop("disabled", false);
}
},
success: function (data) {
{% if idp != "none" and fa == 0%}
$("#shareButtonContainer").show();
{%endif%}
if (data.tipo === 2) {
tipoUsuarioFormulario = data.tipo;
usuarioNutraPharm = data.usuario;
}
$("#mensaje-nutrapharm").removeClass("alert-danger");
$("#mensaje-nutrapharm").addClass("alert-success");
$("#mensaje-nutrapharm").html(data.msg);
$("#mensaje-nutrapharm").show();
{% if idp == "none" and fa == 1 and r == 0%}
formData.append("nombreUsuario", $("#nombreUsuario").val());
formData.append("mailUsuario", $("#mailUsuario").val());
formData.append("comentarioFotoUsuario", $("#comentarioFotoUsuario").val());
formData.append("tipoUsuarioFormulario", tipoUsuarioFormulario);
formData.append("usuarioNutraPharm", usuarioNutraPharm);
{% elseif idp != "none" and fa == 0 and r == 0 %}
formData.append("comentarioFotoUsuario", $("#comentarioFotoUsuario").val());
formData.append("usuarioNutraPharm", usuarioNutraPharm);
formData.append("tipoUsuarioFormulario", tipoUsuarioFormulario);
{%endif%}
$.ajax
({
type: "POST",
url: url,
data: formData,
async: true,
cache: false,
contentType: false,
processData: false,
timeout: 60000,
statusCode: {
400: function (respuesta) {
console.log(respuesta.responseText);
$("#btnGuardar").prop("disabled", false);
}, },
500: function (respuesta) { complete: function (data) {
$("#btnGuardar").prop("disabled", false); $("#btnGuardar").prop("disabled", false);
} }
}, });
success: function (data) { };
console.log(data);
console.log("Guardado");
{% if idp != "none" and fa == 0%}
$("#shareButtonContainer").show();
{%endif%}
if(data.tipo === 2){
tipoUsuarioFormulario = data.tipo;
usuarioNutraPharm = data.usuario;
}
$("#mensajeFormulario").html("Datos Guardados y/o Actualizados!!");
},
complete: function (data) {
$("#btnGuardar").prop("disabled", false);
}
});
};
$("#btnGuardar").click(function (e) { $("#btnGuardar").click(function (e) {
e.preventDefault(); e.preventDefault();
if (imagenSubida == false && imagenTomada == false) { if (imagenSubida == false && imagenTomada == false) {
$("#mensajeFormulario").html("Debe seleccionar o tomar una imagen!"); $("#mensajeFormulario").html("Debe seleccionar o tomar una imagen!");
return false; return false;
} }
if (typeof upload == "undefined") { if (typeof upload == "undefined") {
upload = new Upload(null); upload = new Upload(null);
} }
upload.doUpload(); upload.doUpload();
}); });
$("#imgInp").on("change", function (e) { $("#imgInp").on("change", function (e) {
e.preventDefault(); e.preventDefault();
if ($(this)[0].files.length != 0) { if ($(this)[0].files.length != 0) {
var file = $(this)[0].files[0]; var file = $(this)[0].files[0];
upload = new Upload(file); upload = new Upload(file);
console.log(upload) console.log(upload)
imagenSubida = true; imagenSubida = true;
} else } else
upload = new Upload(null); upload = new Upload(null);
}); });
</script> </script>
{% endblock %} {% endblock %}
...@@ -39,6 +39,9 @@ ...@@ -39,6 +39,9 @@
<column name="unu_path_foto_final" phpName="UnuPathFotoFinal" type="VARCHAR" size="1000" required="false"/> <column name="unu_path_foto_final" phpName="UnuPathFotoFinal" type="VARCHAR" size="1000" required="false"/>
<column name="unu_ext_final" phpName="UnuExtFinal" type="VARCHAR" size="45" required="false"/> <column name="unu_ext_final" phpName="UnuExtFinal" type="VARCHAR" size="45" required="false"/>
<column name="unu_comentario_final" phpName="UnuComentarioFinal" type="VARCHAR" size="1000" required="false"/> <column name="unu_comentario_final" phpName="UnuComentarioFinal" type="VARCHAR" size="1000" required="false"/>
<column name="unu_foto_comparacion" phpName="UnuFotoComparacion" type="VARCHAR" size="1000" required="false"/>
<column name="unu_ext_comparacion" phpName="UnuExtComparacion" type="VARCHAR" size="45" required="false"/>
<column name="unu_compartido_facebook" phpName="UnuCompartidoFacebook" type="INTEGER" size="6" required="false"/>
<column name="unu_estado" phpName="UnuEstado" type="INTEGER" required="false"/> <column name="unu_estado" phpName="UnuEstado" type="INTEGER" required="false"/>
<column name="unu_eliminado" phpName="UnuEliminado" type="INTEGER" required="false"/> <column name="unu_eliminado" phpName="UnuEliminado" type="INTEGER" required="false"/>
<column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="false"/> <column name="created_at" phpName="CreatedAt" type="TIMESTAMP" required="false"/>
......
...@@ -6,4 +6,11 @@ use AppBundle\Model\om\BaseUsuarioNutrapharmQuery; ...@@ -6,4 +6,11 @@ use AppBundle\Model\om\BaseUsuarioNutrapharmQuery;
class UsuarioNutrapharmQuery extends BaseUsuarioNutrapharmQuery class UsuarioNutrapharmQuery extends BaseUsuarioNutrapharmQuery
{ {
public static function correoRegistrado($correo){
return $this->create()->filterByUnuCorreo($correo)->filterByUnuEliminado(UsuarioNutrapharm::ELIMINADO_FALSE)->count();
}
public static function obtenerUsuarioNutraPharm($idUsuarioNutrapharm){
return $this->create()->filterByUnuIdNutrapharm($idUsuarioNutrapharm)->filterByUnuEliminado(UsuarioNutrapharm::ELIMINADO_FALSE)->findOne();
}
} }
...@@ -54,6 +54,9 @@ class UsuarioNutrapharmTableMap extends TableMap ...@@ -54,6 +54,9 @@ class UsuarioNutrapharmTableMap extends TableMap
$this->addColumn('unu_ext_final', 'UnuExtFinal', 'VARCHAR', false, 45, null); $this->addColumn('unu_ext_final', 'UnuExtFinal', 'VARCHAR', false, 45, null);
$this->addColumn('unu_path_foto_final', 'UnuPathFotoFinal', 'VARCHAR', false, 1000, null); $this->addColumn('unu_path_foto_final', 'UnuPathFotoFinal', 'VARCHAR', false, 1000, null);
$this->addColumn('unu_comentario_final', 'UnuComentarioFinal', 'VARCHAR', false, 1000, null); $this->addColumn('unu_comentario_final', 'UnuComentarioFinal', 'VARCHAR', false, 1000, null);
$this->addColumn('unu_foto_comparacion', 'UnuFotoComparacion', 'VARCHAR', false, 1000, null);
$this->addColumn('unu_ext_comparacion', 'UnuExtComparacion', 'VARCHAR', false, 45, null);
$this->addColumn('unu_compartido_facebook', 'UnuCompartidoFacebook', 'INTEGER', false, 6, null);
$this->addColumn('unu_estado', 'UnuEstado', 'INTEGER', false, null, null); $this->addColumn('unu_estado', 'UnuEstado', 'INTEGER', false, null, null);
$this->addColumn('unu_eliminado', 'UnuEliminado', 'INTEGER', false, null, null); $this->addColumn('unu_eliminado', 'UnuEliminado', 'INTEGER', false, null, null);
$this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null); $this->addColumn('created_at', 'CreatedAt', 'TIMESTAMP', false, null, null);
......
...@@ -114,6 +114,24 @@ abstract class BaseUsuarioNutrapharm extends BaseObject implements Persistent ...@@ -114,6 +114,24 @@ abstract class BaseUsuarioNutrapharm extends BaseObject implements Persistent
*/ */
protected $unu_comentario_final; protected $unu_comentario_final;
/**
* The value for the unu_foto_comparacion field.
* @var string
*/
protected $unu_foto_comparacion;
/**
* The value for the unu_ext_comparacion field.
* @var string
*/
protected $unu_ext_comparacion;
/**
* The value for the unu_compartido_facebook field.
* @var int
*/
protected $unu_compartido_facebook;
/** /**
* The value for the unu_estado field. * The value for the unu_estado field.
* @var int * @var int
...@@ -302,6 +320,39 @@ abstract class BaseUsuarioNutrapharm extends BaseObject implements Persistent ...@@ -302,6 +320,39 @@ abstract class BaseUsuarioNutrapharm extends BaseObject implements Persistent
return $this->unu_comentario_final; return $this->unu_comentario_final;
} }
/**
* Get the [unu_foto_comparacion] column value.
*
* @return string
*/
public function getUnuFotoComparacion()
{
return $this->unu_foto_comparacion;
}
/**
* Get the [unu_ext_comparacion] column value.
*
* @return string
*/
public function getUnuExtComparacion()
{
return $this->unu_ext_comparacion;
}
/**
* Get the [unu_compartido_facebook] column value.
*
* @return int
*/
public function getUnuCompartidoFacebook()
{
return $this->unu_compartido_facebook;
}
/** /**
* Get the [unu_estado] column value. * Get the [unu_estado] column value.
* *
...@@ -656,6 +707,69 @@ abstract class BaseUsuarioNutrapharm extends BaseObject implements Persistent ...@@ -656,6 +707,69 @@ abstract class BaseUsuarioNutrapharm extends BaseObject implements Persistent
return $this; return $this;
} // setUnuComentarioFinal() } // setUnuComentarioFinal()
/**
* Set the value of [unu_foto_comparacion] column.
*
* @param string $v new value
* @return UsuarioNutrapharm The current object (for fluent API support)
*/
public function setUnuFotoComparacion($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->unu_foto_comparacion !== $v) {
$this->unu_foto_comparacion = $v;
$this->modifiedColumns[] = UsuarioNutrapharmPeer::UNU_FOTO_COMPARACION;
}
return $this;
} // setUnuFotoComparacion()
/**
* Set the value of [unu_ext_comparacion] column.
*
* @param string $v new value
* @return UsuarioNutrapharm The current object (for fluent API support)
*/
public function setUnuExtComparacion($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->unu_ext_comparacion !== $v) {
$this->unu_ext_comparacion = $v;
$this->modifiedColumns[] = UsuarioNutrapharmPeer::UNU_EXT_COMPARACION;
}
return $this;
} // setUnuExtComparacion()
/**
* Set the value of [unu_compartido_facebook] column.
*
* @param int $v new value
* @return UsuarioNutrapharm The current object (for fluent API support)
*/
public function setUnuCompartidoFacebook($v)
{
if ($v !== null && is_numeric($v)) {
$v = (int) $v;
}
if ($this->unu_compartido_facebook !== $v) {
$this->unu_compartido_facebook = $v;
$this->modifiedColumns[] = UsuarioNutrapharmPeer::UNU_COMPARTIDO_FACEBOOK;
}
return $this;
} // setUnuCompartidoFacebook()
/** /**
* Set the value of [unu_estado] column. * Set the value of [unu_estado] column.
* *
...@@ -788,10 +902,13 @@ abstract class BaseUsuarioNutrapharm extends BaseObject implements Persistent ...@@ -788,10 +902,13 @@ abstract class BaseUsuarioNutrapharm extends BaseObject implements Persistent
$this->unu_ext_final = ($row[$startcol + 9] !== null) ? (string) $row[$startcol + 9] : null; $this->unu_ext_final = ($row[$startcol + 9] !== null) ? (string) $row[$startcol + 9] : null;
$this->unu_path_foto_final = ($row[$startcol + 10] !== null) ? (string) $row[$startcol + 10] : null; $this->unu_path_foto_final = ($row[$startcol + 10] !== null) ? (string) $row[$startcol + 10] : null;
$this->unu_comentario_final = ($row[$startcol + 11] !== null) ? (string) $row[$startcol + 11] : null; $this->unu_comentario_final = ($row[$startcol + 11] !== null) ? (string) $row[$startcol + 11] : null;
$this->unu_estado = ($row[$startcol + 12] !== null) ? (int) $row[$startcol + 12] : null; $this->unu_foto_comparacion = ($row[$startcol + 12] !== null) ? (string) $row[$startcol + 12] : null;
$this->unu_eliminado = ($row[$startcol + 13] !== null) ? (int) $row[$startcol + 13] : null; $this->unu_ext_comparacion = ($row[$startcol + 13] !== null) ? (string) $row[$startcol + 13] : null;
$this->created_at = ($row[$startcol + 14] !== null) ? (string) $row[$startcol + 14] : null; $this->unu_compartido_facebook = ($row[$startcol + 14] !== null) ? (int) $row[$startcol + 14] : null;
$this->updated_at = ($row[$startcol + 15] !== null) ? (string) $row[$startcol + 15] : null; $this->unu_estado = ($row[$startcol + 15] !== null) ? (int) $row[$startcol + 15] : null;
$this->unu_eliminado = ($row[$startcol + 16] !== null) ? (int) $row[$startcol + 16] : null;
$this->created_at = ($row[$startcol + 17] !== null) ? (string) $row[$startcol + 17] : null;
$this->updated_at = ($row[$startcol + 18] !== null) ? (string) $row[$startcol + 18] : null;
$this->resetModified(); $this->resetModified();
$this->setNew(false); $this->setNew(false);
...@@ -801,7 +918,7 @@ abstract class BaseUsuarioNutrapharm extends BaseObject implements Persistent ...@@ -801,7 +918,7 @@ abstract class BaseUsuarioNutrapharm extends BaseObject implements Persistent
} }
$this->postHydrate($row, $startcol, $rehydrate); $this->postHydrate($row, $startcol, $rehydrate);
return $startcol + 16; // 16 = UsuarioNutrapharmPeer::NUM_HYDRATE_COLUMNS. return $startcol + 19; // 19 = UsuarioNutrapharmPeer::NUM_HYDRATE_COLUMNS.
} catch (Exception $e) { } catch (Exception $e) {
throw new PropelException("Error populating UsuarioNutrapharm object", $e); throw new PropelException("Error populating UsuarioNutrapharm object", $e);
...@@ -1079,6 +1196,15 @@ abstract class BaseUsuarioNutrapharm extends BaseObject implements Persistent ...@@ -1079,6 +1196,15 @@ abstract class BaseUsuarioNutrapharm extends BaseObject implements Persistent
if ($this->isColumnModified(UsuarioNutrapharmPeer::UNU_COMENTARIO_FINAL)) { if ($this->isColumnModified(UsuarioNutrapharmPeer::UNU_COMENTARIO_FINAL)) {
$modifiedColumns[':p' . $index++] = '`unu_comentario_final`'; $modifiedColumns[':p' . $index++] = '`unu_comentario_final`';
} }
if ($this->isColumnModified(UsuarioNutrapharmPeer::UNU_FOTO_COMPARACION)) {
$modifiedColumns[':p' . $index++] = '`unu_foto_comparacion`';
}
if ($this->isColumnModified(UsuarioNutrapharmPeer::UNU_EXT_COMPARACION)) {
$modifiedColumns[':p' . $index++] = '`unu_ext_comparacion`';
}
if ($this->isColumnModified(UsuarioNutrapharmPeer::UNU_COMPARTIDO_FACEBOOK)) {
$modifiedColumns[':p' . $index++] = '`unu_compartido_facebook`';
}
if ($this->isColumnModified(UsuarioNutrapharmPeer::UNU_ESTADO)) { if ($this->isColumnModified(UsuarioNutrapharmPeer::UNU_ESTADO)) {
$modifiedColumns[':p' . $index++] = '`unu_estado`'; $modifiedColumns[':p' . $index++] = '`unu_estado`';
} }
...@@ -1138,6 +1264,15 @@ abstract class BaseUsuarioNutrapharm extends BaseObject implements Persistent ...@@ -1138,6 +1264,15 @@ abstract class BaseUsuarioNutrapharm extends BaseObject implements Persistent
case '`unu_comentario_final`': case '`unu_comentario_final`':
$stmt->bindValue($identifier, $this->unu_comentario_final, PDO::PARAM_STR); $stmt->bindValue($identifier, $this->unu_comentario_final, PDO::PARAM_STR);
break; break;
case '`unu_foto_comparacion`':
$stmt->bindValue($identifier, $this->unu_foto_comparacion, PDO::PARAM_STR);
break;
case '`unu_ext_comparacion`':
$stmt->bindValue($identifier, $this->unu_ext_comparacion, PDO::PARAM_STR);
break;
case '`unu_compartido_facebook`':
$stmt->bindValue($identifier, $this->unu_compartido_facebook, PDO::PARAM_INT);
break;
case '`unu_estado`': case '`unu_estado`':
$stmt->bindValue($identifier, $this->unu_estado, PDO::PARAM_INT); $stmt->bindValue($identifier, $this->unu_estado, PDO::PARAM_INT);
break; break;
...@@ -1329,15 +1464,24 @@ abstract class BaseUsuarioNutrapharm extends BaseObject implements Persistent ...@@ -1329,15 +1464,24 @@ abstract class BaseUsuarioNutrapharm extends BaseObject implements Persistent
return $this->getUnuComentarioFinal(); return $this->getUnuComentarioFinal();
break; break;
case 12: case 12:
return $this->getUnuEstado(); return $this->getUnuFotoComparacion();
break; break;
case 13: case 13:
return $this->getUnuEliminado(); return $this->getUnuExtComparacion();
break; break;
case 14: case 14:
return $this->getCreatedAt(); return $this->getUnuCompartidoFacebook();
break; break;
case 15: case 15:
return $this->getUnuEstado();
break;
case 16:
return $this->getUnuEliminado();
break;
case 17:
return $this->getCreatedAt();
break;
case 18:
return $this->getUpdatedAt(); return $this->getUpdatedAt();
break; break;
default: default:
...@@ -1381,10 +1525,13 @@ abstract class BaseUsuarioNutrapharm extends BaseObject implements Persistent ...@@ -1381,10 +1525,13 @@ abstract class BaseUsuarioNutrapharm extends BaseObject implements Persistent
$keys[9] => $this->getUnuExtFinal(), $keys[9] => $this->getUnuExtFinal(),
$keys[10] => $this->getUnuPathFotoFinal(), $keys[10] => $this->getUnuPathFotoFinal(),
$keys[11] => $this->getUnuComentarioFinal(), $keys[11] => $this->getUnuComentarioFinal(),
$keys[12] => $this->getUnuEstado(), $keys[12] => $this->getUnuFotoComparacion(),
$keys[13] => $this->getUnuEliminado(), $keys[13] => $this->getUnuExtComparacion(),
$keys[14] => $this->getCreatedAt(), $keys[14] => $this->getUnuCompartidoFacebook(),
$keys[15] => $this->getUpdatedAt(), $keys[15] => $this->getUnuEstado(),
$keys[16] => $this->getUnuEliminado(),
$keys[17] => $this->getCreatedAt(),
$keys[18] => $this->getUpdatedAt(),
); );
$virtualColumns = $this->virtualColumns; $virtualColumns = $this->virtualColumns;
foreach ($virtualColumns as $key => $virtualColumn) { foreach ($virtualColumns as $key => $virtualColumn) {
...@@ -1466,15 +1613,24 @@ abstract class BaseUsuarioNutrapharm extends BaseObject implements Persistent ...@@ -1466,15 +1613,24 @@ abstract class BaseUsuarioNutrapharm extends BaseObject implements Persistent
$this->setUnuComentarioFinal($value); $this->setUnuComentarioFinal($value);
break; break;
case 12: case 12:
$this->setUnuEstado($value); $this->setUnuFotoComparacion($value);
break; break;
case 13: case 13:
$this->setUnuEliminado($value); $this->setUnuExtComparacion($value);
break; break;
case 14: case 14:
$this->setCreatedAt($value); $this->setUnuCompartidoFacebook($value);
break; break;
case 15: case 15:
$this->setUnuEstado($value);
break;
case 16:
$this->setUnuEliminado($value);
break;
case 17:
$this->setCreatedAt($value);
break;
case 18:
$this->setUpdatedAt($value); $this->setUpdatedAt($value);
break; break;
} // switch() } // switch()
...@@ -1513,10 +1669,13 @@ abstract class BaseUsuarioNutrapharm extends BaseObject implements Persistent ...@@ -1513,10 +1669,13 @@ abstract class BaseUsuarioNutrapharm extends BaseObject implements Persistent
if (array_key_exists($keys[9], $arr)) $this->setUnuExtFinal($arr[$keys[9]]); if (array_key_exists($keys[9], $arr)) $this->setUnuExtFinal($arr[$keys[9]]);
if (array_key_exists($keys[10], $arr)) $this->setUnuPathFotoFinal($arr[$keys[10]]); if (array_key_exists($keys[10], $arr)) $this->setUnuPathFotoFinal($arr[$keys[10]]);
if (array_key_exists($keys[11], $arr)) $this->setUnuComentarioFinal($arr[$keys[11]]); if (array_key_exists($keys[11], $arr)) $this->setUnuComentarioFinal($arr[$keys[11]]);
if (array_key_exists($keys[12], $arr)) $this->setUnuEstado($arr[$keys[12]]); if (array_key_exists($keys[12], $arr)) $this->setUnuFotoComparacion($arr[$keys[12]]);
if (array_key_exists($keys[13], $arr)) $this->setUnuEliminado($arr[$keys[13]]); if (array_key_exists($keys[13], $arr)) $this->setUnuExtComparacion($arr[$keys[13]]);
if (array_key_exists($keys[14], $arr)) $this->setCreatedAt($arr[$keys[14]]); if (array_key_exists($keys[14], $arr)) $this->setUnuCompartidoFacebook($arr[$keys[14]]);
if (array_key_exists($keys[15], $arr)) $this->setUpdatedAt($arr[$keys[15]]); if (array_key_exists($keys[15], $arr)) $this->setUnuEstado($arr[$keys[15]]);
if (array_key_exists($keys[16], $arr)) $this->setUnuEliminado($arr[$keys[16]]);
if (array_key_exists($keys[17], $arr)) $this->setCreatedAt($arr[$keys[17]]);
if (array_key_exists($keys[18], $arr)) $this->setUpdatedAt($arr[$keys[18]]);
} }
/** /**
...@@ -1540,6 +1699,9 @@ abstract class BaseUsuarioNutrapharm extends BaseObject implements Persistent ...@@ -1540,6 +1699,9 @@ abstract class BaseUsuarioNutrapharm extends BaseObject implements Persistent
if ($this->isColumnModified(UsuarioNutrapharmPeer::UNU_EXT_FINAL)) $criteria->add(UsuarioNutrapharmPeer::UNU_EXT_FINAL, $this->unu_ext_final); if ($this->isColumnModified(UsuarioNutrapharmPeer::UNU_EXT_FINAL)) $criteria->add(UsuarioNutrapharmPeer::UNU_EXT_FINAL, $this->unu_ext_final);
if ($this->isColumnModified(UsuarioNutrapharmPeer::UNU_PATH_FOTO_FINAL)) $criteria->add(UsuarioNutrapharmPeer::UNU_PATH_FOTO_FINAL, $this->unu_path_foto_final); if ($this->isColumnModified(UsuarioNutrapharmPeer::UNU_PATH_FOTO_FINAL)) $criteria->add(UsuarioNutrapharmPeer::UNU_PATH_FOTO_FINAL, $this->unu_path_foto_final);
if ($this->isColumnModified(UsuarioNutrapharmPeer::UNU_COMENTARIO_FINAL)) $criteria->add(UsuarioNutrapharmPeer::UNU_COMENTARIO_FINAL, $this->unu_comentario_final); if ($this->isColumnModified(UsuarioNutrapharmPeer::UNU_COMENTARIO_FINAL)) $criteria->add(UsuarioNutrapharmPeer::UNU_COMENTARIO_FINAL, $this->unu_comentario_final);
if ($this->isColumnModified(UsuarioNutrapharmPeer::UNU_FOTO_COMPARACION)) $criteria->add(UsuarioNutrapharmPeer::UNU_FOTO_COMPARACION, $this->unu_foto_comparacion);
if ($this->isColumnModified(UsuarioNutrapharmPeer::UNU_EXT_COMPARACION)) $criteria->add(UsuarioNutrapharmPeer::UNU_EXT_COMPARACION, $this->unu_ext_comparacion);
if ($this->isColumnModified(UsuarioNutrapharmPeer::UNU_COMPARTIDO_FACEBOOK)) $criteria->add(UsuarioNutrapharmPeer::UNU_COMPARTIDO_FACEBOOK, $this->unu_compartido_facebook);
if ($this->isColumnModified(UsuarioNutrapharmPeer::UNU_ESTADO)) $criteria->add(UsuarioNutrapharmPeer::UNU_ESTADO, $this->unu_estado); if ($this->isColumnModified(UsuarioNutrapharmPeer::UNU_ESTADO)) $criteria->add(UsuarioNutrapharmPeer::UNU_ESTADO, $this->unu_estado);
if ($this->isColumnModified(UsuarioNutrapharmPeer::UNU_ELIMINADO)) $criteria->add(UsuarioNutrapharmPeer::UNU_ELIMINADO, $this->unu_eliminado); if ($this->isColumnModified(UsuarioNutrapharmPeer::UNU_ELIMINADO)) $criteria->add(UsuarioNutrapharmPeer::UNU_ELIMINADO, $this->unu_eliminado);
if ($this->isColumnModified(UsuarioNutrapharmPeer::CREATED_AT)) $criteria->add(UsuarioNutrapharmPeer::CREATED_AT, $this->created_at); if ($this->isColumnModified(UsuarioNutrapharmPeer::CREATED_AT)) $criteria->add(UsuarioNutrapharmPeer::CREATED_AT, $this->created_at);
...@@ -1618,6 +1780,9 @@ abstract class BaseUsuarioNutrapharm extends BaseObject implements Persistent ...@@ -1618,6 +1780,9 @@ abstract class BaseUsuarioNutrapharm extends BaseObject implements Persistent
$copyObj->setUnuExtFinal($this->getUnuExtFinal()); $copyObj->setUnuExtFinal($this->getUnuExtFinal());
$copyObj->setUnuPathFotoFinal($this->getUnuPathFotoFinal()); $copyObj->setUnuPathFotoFinal($this->getUnuPathFotoFinal());
$copyObj->setUnuComentarioFinal($this->getUnuComentarioFinal()); $copyObj->setUnuComentarioFinal($this->getUnuComentarioFinal());
$copyObj->setUnuFotoComparacion($this->getUnuFotoComparacion());
$copyObj->setUnuExtComparacion($this->getUnuExtComparacion());
$copyObj->setUnuCompartidoFacebook($this->getUnuCompartidoFacebook());
$copyObj->setUnuEstado($this->getUnuEstado()); $copyObj->setUnuEstado($this->getUnuEstado());
$copyObj->setUnuEliminado($this->getUnuEliminado()); $copyObj->setUnuEliminado($this->getUnuEliminado());
$copyObj->setCreatedAt($this->getCreatedAt()); $copyObj->setCreatedAt($this->getCreatedAt());
...@@ -1944,6 +2109,9 @@ abstract class BaseUsuarioNutrapharm extends BaseObject implements Persistent ...@@ -1944,6 +2109,9 @@ abstract class BaseUsuarioNutrapharm extends BaseObject implements Persistent
$this->unu_ext_final = null; $this->unu_ext_final = null;
$this->unu_path_foto_final = null; $this->unu_path_foto_final = null;
$this->unu_comentario_final = null; $this->unu_comentario_final = null;
$this->unu_foto_comparacion = null;
$this->unu_ext_comparacion = null;
$this->unu_compartido_facebook = null;
$this->unu_estado = null; $this->unu_estado = null;
$this->unu_eliminado = null; $this->unu_eliminado = null;
$this->created_at = null; $this->created_at = null;
......
...@@ -29,13 +29,13 @@ abstract class BaseUsuarioNutrapharmPeer ...@@ -29,13 +29,13 @@ abstract class BaseUsuarioNutrapharmPeer
const TM_CLASS = 'AppBundle\\Model\\map\\UsuarioNutrapharmTableMap'; const TM_CLASS = 'AppBundle\\Model\\map\\UsuarioNutrapharmTableMap';
/** The total number of columns. */ /** The total number of columns. */
const NUM_COLUMNS = 16; const NUM_COLUMNS = 19;
/** The number of lazy-loaded columns. */ /** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0; const NUM_LAZY_LOAD_COLUMNS = 0;
/** The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS) */ /** The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS) */
const NUM_HYDRATE_COLUMNS = 16; const NUM_HYDRATE_COLUMNS = 19;
/** the column name for the unu_id field */ /** the column name for the unu_id field */
const UNU_ID = 'usuario_nutrapharm.unu_id'; const UNU_ID = 'usuario_nutrapharm.unu_id';
...@@ -73,6 +73,15 @@ abstract class BaseUsuarioNutrapharmPeer ...@@ -73,6 +73,15 @@ abstract class BaseUsuarioNutrapharmPeer
/** the column name for the unu_comentario_final field */ /** the column name for the unu_comentario_final field */
const UNU_COMENTARIO_FINAL = 'usuario_nutrapharm.unu_comentario_final'; const UNU_COMENTARIO_FINAL = 'usuario_nutrapharm.unu_comentario_final';
/** the column name for the unu_foto_comparacion field */
const UNU_FOTO_COMPARACION = 'usuario_nutrapharm.unu_foto_comparacion';
/** the column name for the unu_ext_comparacion field */
const UNU_EXT_COMPARACION = 'usuario_nutrapharm.unu_ext_comparacion';
/** the column name for the unu_compartido_facebook field */
const UNU_COMPARTIDO_FACEBOOK = 'usuario_nutrapharm.unu_compartido_facebook';
/** the column name for the unu_estado field */ /** the column name for the unu_estado field */
const UNU_ESTADO = 'usuario_nutrapharm.unu_estado'; const UNU_ESTADO = 'usuario_nutrapharm.unu_estado';
...@@ -104,12 +113,12 @@ abstract class BaseUsuarioNutrapharmPeer ...@@ -104,12 +113,12 @@ abstract class BaseUsuarioNutrapharmPeer
* e.g. UsuarioNutrapharmPeer::$fieldNames[UsuarioNutrapharmPeer::TYPE_PHPNAME][0] = 'Id' * e.g. UsuarioNutrapharmPeer::$fieldNames[UsuarioNutrapharmPeer::TYPE_PHPNAME][0] = 'Id'
*/ */
protected static $fieldNames = array ( protected static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('UnuId', 'UnuUa', 'UnuIp', 'UnuIdNutrapharm', 'UnuNombre', 'UnuCorreo', 'UnuPathFotoInicial', 'UnuExtInicial', 'UnuComentarioInicial', 'UnuExtFinal', 'UnuPathFotoFinal', 'UnuComentarioFinal', 'UnuEstado', 'UnuEliminado', 'CreatedAt', 'UpdatedAt', ), BasePeer::TYPE_PHPNAME => array ('UnuId', 'UnuUa', 'UnuIp', 'UnuIdNutrapharm', 'UnuNombre', 'UnuCorreo', 'UnuPathFotoInicial', 'UnuExtInicial', 'UnuComentarioInicial', 'UnuExtFinal', 'UnuPathFotoFinal', 'UnuComentarioFinal', 'UnuFotoComparacion', 'UnuExtComparacion', 'UnuCompartidoFacebook', 'UnuEstado', 'UnuEliminado', 'CreatedAt', 'UpdatedAt', ),
BasePeer::TYPE_STUDLYPHPNAME => array ('unuId', 'unuUa', 'unuIp', 'unuIdNutrapharm', 'unuNombre', 'unuCorreo', 'unuPathFotoInicial', 'unuExtInicial', 'unuComentarioInicial', 'unuExtFinal', 'unuPathFotoFinal', 'unuComentarioFinal', 'unuEstado', 'unuEliminado', 'createdAt', 'updatedAt', ), BasePeer::TYPE_STUDLYPHPNAME => array ('unuId', 'unuUa', 'unuIp', 'unuIdNutrapharm', 'unuNombre', 'unuCorreo', 'unuPathFotoInicial', 'unuExtInicial', 'unuComentarioInicial', 'unuExtFinal', 'unuPathFotoFinal', 'unuComentarioFinal', 'unuFotoComparacion', 'unuExtComparacion', 'unuCompartidoFacebook', 'unuEstado', 'unuEliminado', 'createdAt', 'updatedAt', ),
BasePeer::TYPE_COLNAME => array (UsuarioNutrapharmPeer::UNU_ID, UsuarioNutrapharmPeer::UNU_UA, UsuarioNutrapharmPeer::UNU_IP, UsuarioNutrapharmPeer::UNU_ID_NUTRAPHARM, UsuarioNutrapharmPeer::UNU_NOMBRE, UsuarioNutrapharmPeer::UNU_CORREO, UsuarioNutrapharmPeer::UNU_PATH_FOTO_INICIAL, UsuarioNutrapharmPeer::UNU_EXT_INICIAL, UsuarioNutrapharmPeer::UNU_COMENTARIO_INICIAL, UsuarioNutrapharmPeer::UNU_EXT_FINAL, UsuarioNutrapharmPeer::UNU_PATH_FOTO_FINAL, UsuarioNutrapharmPeer::UNU_COMENTARIO_FINAL, UsuarioNutrapharmPeer::UNU_ESTADO, UsuarioNutrapharmPeer::UNU_ELIMINADO, UsuarioNutrapharmPeer::CREATED_AT, UsuarioNutrapharmPeer::UPDATED_AT, ), BasePeer::TYPE_COLNAME => array (UsuarioNutrapharmPeer::UNU_ID, UsuarioNutrapharmPeer::UNU_UA, UsuarioNutrapharmPeer::UNU_IP, UsuarioNutrapharmPeer::UNU_ID_NUTRAPHARM, UsuarioNutrapharmPeer::UNU_NOMBRE, UsuarioNutrapharmPeer::UNU_CORREO, UsuarioNutrapharmPeer::UNU_PATH_FOTO_INICIAL, UsuarioNutrapharmPeer::UNU_EXT_INICIAL, UsuarioNutrapharmPeer::UNU_COMENTARIO_INICIAL, UsuarioNutrapharmPeer::UNU_EXT_FINAL, UsuarioNutrapharmPeer::UNU_PATH_FOTO_FINAL, UsuarioNutrapharmPeer::UNU_COMENTARIO_FINAL, UsuarioNutrapharmPeer::UNU_FOTO_COMPARACION, UsuarioNutrapharmPeer::UNU_EXT_COMPARACION, UsuarioNutrapharmPeer::UNU_COMPARTIDO_FACEBOOK, UsuarioNutrapharmPeer::UNU_ESTADO, UsuarioNutrapharmPeer::UNU_ELIMINADO, UsuarioNutrapharmPeer::CREATED_AT, UsuarioNutrapharmPeer::UPDATED_AT, ),
BasePeer::TYPE_RAW_COLNAME => array ('UNU_ID', 'UNU_UA', 'UNU_IP', 'UNU_ID_NUTRAPHARM', 'UNU_NOMBRE', 'UNU_CORREO', 'UNU_PATH_FOTO_INICIAL', 'UNU_EXT_INICIAL', 'UNU_COMENTARIO_INICIAL', 'UNU_EXT_FINAL', 'UNU_PATH_FOTO_FINAL', 'UNU_COMENTARIO_FINAL', 'UNU_ESTADO', 'UNU_ELIMINADO', 'CREATED_AT', 'UPDATED_AT', ), BasePeer::TYPE_RAW_COLNAME => array ('UNU_ID', 'UNU_UA', 'UNU_IP', 'UNU_ID_NUTRAPHARM', 'UNU_NOMBRE', 'UNU_CORREO', 'UNU_PATH_FOTO_INICIAL', 'UNU_EXT_INICIAL', 'UNU_COMENTARIO_INICIAL', 'UNU_EXT_FINAL', 'UNU_PATH_FOTO_FINAL', 'UNU_COMENTARIO_FINAL', 'UNU_FOTO_COMPARACION', 'UNU_EXT_COMPARACION', 'UNU_COMPARTIDO_FACEBOOK', 'UNU_ESTADO', 'UNU_ELIMINADO', 'CREATED_AT', 'UPDATED_AT', ),
BasePeer::TYPE_FIELDNAME => array ('unu_id', 'unu_ua', 'unu_ip', 'unu_id_nutrapharm', 'unu_nombre', 'unu_correo', 'unu_path_foto_inicial', 'unu_ext_inicial', 'unu_comentario_inicial', 'unu_ext_final', 'unu_path_foto_final', 'unu_comentario_final', 'unu_estado', 'unu_eliminado', 'created_at', 'updated_at', ), BasePeer::TYPE_FIELDNAME => array ('unu_id', 'unu_ua', 'unu_ip', 'unu_id_nutrapharm', 'unu_nombre', 'unu_correo', 'unu_path_foto_inicial', 'unu_ext_inicial', 'unu_comentario_inicial', 'unu_ext_final', 'unu_path_foto_final', 'unu_comentario_final', 'unu_foto_comparacion', 'unu_ext_comparacion', 'unu_compartido_facebook', 'unu_estado', 'unu_eliminado', 'created_at', 'updated_at', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, ) BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, )
); );
/** /**
...@@ -119,12 +128,12 @@ abstract class BaseUsuarioNutrapharmPeer ...@@ -119,12 +128,12 @@ abstract class BaseUsuarioNutrapharmPeer
* e.g. UsuarioNutrapharmPeer::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 * e.g. UsuarioNutrapharmPeer::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/ */
protected static $fieldKeys = array ( protected static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('UnuId' => 0, 'UnuUa' => 1, 'UnuIp' => 2, 'UnuIdNutrapharm' => 3, 'UnuNombre' => 4, 'UnuCorreo' => 5, 'UnuPathFotoInicial' => 6, 'UnuExtInicial' => 7, 'UnuComentarioInicial' => 8, 'UnuExtFinal' => 9, 'UnuPathFotoFinal' => 10, 'UnuComentarioFinal' => 11, 'UnuEstado' => 12, 'UnuEliminado' => 13, 'CreatedAt' => 14, 'UpdatedAt' => 15, ), BasePeer::TYPE_PHPNAME => array ('UnuId' => 0, 'UnuUa' => 1, 'UnuIp' => 2, 'UnuIdNutrapharm' => 3, 'UnuNombre' => 4, 'UnuCorreo' => 5, 'UnuPathFotoInicial' => 6, 'UnuExtInicial' => 7, 'UnuComentarioInicial' => 8, 'UnuExtFinal' => 9, 'UnuPathFotoFinal' => 10, 'UnuComentarioFinal' => 11, 'UnuFotoComparacion' => 12, 'UnuExtComparacion' => 13, 'UnuCompartidoFacebook' => 14, 'UnuEstado' => 15, 'UnuEliminado' => 16, 'CreatedAt' => 17, 'UpdatedAt' => 18, ),
BasePeer::TYPE_STUDLYPHPNAME => array ('unuId' => 0, 'unuUa' => 1, 'unuIp' => 2, 'unuIdNutrapharm' => 3, 'unuNombre' => 4, 'unuCorreo' => 5, 'unuPathFotoInicial' => 6, 'unuExtInicial' => 7, 'unuComentarioInicial' => 8, 'unuExtFinal' => 9, 'unuPathFotoFinal' => 10, 'unuComentarioFinal' => 11, 'unuEstado' => 12, 'unuEliminado' => 13, 'createdAt' => 14, 'updatedAt' => 15, ), BasePeer::TYPE_STUDLYPHPNAME => array ('unuId' => 0, 'unuUa' => 1, 'unuIp' => 2, 'unuIdNutrapharm' => 3, 'unuNombre' => 4, 'unuCorreo' => 5, 'unuPathFotoInicial' => 6, 'unuExtInicial' => 7, 'unuComentarioInicial' => 8, 'unuExtFinal' => 9, 'unuPathFotoFinal' => 10, 'unuComentarioFinal' => 11, 'unuFotoComparacion' => 12, 'unuExtComparacion' => 13, 'unuCompartidoFacebook' => 14, 'unuEstado' => 15, 'unuEliminado' => 16, 'createdAt' => 17, 'updatedAt' => 18, ),
BasePeer::TYPE_COLNAME => array (UsuarioNutrapharmPeer::UNU_ID => 0, UsuarioNutrapharmPeer::UNU_UA => 1, UsuarioNutrapharmPeer::UNU_IP => 2, UsuarioNutrapharmPeer::UNU_ID_NUTRAPHARM => 3, UsuarioNutrapharmPeer::UNU_NOMBRE => 4, UsuarioNutrapharmPeer::UNU_CORREO => 5, UsuarioNutrapharmPeer::UNU_PATH_FOTO_INICIAL => 6, UsuarioNutrapharmPeer::UNU_EXT_INICIAL => 7, UsuarioNutrapharmPeer::UNU_COMENTARIO_INICIAL => 8, UsuarioNutrapharmPeer::UNU_EXT_FINAL => 9, UsuarioNutrapharmPeer::UNU_PATH_FOTO_FINAL => 10, UsuarioNutrapharmPeer::UNU_COMENTARIO_FINAL => 11, UsuarioNutrapharmPeer::UNU_ESTADO => 12, UsuarioNutrapharmPeer::UNU_ELIMINADO => 13, UsuarioNutrapharmPeer::CREATED_AT => 14, UsuarioNutrapharmPeer::UPDATED_AT => 15, ), BasePeer::TYPE_COLNAME => array (UsuarioNutrapharmPeer::UNU_ID => 0, UsuarioNutrapharmPeer::UNU_UA => 1, UsuarioNutrapharmPeer::UNU_IP => 2, UsuarioNutrapharmPeer::UNU_ID_NUTRAPHARM => 3, UsuarioNutrapharmPeer::UNU_NOMBRE => 4, UsuarioNutrapharmPeer::UNU_CORREO => 5, UsuarioNutrapharmPeer::UNU_PATH_FOTO_INICIAL => 6, UsuarioNutrapharmPeer::UNU_EXT_INICIAL => 7, UsuarioNutrapharmPeer::UNU_COMENTARIO_INICIAL => 8, UsuarioNutrapharmPeer::UNU_EXT_FINAL => 9, UsuarioNutrapharmPeer::UNU_PATH_FOTO_FINAL => 10, UsuarioNutrapharmPeer::UNU_COMENTARIO_FINAL => 11, UsuarioNutrapharmPeer::UNU_FOTO_COMPARACION => 12, UsuarioNutrapharmPeer::UNU_EXT_COMPARACION => 13, UsuarioNutrapharmPeer::UNU_COMPARTIDO_FACEBOOK => 14, UsuarioNutrapharmPeer::UNU_ESTADO => 15, UsuarioNutrapharmPeer::UNU_ELIMINADO => 16, UsuarioNutrapharmPeer::CREATED_AT => 17, UsuarioNutrapharmPeer::UPDATED_AT => 18, ),
BasePeer::TYPE_RAW_COLNAME => array ('UNU_ID' => 0, 'UNU_UA' => 1, 'UNU_IP' => 2, 'UNU_ID_NUTRAPHARM' => 3, 'UNU_NOMBRE' => 4, 'UNU_CORREO' => 5, 'UNU_PATH_FOTO_INICIAL' => 6, 'UNU_EXT_INICIAL' => 7, 'UNU_COMENTARIO_INICIAL' => 8, 'UNU_EXT_FINAL' => 9, 'UNU_PATH_FOTO_FINAL' => 10, 'UNU_COMENTARIO_FINAL' => 11, 'UNU_ESTADO' => 12, 'UNU_ELIMINADO' => 13, 'CREATED_AT' => 14, 'UPDATED_AT' => 15, ), BasePeer::TYPE_RAW_COLNAME => array ('UNU_ID' => 0, 'UNU_UA' => 1, 'UNU_IP' => 2, 'UNU_ID_NUTRAPHARM' => 3, 'UNU_NOMBRE' => 4, 'UNU_CORREO' => 5, 'UNU_PATH_FOTO_INICIAL' => 6, 'UNU_EXT_INICIAL' => 7, 'UNU_COMENTARIO_INICIAL' => 8, 'UNU_EXT_FINAL' => 9, 'UNU_PATH_FOTO_FINAL' => 10, 'UNU_COMENTARIO_FINAL' => 11, 'UNU_FOTO_COMPARACION' => 12, 'UNU_EXT_COMPARACION' => 13, 'UNU_COMPARTIDO_FACEBOOK' => 14, 'UNU_ESTADO' => 15, 'UNU_ELIMINADO' => 16, 'CREATED_AT' => 17, 'UPDATED_AT' => 18, ),
BasePeer::TYPE_FIELDNAME => array ('unu_id' => 0, 'unu_ua' => 1, 'unu_ip' => 2, 'unu_id_nutrapharm' => 3, 'unu_nombre' => 4, 'unu_correo' => 5, 'unu_path_foto_inicial' => 6, 'unu_ext_inicial' => 7, 'unu_comentario_inicial' => 8, 'unu_ext_final' => 9, 'unu_path_foto_final' => 10, 'unu_comentario_final' => 11, 'unu_estado' => 12, 'unu_eliminado' => 13, 'created_at' => 14, 'updated_at' => 15, ), BasePeer::TYPE_FIELDNAME => array ('unu_id' => 0, 'unu_ua' => 1, 'unu_ip' => 2, 'unu_id_nutrapharm' => 3, 'unu_nombre' => 4, 'unu_correo' => 5, 'unu_path_foto_inicial' => 6, 'unu_ext_inicial' => 7, 'unu_comentario_inicial' => 8, 'unu_ext_final' => 9, 'unu_path_foto_final' => 10, 'unu_comentario_final' => 11, 'unu_foto_comparacion' => 12, 'unu_ext_comparacion' => 13, 'unu_compartido_facebook' => 14, 'unu_estado' => 15, 'unu_eliminado' => 16, 'created_at' => 17, 'updated_at' => 18, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, ) BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, )
); );
/** /**
...@@ -210,6 +219,9 @@ abstract class BaseUsuarioNutrapharmPeer ...@@ -210,6 +219,9 @@ abstract class BaseUsuarioNutrapharmPeer
$criteria->addSelectColumn(UsuarioNutrapharmPeer::UNU_EXT_FINAL); $criteria->addSelectColumn(UsuarioNutrapharmPeer::UNU_EXT_FINAL);
$criteria->addSelectColumn(UsuarioNutrapharmPeer::UNU_PATH_FOTO_FINAL); $criteria->addSelectColumn(UsuarioNutrapharmPeer::UNU_PATH_FOTO_FINAL);
$criteria->addSelectColumn(UsuarioNutrapharmPeer::UNU_COMENTARIO_FINAL); $criteria->addSelectColumn(UsuarioNutrapharmPeer::UNU_COMENTARIO_FINAL);
$criteria->addSelectColumn(UsuarioNutrapharmPeer::UNU_FOTO_COMPARACION);
$criteria->addSelectColumn(UsuarioNutrapharmPeer::UNU_EXT_COMPARACION);
$criteria->addSelectColumn(UsuarioNutrapharmPeer::UNU_COMPARTIDO_FACEBOOK);
$criteria->addSelectColumn(UsuarioNutrapharmPeer::UNU_ESTADO); $criteria->addSelectColumn(UsuarioNutrapharmPeer::UNU_ESTADO);
$criteria->addSelectColumn(UsuarioNutrapharmPeer::UNU_ELIMINADO); $criteria->addSelectColumn(UsuarioNutrapharmPeer::UNU_ELIMINADO);
$criteria->addSelectColumn(UsuarioNutrapharmPeer::CREATED_AT); $criteria->addSelectColumn(UsuarioNutrapharmPeer::CREATED_AT);
...@@ -227,6 +239,9 @@ abstract class BaseUsuarioNutrapharmPeer ...@@ -227,6 +239,9 @@ abstract class BaseUsuarioNutrapharmPeer
$criteria->addSelectColumn($alias . '.unu_ext_final'); $criteria->addSelectColumn($alias . '.unu_ext_final');
$criteria->addSelectColumn($alias . '.unu_path_foto_final'); $criteria->addSelectColumn($alias . '.unu_path_foto_final');
$criteria->addSelectColumn($alias . '.unu_comentario_final'); $criteria->addSelectColumn($alias . '.unu_comentario_final');
$criteria->addSelectColumn($alias . '.unu_foto_comparacion');
$criteria->addSelectColumn($alias . '.unu_ext_comparacion');
$criteria->addSelectColumn($alias . '.unu_compartido_facebook');
$criteria->addSelectColumn($alias . '.unu_estado'); $criteria->addSelectColumn($alias . '.unu_estado');
$criteria->addSelectColumn($alias . '.unu_eliminado'); $criteria->addSelectColumn($alias . '.unu_eliminado');
$criteria->addSelectColumn($alias . '.created_at'); $criteria->addSelectColumn($alias . '.created_at');
......
...@@ -30,6 +30,9 @@ use AppBundle\Model\UsuarioNutrapharmQuery; ...@@ -30,6 +30,9 @@ use AppBundle\Model\UsuarioNutrapharmQuery;
* @method UsuarioNutrapharmQuery orderByUnuExtFinal($order = Criteria::ASC) Order by the unu_ext_final column * @method UsuarioNutrapharmQuery orderByUnuExtFinal($order = Criteria::ASC) Order by the unu_ext_final column
* @method UsuarioNutrapharmQuery orderByUnuPathFotoFinal($order = Criteria::ASC) Order by the unu_path_foto_final column * @method UsuarioNutrapharmQuery orderByUnuPathFotoFinal($order = Criteria::ASC) Order by the unu_path_foto_final column
* @method UsuarioNutrapharmQuery orderByUnuComentarioFinal($order = Criteria::ASC) Order by the unu_comentario_final column * @method UsuarioNutrapharmQuery orderByUnuComentarioFinal($order = Criteria::ASC) Order by the unu_comentario_final column
* @method UsuarioNutrapharmQuery orderByUnuFotoComparacion($order = Criteria::ASC) Order by the unu_foto_comparacion column
* @method UsuarioNutrapharmQuery orderByUnuExtComparacion($order = Criteria::ASC) Order by the unu_ext_comparacion column
* @method UsuarioNutrapharmQuery orderByUnuCompartidoFacebook($order = Criteria::ASC) Order by the unu_compartido_facebook column
* @method UsuarioNutrapharmQuery orderByUnuEstado($order = Criteria::ASC) Order by the unu_estado column * @method UsuarioNutrapharmQuery orderByUnuEstado($order = Criteria::ASC) Order by the unu_estado column
* @method UsuarioNutrapharmQuery orderByUnuEliminado($order = Criteria::ASC) Order by the unu_eliminado column * @method UsuarioNutrapharmQuery orderByUnuEliminado($order = Criteria::ASC) Order by the unu_eliminado column
* @method UsuarioNutrapharmQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column * @method UsuarioNutrapharmQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
...@@ -47,6 +50,9 @@ use AppBundle\Model\UsuarioNutrapharmQuery; ...@@ -47,6 +50,9 @@ use AppBundle\Model\UsuarioNutrapharmQuery;
* @method UsuarioNutrapharmQuery groupByUnuExtFinal() Group by the unu_ext_final column * @method UsuarioNutrapharmQuery groupByUnuExtFinal() Group by the unu_ext_final column
* @method UsuarioNutrapharmQuery groupByUnuPathFotoFinal() Group by the unu_path_foto_final column * @method UsuarioNutrapharmQuery groupByUnuPathFotoFinal() Group by the unu_path_foto_final column
* @method UsuarioNutrapharmQuery groupByUnuComentarioFinal() Group by the unu_comentario_final column * @method UsuarioNutrapharmQuery groupByUnuComentarioFinal() Group by the unu_comentario_final column
* @method UsuarioNutrapharmQuery groupByUnuFotoComparacion() Group by the unu_foto_comparacion column
* @method UsuarioNutrapharmQuery groupByUnuExtComparacion() Group by the unu_ext_comparacion column
* @method UsuarioNutrapharmQuery groupByUnuCompartidoFacebook() Group by the unu_compartido_facebook column
* @method UsuarioNutrapharmQuery groupByUnuEstado() Group by the unu_estado column * @method UsuarioNutrapharmQuery groupByUnuEstado() Group by the unu_estado column
* @method UsuarioNutrapharmQuery groupByUnuEliminado() Group by the unu_eliminado column * @method UsuarioNutrapharmQuery groupByUnuEliminado() Group by the unu_eliminado column
* @method UsuarioNutrapharmQuery groupByCreatedAt() Group by the created_at column * @method UsuarioNutrapharmQuery groupByCreatedAt() Group by the created_at column
...@@ -74,6 +80,9 @@ use AppBundle\Model\UsuarioNutrapharmQuery; ...@@ -74,6 +80,9 @@ use AppBundle\Model\UsuarioNutrapharmQuery;
* @method UsuarioNutrapharm findOneByUnuExtFinal(string $unu_ext_final) Return the first UsuarioNutrapharm filtered by the unu_ext_final column * @method UsuarioNutrapharm findOneByUnuExtFinal(string $unu_ext_final) Return the first UsuarioNutrapharm filtered by the unu_ext_final column
* @method UsuarioNutrapharm findOneByUnuPathFotoFinal(string $unu_path_foto_final) Return the first UsuarioNutrapharm filtered by the unu_path_foto_final column * @method UsuarioNutrapharm findOneByUnuPathFotoFinal(string $unu_path_foto_final) Return the first UsuarioNutrapharm filtered by the unu_path_foto_final column
* @method UsuarioNutrapharm findOneByUnuComentarioFinal(string $unu_comentario_final) Return the first UsuarioNutrapharm filtered by the unu_comentario_final column * @method UsuarioNutrapharm findOneByUnuComentarioFinal(string $unu_comentario_final) Return the first UsuarioNutrapharm filtered by the unu_comentario_final column
* @method UsuarioNutrapharm findOneByUnuFotoComparacion(string $unu_foto_comparacion) Return the first UsuarioNutrapharm filtered by the unu_foto_comparacion column
* @method UsuarioNutrapharm findOneByUnuExtComparacion(string $unu_ext_comparacion) Return the first UsuarioNutrapharm filtered by the unu_ext_comparacion column
* @method UsuarioNutrapharm findOneByUnuCompartidoFacebook(int $unu_compartido_facebook) Return the first UsuarioNutrapharm filtered by the unu_compartido_facebook column
* @method UsuarioNutrapharm findOneByUnuEstado(int $unu_estado) Return the first UsuarioNutrapharm filtered by the unu_estado column * @method UsuarioNutrapharm findOneByUnuEstado(int $unu_estado) Return the first UsuarioNutrapharm filtered by the unu_estado column
* @method UsuarioNutrapharm findOneByUnuEliminado(int $unu_eliminado) Return the first UsuarioNutrapharm filtered by the unu_eliminado column * @method UsuarioNutrapharm findOneByUnuEliminado(int $unu_eliminado) Return the first UsuarioNutrapharm filtered by the unu_eliminado column
* @method UsuarioNutrapharm findOneByCreatedAt(string $created_at) Return the first UsuarioNutrapharm filtered by the created_at column * @method UsuarioNutrapharm findOneByCreatedAt(string $created_at) Return the first UsuarioNutrapharm filtered by the created_at column
...@@ -91,6 +100,9 @@ use AppBundle\Model\UsuarioNutrapharmQuery; ...@@ -91,6 +100,9 @@ use AppBundle\Model\UsuarioNutrapharmQuery;
* @method array findByUnuExtFinal(string $unu_ext_final) Return UsuarioNutrapharm objects filtered by the unu_ext_final column * @method array findByUnuExtFinal(string $unu_ext_final) Return UsuarioNutrapharm objects filtered by the unu_ext_final column
* @method array findByUnuPathFotoFinal(string $unu_path_foto_final) Return UsuarioNutrapharm objects filtered by the unu_path_foto_final column * @method array findByUnuPathFotoFinal(string $unu_path_foto_final) Return UsuarioNutrapharm objects filtered by the unu_path_foto_final column
* @method array findByUnuComentarioFinal(string $unu_comentario_final) Return UsuarioNutrapharm objects filtered by the unu_comentario_final column * @method array findByUnuComentarioFinal(string $unu_comentario_final) Return UsuarioNutrapharm objects filtered by the unu_comentario_final column
* @method array findByUnuFotoComparacion(string $unu_foto_comparacion) Return UsuarioNutrapharm objects filtered by the unu_foto_comparacion column
* @method array findByUnuExtComparacion(string $unu_ext_comparacion) Return UsuarioNutrapharm objects filtered by the unu_ext_comparacion column
* @method array findByUnuCompartidoFacebook(int $unu_compartido_facebook) Return UsuarioNutrapharm objects filtered by the unu_compartido_facebook column
* @method array findByUnuEstado(int $unu_estado) Return UsuarioNutrapharm objects filtered by the unu_estado column * @method array findByUnuEstado(int $unu_estado) Return UsuarioNutrapharm objects filtered by the unu_estado column
* @method array findByUnuEliminado(int $unu_eliminado) Return UsuarioNutrapharm objects filtered by the unu_eliminado column * @method array findByUnuEliminado(int $unu_eliminado) Return UsuarioNutrapharm objects filtered by the unu_eliminado column
* @method array findByCreatedAt(string $created_at) Return UsuarioNutrapharm objects filtered by the created_at column * @method array findByCreatedAt(string $created_at) Return UsuarioNutrapharm objects filtered by the created_at column
...@@ -200,7 +212,7 @@ abstract class BaseUsuarioNutrapharmQuery extends ModelCriteria ...@@ -200,7 +212,7 @@ abstract class BaseUsuarioNutrapharmQuery extends ModelCriteria
*/ */
protected function findPkSimple($key, $con) protected function findPkSimple($key, $con)
{ {
$sql = 'SELECT `unu_id`, `unu_ua`, `unu_ip`, `unu_id_nutrapharm`, `unu_nombre`, `unu_correo`, `unu_path_foto_inicial`, `unu_ext_inicial`, `unu_comentario_inicial`, `unu_ext_final`, `unu_path_foto_final`, `unu_comentario_final`, `unu_estado`, `unu_eliminado`, `created_at`, `updated_at` FROM `usuario_nutrapharm` WHERE `unu_id` = :p0'; $sql = 'SELECT `unu_id`, `unu_ua`, `unu_ip`, `unu_id_nutrapharm`, `unu_nombre`, `unu_correo`, `unu_path_foto_inicial`, `unu_ext_inicial`, `unu_comentario_inicial`, `unu_ext_final`, `unu_path_foto_final`, `unu_comentario_final`, `unu_foto_comparacion`, `unu_ext_comparacion`, `unu_compartido_facebook`, `unu_estado`, `unu_eliminado`, `created_at`, `updated_at` FROM `usuario_nutrapharm` WHERE `unu_id` = :p0';
try { try {
$stmt = $con->prepare($sql); $stmt = $con->prepare($sql);
$stmt->bindValue(':p0', $key, PDO::PARAM_INT); $stmt->bindValue(':p0', $key, PDO::PARAM_INT);
...@@ -650,6 +662,106 @@ abstract class BaseUsuarioNutrapharmQuery extends ModelCriteria ...@@ -650,6 +662,106 @@ abstract class BaseUsuarioNutrapharmQuery extends ModelCriteria
return $this->addUsingAlias(UsuarioNutrapharmPeer::UNU_COMENTARIO_FINAL, $unuComentarioFinal, $comparison); return $this->addUsingAlias(UsuarioNutrapharmPeer::UNU_COMENTARIO_FINAL, $unuComentarioFinal, $comparison);
} }
/**
* Filter the query on the unu_foto_comparacion column
*
* Example usage:
* <code>
* $query->filterByUnuFotoComparacion('fooValue'); // WHERE unu_foto_comparacion = 'fooValue'
* $query->filterByUnuFotoComparacion('%fooValue%'); // WHERE unu_foto_comparacion LIKE '%fooValue%'
* </code>
*
* @param string $unuFotoComparacion The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return UsuarioNutrapharmQuery The current query, for fluid interface
*/
public function filterByUnuFotoComparacion($unuFotoComparacion = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($unuFotoComparacion)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $unuFotoComparacion)) {
$unuFotoComparacion = str_replace('*', '%', $unuFotoComparacion);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(UsuarioNutrapharmPeer::UNU_FOTO_COMPARACION, $unuFotoComparacion, $comparison);
}
/**
* Filter the query on the unu_ext_comparacion column
*
* Example usage:
* <code>
* $query->filterByUnuExtComparacion('fooValue'); // WHERE unu_ext_comparacion = 'fooValue'
* $query->filterByUnuExtComparacion('%fooValue%'); // WHERE unu_ext_comparacion LIKE '%fooValue%'
* </code>
*
* @param string $unuExtComparacion The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return UsuarioNutrapharmQuery The current query, for fluid interface
*/
public function filterByUnuExtComparacion($unuExtComparacion = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($unuExtComparacion)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $unuExtComparacion)) {
$unuExtComparacion = str_replace('*', '%', $unuExtComparacion);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(UsuarioNutrapharmPeer::UNU_EXT_COMPARACION, $unuExtComparacion, $comparison);
}
/**
* Filter the query on the unu_compartido_facebook column
*
* Example usage:
* <code>
* $query->filterByUnuCompartidoFacebook(1234); // WHERE unu_compartido_facebook = 1234
* $query->filterByUnuCompartidoFacebook(array(12, 34)); // WHERE unu_compartido_facebook IN (12, 34)
* $query->filterByUnuCompartidoFacebook(array('min' => 12)); // WHERE unu_compartido_facebook >= 12
* $query->filterByUnuCompartidoFacebook(array('max' => 12)); // WHERE unu_compartido_facebook <= 12
* </code>
*
* @param mixed $unuCompartidoFacebook The value to use as filter.
* Use scalar values for equality.
* Use array values for in_array() equivalent.
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return UsuarioNutrapharmQuery The current query, for fluid interface
*/
public function filterByUnuCompartidoFacebook($unuCompartidoFacebook = null, $comparison = null)
{
if (is_array($unuCompartidoFacebook)) {
$useMinMax = false;
if (isset($unuCompartidoFacebook['min'])) {
$this->addUsingAlias(UsuarioNutrapharmPeer::UNU_COMPARTIDO_FACEBOOK, $unuCompartidoFacebook['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($unuCompartidoFacebook['max'])) {
$this->addUsingAlias(UsuarioNutrapharmPeer::UNU_COMPARTIDO_FACEBOOK, $unuCompartidoFacebook['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(UsuarioNutrapharmPeer::UNU_COMPARTIDO_FACEBOOK, $unuCompartidoFacebook, $comparison);
}
/** /**
* Filter the query on the unu_estado column * Filter the query on the unu_estado column
* *
......
...@@ -38,6 +38,9 @@ ...@@ -38,6 +38,9 @@
<column name="unu_ext_final" phpName="UnuExtFinal" type="VARCHAR" size="45" required="false"/> <column name="unu_ext_final" phpName="UnuExtFinal" type="VARCHAR" size="45" required="false"/>
<column name="unu_path_foto_final" phpName="UnuPathFotoFinal" type="VARCHAR" size="1000" required="false"/> <column name="unu_path_foto_final" phpName="UnuPathFotoFinal" type="VARCHAR" size="1000" required="false"/>
<column name="unu_comentario_final" phpName="UnuComentarioFinal" type="VARCHAR" size="1000" required="false"/> <column name="unu_comentario_final" phpName="UnuComentarioFinal" type="VARCHAR" size="1000" required="false"/>
<column name="unu_foto_comparacion" phpName="UnuFotoComparacion" type="VARCHAR" size="1000" required="false"/>
<column name="unu_ext_comparacion" phpName="UnuExtComparacion" type="VARCHAR" size="45" required="false"/>
<column name="unu_compartido_facebook" phpName="UnuCompartidoFacebook" type="INTEGER" size="6" required="false"/>
<column name="unu_estado" phpName="UnuEstado" type="INTEGER" required="false"/> <column name="unu_estado" phpName="UnuEstado" type="INTEGER" required="false"/>
<column name="unu_eliminado" phpName="UnuEliminado" type="INTEGER" required="false"/> <column name="unu_eliminado" phpName="UnuEliminado" type="INTEGER" required="false"/>
<behavior name="timestampable" /> <behavior name="timestampable" />
......
...@@ -27,7 +27,7 @@ class DefaultController extends Controller { ...@@ -27,7 +27,7 @@ class DefaultController extends Controller {
$ua = $request->headers->get('User-Agent'); $ua = $request->headers->get('User-Agent');
$ip = $request->getClientIp(); $ip = $request->getClientIp();
$log->debug("Ingresando al landing de Nutrapharm... IP : $ip | UA : $ua...."); $log->debug("Ingresando al landing de Nutrapharm... IP : $ip | UA : $ua....");
$facebookAppId = Utiles::getParametroConfiguracion("facebook_app_id");
$idPersona = $request->get("idp", null); $idPersona = $request->get("idp", null);
$firstAttempt = $request->get("fa", 1); $firstAttempt = $request->get("fa", 1);
$reset = $request->get("r", 0); $reset = $request->get("r", 0);
...@@ -47,7 +47,7 @@ class DefaultController extends Controller { ...@@ -47,7 +47,7 @@ class DefaultController extends Controller {
$log->debug("Se encontro id usuario $idPersona...seteando parametros por defecto Usuario : $id | Extension archivo : $ext | Intento : $firstAttempt | comentario final : $comentarioFinal....."); $log->debug("Se encontro id usuario $idPersona...seteando parametros por defecto Usuario : $id | Extension archivo : $ext | Intento : $firstAttempt | comentario final : $comentarioFinal.....");
} }
return $this->render('producto/landing_producto.html.twig', array("idp" => $id, "extInicial" => $ext, "extFinal" => "", "comentarioFinal" => $comentarioFinal, "fa" => $firstAttempt, "r" => $reset)); return $this->render('producto/landing_producto.html.twig', array("idp" => $id, "extInicial" => $ext, "extFinal" => "", "comentarioFinal" => $comentarioFinal, "fa" => $firstAttempt, "r" => $reset, "urlSitio" => Utiles::getParametroConfiguracion("url_sitio"), "facebookAppId"=> $facebookAppId));
} }
public function uploadAction(Request $request) { public function uploadAction(Request $request) {
...@@ -65,6 +65,25 @@ class DefaultController extends Controller { ...@@ -65,6 +65,25 @@ class DefaultController extends Controller {
$log->debug("Paràmetros de entrada Guardado o Actualizacion Subida Archivo : $uploadFile | Tipo Guardado : $tipo | Nombre : $nombre | Correo : $correo | Comentario = $comentario | Usuario : $idUsuarioNutraPharm...."); $log->debug("Paràmetros de entrada Guardado o Actualizacion Subida Archivo : $uploadFile | Tipo Guardado : $tipo | Nombre : $nombre | Correo : $correo | Comentario = $comentario | Usuario : $idUsuarioNutraPharm....");
//VERIFICAR DATOS DE ENTRADA //VERIFICAR DATOS DE ENTRADA
/*Verificacion Mail*/
if(!Utiles::validarCorreo($correo) || UsuarioNutrapharmQuery::correoRegistrado($correo) == 1){
$log->debug("El correo no es válido o no posee un formato correcto...");
return new JsonResponse(array("msg" => "El correo ingresado no es válido o ya se ha registrado en el sistema!"), Response::HTTP_BAD_REQUEST, ['content-type' => 'application/json']);
}
/*Vrificacion String Nombre*/
if($nombre == "" || $nombre == null){
$log->debug("El nombre ingresado no es válido...");
return new JsonResponse(array("msg" => "Nombre ingresado no es válido!"), Response::HTTP_BAD_REQUEST, ['content-type' => 'application/json']);
}
/*Verificacion String Comentarios*/
if($comentario == "" || $comentario == null){
$log->debug("El comentario ingresado no es válido...");
return new JsonResponse(array("msg" => "El comentario ingresado no es válido!"), Response::HTTP_BAD_REQUEST, ['content-type' => 'application/json']);
}
//TODO //TODO
if ($uploadFile == 1) {//foto subida if ($uploadFile == 1) {//foto subida
$log->debug("Creando variable de archivo..."); $log->debug("Creando variable de archivo...");
...@@ -198,12 +217,31 @@ class DefaultController extends Controller { ...@@ -198,12 +217,31 @@ class DefaultController extends Controller {
return new JsonResponse(array("msg" => "Se ha generado la comparación, compartelo en las redes sociales!", "tipo" => UsuarioNutrapharm::ESTADO_FOTO_FINAL, "usuario" => $idNutrapharm), Response::HTTP_OK, ['content-type' => 'application/json']); return new JsonResponse(array("msg" => "Se ha generado la comparación, compartelo en las redes sociales!", "tipo" => UsuarioNutrapharm::ESTADO_FOTO_FINAL, "usuario" => $idNutrapharm), Response::HTTP_OK, ['content-type' => 'application/json']);
} }
} }
public function registrarEnFacebookAction(Request $request){
$log = Utiles::setLog('NutraPharmBundle\Controller\DefaultController:registrarEnFacebookAction', 'nutrapharm/index');
$ua = $request->headers->get('User-Agent');
$ip = $request->getClientIp();
$log->debug("Ingresando a registrar compartir facebook ... IP : $ip | UA : $ua....");
$idUsuarioNutraPharm = $request->get("idUsuarioNutrapharm",null);
$log->debug("Usuario NutraPharm entrante : $idUsuarioNutraPharm...");
$usuario = UsuarioNutrapharmQuery::obtenerUsuarioNutraPharm($idUsuarioNutraPharm);
if(!$usuario){
$log->debug("id de usuario $idUsuarioNutraPharm no ecnontrado");
return new JsonResponse(array("msg" => "Ha ocurrido un error, el usuario no se encontró", "usuario" => $idUsuarioNutraPharm), Response::HTTP_BAD_REQUEST, ['content-type' => 'application/json']);
}
$log->debug("se ha actualizado el estado de compartir en facebook para el usuario $idUsuarioNutraPharm...");
return new JsonResponse(array("msg" => "Se registro el compartir mensaje de facebook"), Response::HTTP_OK, ['content-type' => 'application/json']);
}
protected function merge($filename_x, $fileType_x, $filename_y, $fileType_y, $filename_result) { protected function merge($filename_x, $fileType_x, $filename_y, $fileType_y, $filename_result) {
if (file_exists($filename_result)) if (file_exists($filename_result)){
imagedestroy($filename_result); imagedestroy($filename_result);
}
// Get dimensions for specified images // Get dimensions for specified images
list($width_x, $height_x) = getimagesize($filename_x); list($width_x, $height_x) = getimagesize($filename_x);
......
...@@ -10,4 +10,6 @@ nutrapharm_get_file: ...@@ -10,4 +10,6 @@ nutrapharm_get_file:
path: /get/photo path: /get/photo
defaults: { _controller: NutrapharmBundle:Default:download } defaults: { _controller: NutrapharmBundle:Default:download }
nutrapharm_compartir_facebook:
\ No newline at end of file path: /count/compartir/facebook
defaults: { _controller: NutrapharmBundle:Default:registrarEnFacebook }
\ 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