Viewing file: AtSchool.php (3.03 KB) -rwxrwxrwx Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php namespace Modules\Models; class AtSchool extends \Phalcon\Mvc\Model {
/** * * @var integer * @Primary * @Identity * @Column(type="integer", length=11, nullable=false) */ protected $scid;
/** * * @var string * @Column(type="string", length=100, nullable=false) */ protected $name;
/** * * @var string * @Column(type="string", nullable=true) */ protected $date_creation;
/** * * @var integer * @Column(type="integer", length=11, nullable=false) */ protected $uid;
/** * Method to set the value of field scid * * @param integer $scid * @return $this */ public function setScid($scid) { $this->scid = $scid;
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 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 uid * * @param integer $uid * @return $this */ public function setUid($uid) { $this->uid = $uid;
return $this; }
/** * Returns the value of field scid * * @return integer */ public function getScid() { return $this->scid; }
/** * Returns the value of field name * * @return string */ public function getName() { return $this->name; }
/** * Returns the value of field date_creation * * @return string */ public function getDateCreation() { return $this->date_creation; }
/** * Returns the value of field uid * * @return integer */ public function getUid() { return $this->uid; }
/** * Initialize method for model. */ public function initialize() { $this->hasMany('scid', 'AtClients', 'scid', ['alias' => 'AtClients']); $this->belongsTo('uid', 'AtUser', 'uid', ['alias' => 'AtUser']); }
/** * Returns table name mapped in the model. * * @return string */ public function getSource() { return 'at_school'; }
/** * Allows to query a set of records that match the specified conditions * * @param mixed $parameters * @return AtSchool[] */ 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 AtSchool */ public static function findFirst($parameters = null) { return parent::findFirst($parameters); }
}
|