Viewing file: CdInternalDatas.php (6.45 KB) -rwxrwxrwx Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php namespace Modules\Models; use Phalcon\Validation; use Phalcon\Validation\Validator\Email as EmailValidator;
class CdInternalDatas extends \Phalcon\Mvc\Model {
/** * * @var integer * @Primary * @Identity * @Column(column="datintid", type="integer", length=11, nullable=false) */ protected $datintid;
/** * * @var string * @Column(column="name", type="string", length=75, nullable=true) */ protected $name;
/** * * @var string * @Column(column="first_lastname", type="string", length=75, nullable=true) */ protected $first_lastname;
/** * * @var string * @Column(column="second_lastname", type="string", length=75, nullable=true) */ protected $second_lastname;
/** * * @var string * @Column(column="address", type="string", length=200, nullable=true) */ protected $address;
/** * * @var string * @Column(column="email", type="string", length=150, nullable=true) */ protected $email;
/** * * @var integer * @Column(column="imid", type="integer", length=11, nullable=false) */ protected $imid;
/** * * @var string * @Column(column="phone", type="string", length=25, nullable=true) */ protected $phone;
/** * * @var string * @Column(column="cel", type="string", length=25, nullable=true) */ protected $cel;
/** * Method to set the value of field datintid * * @param integer $datintid * @return $this */ public function setDatintid($datintid) { $this->datintid = $datintid;
return $this; }
/** * Method to set the value of field name * * @param string $name * @return $this */ public function setName($name) { $this->name = $name;
return $this; }
/** * Method to set the value of field first_lastname * * @param string $first_lastname * @return $this */ public function setFirstLastname($first_lastname) { $this->first_lastname = $first_lastname;
return $this; }
/** * Method to set the value of field second_lastname * * @param string $second_lastname * @return $this */ public function setSecondLastname($second_lastname) { $this->second_lastname = $second_lastname;
return $this; }
/** * Method to set the value of field address * * @param string $address * @return $this */ public function setAddress($address) { $this->address = $address;
return $this; }
/** * Method to set the value of field email * * @param string $email * @return $this */ public function setEmail($email) { $this->email = $email;
return $this; }
/** * Method to set the value of field imid * * @param integer $imid * @return $this */ public function setImid($imid) { $this->imid = $imid;
return $this; }
/** * Method to set the value of field phone * * @param string $phone * @return $this */ public function setPhone($phone) { $this->phone = $phone;
return $this; }
/** * Method to set the value of field cel * * @param string $cel * @return $this */ public function setCel($cel) { $this->cel = $cel;
return $this; }
/** * Returns the value of field datintid * * @return integer */ public function getDatintid() { return $this->datintid; }
/** * Returns the value of field name * * @return string */ public function getName() { return $this->name; }
/** * Returns the value of field first_lastname * * @return string */ public function getFirstLastname() { return $this->first_lastname; }
/** * Returns the value of field second_lastname * * @return string */ public function getSecondLastname() { return $this->second_lastname; }
/** * Returns the value of field address * * @return string */ public function getAddress() { return $this->address; }
/** * Returns the value of field email * * @return string */ public function getEmail() { return $this->email; }
/** * Returns the value of field imid * * @return integer */ public function getImid() { return $this->imid; }
/** * Returns the value of field phone * * @return string */ public function getPhone() { return $this->phone; }
/** * Returns the value of field cel * * @return string */ public function getCel() { return $this->cel; }
/** * Validations and business logic * * @return boolean */ /* public function validation() { $validator = new Validation();
$validator->add( 'email', new EmailValidator( [ 'model' => $this, 'message' => 'Please enter a correct email address', ] ) );
return $this->validate($validator); } */
/** * Initialize method for model. */ public function initialize() {
$this->setSource("at_internal_datas"); $this->belongsTo('imid', '\CdInmueble', 'imid', ['alias' => 'CdInmueble']); }
/** * Returns table name mapped in the model. * * @return string */ public function getSource() { return 'at_internal_datas'; }
/** * Allows to query a set of records that match the specified conditions * * @param mixed $parameters * @return CdInternalDatas[]|CdInternalDatas|\Phalcon\Mvc\Model\ResultSetInterface */ public static function find($parameters = null) { return parent::find($parameters); }
/** * Allows to query the first record that match the specified conditions * * @param mixed $parameters * @return CdInternalDatas|\Phalcon\Mvc\Model\ResultInterface */ public static function findFirst($parameters = null) { return parent::findFirst($parameters); }
}
|