Ejemplo n.º 1
0
 /**
  * 模型初始化
  */
 public function initialize()
 {
     parent::initialize();
     //关联users表
     $this->belongsTo("author_id", "Blog\\Models\\Users", "id", array('alias' => 'Author'));
     $this->belongsTo("question_id", "Blog\\Models\\Questions", "id", array('alias' => 'Question'));
 }
Ejemplo n.º 2
0
 /**
  * 模型初始化
  */
 public function initialize()
 {
     parent::initialize();
     //关联users表
     $this->belongsTo("author_id", "Blog\\Models\\Users", "id", array('alias' => 'Author'));
     $this->skipAttributesOnUpdate(array('author_id', 'target_id', 'type'));
 }
Ejemplo n.º 3
0
 public function initialize()
 {
     parent::initialize();
     $this->setSource('book_instances');
     $this->belongsTo('book_id', "App\\Models\\Book", 'id', ["alias" => "book"]);
     $this->belongsTo('user_id', "App\\Models\\User", 'id', ["alias" => "user"]);
 }
Ejemplo n.º 4
0
 public function initialize()
 {
     parent::initialize();
     $database = new Elements();
     $database = $database->getDatabase();
     $this->setConnectionService($database);
 }
Ejemplo n.º 5
0
 /**
  * 模型初始化
  */
 public function initialize()
 {
     parent::initialize();
     //关联users表
     $this->belongsTo("author_id", "Blog\\Models\\Users", "id", array('alias' => 'Author'));
     $this->belongsTo("target_id", "Blog\\Models\\Users", "id", array('alias' => 'Target'));
     $this->belongsTo("comment_id", "Blog\\Models\\Comments", "id", array('alias' => 'Comment'));
 }
Ejemplo n.º 6
0
 /**
  * 模型初始化
  */
 public function initialize()
 {
     parent::initialize();
     //关联users表
     $this->belongsTo("author_id", "Blog\\Models\\Users", "id", array('alias' => 'Author'));
     //关联articles表
     $this->belongsTo("target_id", "Blog\\Models\\Articles", "id", array('alias' => 'Article'));
     $this->hasMany("id", "Blog\\Models\\Replies", "comment_id", array('alias' => 'Replies'));
 }
Ejemplo n.º 7
0
 public function initialize()
 {
     parent::initialize();
     $this->hasMany('id', 'ST\\Common\\Models\\BookComment', 'uid', ['alias' => 'bookComment']);
     $this->belongsTo('school_id', 'ST\\Common\\Models\\School', 'id', ['alias' => 'school']);
     $this->belongsTo('classes_id', 'ST\\Common\\Models\\Classes', 'id', ['alias' => 'classes']);
 }
Ejemplo n.º 8
0
 public function initialize()
 {
     parent::initialize();
     $this->hasMany('id', 'ST\\Common\\Models\\Book', 'cid', ['alias' => 'book']);
 }
Ejemplo n.º 9
0
 public function initialize()
 {
     parent::initialize();
     $this->table = $this->prefix . $this->table;
 }
Ejemplo n.º 10
0
 public function initialize()
 {
     parent::initialize();
     $this->belongsTo('classes_id', 'ST\\Common\\Models\\Classes', 'id', ['alias' => 'classes']);
 }
Ejemplo n.º 11
0
 public function initialize()
 {
     parent::initialize();
     $this->belongsTo('book_id', 'ST\\Common\\Models\\Book', 'id', ['alias' => 'book']);
     $this->belongsTo('uid', 'ST\\Common\\Models\\User', 'id', ['alias' => 'user']);
     $this->belongsTo('classes_id', 'ST\\Common\\Models\\Classes', 'id', ['alias' => 'classes']);
     $this->hasMany('id', 'ST\\Common\\Models\\Note', 'read_task_id', ['alias' => 'note']);
 }
Ejemplo n.º 12
0
 public function initialize()
 {
     parent::initialize();
     $this->belongsTo('eva_task_id', 'ST\\Common\\Models\\EvaTask', 'id', ['alias' => 'eva_task']);
     $this->belongsTo('uid', 'ST\\Common\\Models\\User', 'id', ['alias' => 'user']);
     $this->belongsTo('book_id', 'ST\\Common\\Models\\Book', 'id', ['alias' => 'book']);
     $this->belongsTo('classes_id', 'ST\\Common\\Models\\Classes', 'id', ['alias' => 'classes']);
     $this->belongsTo('read_task_id', 'ST\\Common\\Models\\Task', 'id', ['alias' => 'task']);
 }
Ejemplo n.º 13
0
 /**
  * 模型初始化
  */
 public function initialize()
 {
     parent::initialize();
     //关联users表
     $this->hasMany("id", "Blog\\Models\\Articles", "type_id", array('alias' => 'Articles'));
 }
Ejemplo n.º 14
0
 public function initialize()
 {
     parent::initialize();
     $this->belongsTo('book_id', 'ST\\Common\\Models\\Book', 'id', ['alias' => 'book']);
     $this->belongsTo('uid', 'ST\\Common\\Models\\User', 'id', ['alias' => 'user']);
     $this->belongsTo('read_task_id', 'ST\\Common\\Models\\Task', 'id', ['alias' => 'task']);
     $this->hasMany('id', 'ST\\Common\\Models\\NoteComment', 'read_note_id', ['alias' => 'comment']);
 }
Ejemplo n.º 15
0
 /**
  * 模型初始化
  */
 public function initialize()
 {
     parent::initialize();
     $this->skipAttributesOnCreate(array('status'));
 }
Ejemplo n.º 16
0
 public function initialize()
 {
     parent::initialize();
     //多本书对一个分类
     $this->belongsTo('cid', 'ST\\Common\\Models\\BookCate', 'id', ['alias' => 'bookCate']);
     //一本书有多个评论
     $this->hasMany('id', 'ST\\Common\\Models\\BookComment', 'book_id', ['alias' => 'bookComment']);
     $this->belongsTo('uid', 'ST\\Common\\Models\\User', 'id', ['alias' => 'user']);
 }
Ejemplo n.º 17
0
 /**
  * 模型初始化
  */
 public function initialize()
 {
     parent::initialize();
     $this->skipAttributesOnUpdate(array('author_id'));
 }
Ejemplo n.º 18
0
 public function initialize()
 {
     parent::initialize();
     $this->belongsTo('catelog_id', 'Pohome\\Common\\Models\\Catelog', 'id', ['alias' => 'catelog']);
 }
Ejemplo n.º 19
0
 public function initialize()
 {
     parent::initialize();
     $this->belongsTo('uid', 'ST\\Common\\Models\\User', 'id', ['alias' => 'user']);
     $this->belongsTo('good_id', 'ST\\Common\\Models\\Good', 'id', ['alias' => 'good']);
     $this->belongsTo('book_id', 'ST\\Common\\Models\\Book', 'id', ['alias' => 'book']);
 }
Ejemplo n.º 20
0
 public function initialize()
 {
     parent::initialize();
     $this->belongsTo('read_note_id', 'ST\\Common\\Models\\Note', 'id', ['alias' => 'note']);
     $this->belongsTo('uid', 'ST\\Common\\Models\\User', 'id', ['alias' => 'user']);
 }
Ejemplo n.º 21
0
 public function initialize()
 {
     parent::initialize();
 }
Ejemplo n.º 22
0
 public function initialize()
 {
     parent::initialize();
     // TODO: Change the autogenerated stub
 }