1 | <?php |
||
16 | class EntityLock extends Model |
||
17 | { |
||
18 | |||
19 | public $timestamps = false; |
||
20 | |||
21 | /** |
||
22 | * The database table used by the model. |
||
23 | * |
||
24 | * @var string |
||
25 | */ |
||
26 | protected $table = 'entity_locks'; |
||
27 | |||
28 | /** |
||
29 | * The attributes that are mass assignable. |
||
30 | * |
||
31 | * @var array |
||
32 | */ |
||
33 | protected $fillable = [ |
||
34 | 'entity_type', 'entity_id', 'locked_at', 'locked_by' |
||
35 | ]; |
||
36 | |||
37 | protected $dates = ['locked_at']; |
||
38 | |||
39 | |||
40 | public static function boot() |
||
46 | |||
47 | /** |
||
48 | * Polymorphic relationship. Name of the relationship should be |
||
49 | * the same as the prefix for the *_id/*_type fields. |
||
50 | */ |
||
51 | public function entity() |
||
55 | |||
56 | |||
57 | public function user() |
||
65 | |||
66 | } |
||
67 |