GCTC-NTGC /
TalentCloud
| 1 | <?php |
||
| 2 | |||
| 3 | /** |
||
| 4 | * Created by Reliese Model. |
||
| 5 | * Date: Thu, 12 Jul 2018 22:39:27 +0000. |
||
| 6 | */ |
||
| 7 | |||
| 8 | namespace App\Models\Lookup; |
||
| 9 | |||
| 10 | use App\Models\BaseModel; |
||
| 11 | |||
| 12 | use Backpack\CRUD\app\Models\Traits\CrudTrait; |
||
| 13 | use Backpack\CRUD\app\Models\Traits\SpatieTranslatable\HasTranslations; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Class Department |
||
| 17 | * @property int $id |
||
| 18 | * @property int $parent_id |
||
| 19 | * @property int $lft |
||
| 20 | * @property int $rgt |
||
| 21 | * @property int $depth |
||
| 22 | * @property string $name |
||
| 23 | * @property string $impact |
||
| 24 | * @property string $preference |
||
| 25 | * @property string $allow_indeterminate |
||
| 26 | * @property string $is_partner |
||
| 27 | * @property string $is_host |
||
| 28 | * |
||
| 29 | * @property \Jenssegers\Date\Date $created_at |
||
| 30 | * @property \Jenssegers\Date\Date $updated_at |
||
| 31 | * |
||
| 32 | * @property \Illuminate\Database\Eloquent\Collection $job_posters |
||
| 33 | * @property \Illuminate\Database\Eloquent\Collection $users |
||
| 34 | * |
||
| 35 | * Localized Properties: |
||
| 36 | * @property string $name |
||
| 37 | * @property string $impact |
||
| 38 | * @property string $preference |
||
| 39 | */ |
||
| 40 | class Department extends BaseModel |
||
| 41 | { |
||
| 42 | use CrudTrait; |
||
| 43 | use HasTranslations; |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @var $translatable string[] |
||
|
0 ignored issues
–
show
Documentation
Bug
introduced
by
Loading history...
|
|||
| 47 | * */ |
||
| 48 | public $translatable = [ |
||
| 49 | 'name', |
||
| 50 | 'impact', |
||
| 51 | 'preference', |
||
| 52 | ]; |
||
| 53 | |||
| 54 | /** |
||
| 55 | * @var $fillable string[] |
||
|
0 ignored issues
–
show
|
|||
| 56 | * */ |
||
| 57 | protected $fillable = [ |
||
| 58 | 'name', |
||
| 59 | 'impact', |
||
| 60 | 'preference', |
||
| 61 | 'allow_indeterminate', |
||
| 62 | 'is_partner', |
||
| 63 | 'is_host', |
||
| 64 | ]; |
||
| 65 | |||
| 66 | public function users() // phpcs:ignore |
||
| 67 | { |
||
| 68 | return $this->hasMany(\App\Models\User::class); |
||
| 69 | } |
||
| 70 | |||
| 71 | public function job_posters() // phpcs:ignore |
||
| 72 | { |
||
| 73 | return $this->hasMany(\App\Models\JobPoster::class); |
||
| 74 | } |
||
| 75 | } |
||
| 76 |