Blame view

app/library/App/Model/UserProject.php 514 Bytes
0b8d4ffc   Alex Savenko   Add Roles.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
  <?php
  /**
   * Created by PhpStorm.
   * User: Alex Savenko
   * Date: 05.04.2017
   * Time: 18:08
   */
  
  namespace App\Model;
  
  
  use Phalcon\Mvc\Model;
  
  class UserProject extends Model
  {
      public function getSource()
      {
          return 'user_project';
      }
  
      public function initialize()
      {
          $this->belongsTo('project_id', Project::class, 'id',
              array('alias' => 'project')
          );
          $this->belongsTo('user_id', User::class, 'id',
              array('alias' => 'user')
          );
      }
  }