| Total Complexity | 6 |
| Total Lines | 48 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class Recruitment extends Model |
||
| 8 | { |
||
| 9 | const STATE_PUBLISHED = 0; |
||
| 10 | const STATE_FINISHED = 1; |
||
| 11 | const STATE_CLOSED = 2; |
||
| 12 | |||
| 13 | protected $connection = 'tenant'; |
||
| 14 | |||
| 15 | protected $fillable = [ |
||
| 16 | 'name', |
||
| 17 | 'notification_email', |
||
| 18 | 'job_title', |
||
| 19 | 'is_draft', |
||
| 20 | ]; |
||
| 21 | |||
| 22 | public function candidates() |
||
| 23 | { |
||
| 24 | return $this->hasMany(Candidate::class); |
||
| 25 | } |
||
| 26 | |||
| 27 | public function sources() |
||
| 30 | } |
||
| 31 | |||
| 32 | public function predefinedMessages() |
||
| 33 | { |
||
| 34 | return $this->hasMany(PredefinedMessage::class); |
||
| 35 | } |
||
| 36 | |||
| 37 | public function formFields() |
||
| 40 | } |
||
| 41 | |||
| 42 | public function stages() |
||
| 43 | { |
||
| 44 | return $this->hasMany(Stage::class)->orderBy('order'); |
||
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * Used to determine access rights if a user has limited role. |
||
| 49 | * |
||
| 50 | * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany |
||
| 51 | */ |
||
| 52 | public function grantedUsers() |
||
| 55 | } |
||
| 56 | } |
||
| 57 |