1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* |
4
|
|
|
* rmarchiv.tk |
5
|
|
|
* (c) 2016-2017 by Marcel 'ryg' Hering |
6
|
|
|
*/ |
7
|
|
|
|
8
|
|
|
namespace App\Models; |
9
|
|
|
|
10
|
|
|
use Illuminate\Database\Eloquent\Model; |
11
|
|
|
|
12
|
|
|
/** |
13
|
|
|
* Class EventSetting. |
14
|
|
|
* |
15
|
|
|
* @property int $id |
16
|
|
|
* @property int $event_id |
17
|
|
|
* @property int $slots |
18
|
|
|
* @property string $reg_start_date |
19
|
|
|
* @property string $reg_end_date |
20
|
|
|
* @property int $reg_allowed |
21
|
|
|
* @property int $reg_price |
22
|
|
|
* @property \Carbon\Carbon $created_at |
23
|
|
|
* @property \Carbon\Carbon $updated_at |
24
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\EventSetting whereId($value) |
25
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\EventSetting whereEventId($value) |
26
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\EventSetting whereSlots($value) |
27
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\EventSetting whereRegStartDate($value) |
28
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\EventSetting whereRegEndDate($value) |
29
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\EventSetting whereRegAllowed($value) |
30
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\EventSetting whereRegPrice($value) |
31
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\EventSetting whereCreatedAt($value) |
32
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\EventSetting whereUpdatedAt($value) |
33
|
|
|
* @mixin \Eloquent |
34
|
|
|
* @property-read \App\Models\Event $event |
35
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection|\Venturecraft\Revisionable\Revision[] $revisionHistory |
36
|
|
|
*/ |
37
|
|
View Code Duplication |
class EventSetting extends Model |
|
|
|
|
38
|
|
|
{ |
39
|
|
|
use \Venturecraft\Revisionable\RevisionableTrait; |
40
|
|
|
protected $table = 'event_settings'; |
41
|
|
|
|
42
|
|
|
public $timestamps = true; |
43
|
|
|
|
44
|
|
|
protected $fillable = [ |
45
|
|
|
'event_id', |
46
|
|
|
'slots', |
47
|
|
|
'reg_start_date', |
48
|
|
|
'reg_end_date', |
49
|
|
|
'reg_allowed', |
50
|
|
|
'reg_price', |
51
|
|
|
]; |
52
|
|
|
|
53
|
|
|
protected $guarded = []; |
54
|
|
|
|
55
|
|
|
public function event() |
56
|
|
|
{ |
57
|
|
|
return $this->hasOne('App\Models\Event', 'id', 'event_id'); |
58
|
|
|
} |
59
|
|
|
} |
60
|
|
|
|
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.