Viewing file: CdForm.php (5.27 KB) -rwxrwxrwx Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php namespace Modules\Models; use Phalcon\Validation; use Phalcon\Validation\Validator\Email as EmailValidator;
class CdForm extends \Phalcon\Mvc\Model {
/** * * @var integer * @Primary * @Identity * @Column(column="forid", type="integer", length=11, nullable=false) */ protected $forid;
/** * * @var string * @Column(column="name", type="string", length=75, nullable=true) */ protected $name;
/** * * @var string * @Column(column="last_name", type="string", length=75, nullable=true) */ protected $last_name;
/** * * @var string * @Column(column="date", type="string", length=75, nullable=true) */ protected $date;
/** * * @var string * @Column(column="email", type="string", length=75, nullable=true) */ protected $email;
/** * * @var string * @Column(column="date_creation", type="string", nullable=true) */ protected $date_creation;
/** * * @var integer * @Column(column="schid", type="integer", length=11, nullable=false) */ protected $schid;
/** * Method to set the value of field forid * * @param integer $forid * @return $this */ public function setForid($forid) { $this->forid = $forid;
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 last_name * * @param string $last_name * @return $this */ public function setLastName($last_name) { $this->last_name = $last_name;
return $this; }
/** * Method to set the value of field date * * @param string $date * @return $this */ public function setDate($date) { $this->date = $date;
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 date_creation * * @param string $date_creation * @return $this */ public function setDateCreation($date_creation) { $this->date_creation = $date_creation;
return $this; }
/** * Method to set the value of field schid * * @param integer $schid * @return $this */ public function setSchid($schid) { $this->schid = $schid;
return $this; }
/** * Returns the value of field forid * * @return integer */ public function getForid() { return $this->forid; }
/** * Returns the value of field name * * @return string */ public function getName() { return $this->name; }
/** * Returns the value of field last_name * * @return string */ public function getLastName() { return $this->last_name; }
/** * Returns the value of field date * * @return string */ public function getDate() { return $this->date; }
/** * Returns the value of field email * * @return string */ public function getEmail() { return $this->email; }
/** * Returns the value of field date_creation * * @return string */ public function getDateCreation() { return $this->date_creation; }
/** * Returns the value of field schid * * @return integer */ public function getSchid() { return $this->schid; }
/** * 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_form"); $this->belongsTo('schid', '\CdSchedule', 'schid', ['alias' => 'CdSchedule']); }
/** * Returns table name mapped in the model. * * @return string */ public function getSource() { return 'at_form'; }
/** * Allows to query a set of records that match the specified conditions * * @param mixed $parameters * @return CdForm[]|CdForm|\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 CdForm|\Phalcon\Mvc\Model\ResultInterface */ public static function findFirst($parameters = null) { return parent::findFirst($parameters); }
}
|