1 | <?php |
||
19 | class EntryRelationship extends ContentfulModel |
||
20 | { |
||
21 | /** |
||
22 | * The table associated with the model. |
||
23 | * |
||
24 | * @var string |
||
25 | */ |
||
26 | protected $table = 'entry_relationships'; |
||
27 | |||
28 | /** |
||
29 | * The primary key for the model. |
||
30 | * |
||
31 | * @var string |
||
32 | */ |
||
33 | protected $primaryKey = null; |
||
34 | |||
35 | /** |
||
36 | * Indicates if the IDs are auto-incrementing. |
||
37 | * |
||
38 | * @var boolean |
||
39 | */ |
||
40 | public $incrementing = false; |
||
41 | |||
42 | /** |
||
43 | * The attributes that are mass assignable. |
||
44 | * |
||
45 | * @var array |
||
46 | */ |
||
47 | protected $fillable = [ |
||
48 | 'src_contentful_id', |
||
49 | 'src_content_type', |
||
50 | 'related_contentful_id', |
||
51 | 'related_content_type', |
||
52 | 'locale', |
||
53 | 'country', |
||
54 | 'order' |
||
55 | ]; |
||
56 | |||
57 | /** |
||
58 | * The attributes that should be cast to native types. |
||
59 | * |
||
60 | * @var array |
||
61 | */ |
||
62 | protected $casts = [ |
||
63 | 'order' => 'integer' |
||
64 | ]; |
||
65 | |||
66 | /** |
||
67 | * Get Contentful related entry. |
||
68 | * |
||
69 | * @return mixed |
||
70 | */ |
||
71 | public function getRelatedEntry() |
||
86 | } |
||
87 |