|
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 UserReport. |
|
14
|
|
|
* |
|
15
|
|
|
* @property int $id |
|
16
|
|
|
* @property int $user_id |
|
17
|
|
|
* @property int $content_id |
|
18
|
|
|
* @property string $content_type |
|
19
|
|
|
* @property string $reason |
|
20
|
|
|
* @property \Carbon\Carbon $created_at |
|
21
|
|
|
* @property \Carbon\Carbon $updated_at |
|
22
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\UserReport whereId($value) |
|
23
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\UserReport whereUserId($value) |
|
24
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\UserReport whereContentId($value) |
|
25
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\UserReport whereContentType($value) |
|
26
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\UserReport whereReason($value) |
|
27
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\UserReport whereCreatedAt($value) |
|
28
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\UserReport whereUpdatedAt($value) |
|
29
|
|
|
* @mixin \Eloquent |
|
30
|
|
|
* @property int $closed |
|
31
|
|
|
* @property int $closed_user_id |
|
32
|
|
|
* @property string $closed_remarks |
|
33
|
|
|
* @property string $closed_at |
|
34
|
|
|
* @property-read \App\Models\Game $game |
|
35
|
|
|
* @property-read \App\Models\User $user |
|
36
|
|
|
* @property-read \App\Models\User $user_closed |
|
37
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\UserReport whereClosed($value) |
|
38
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\UserReport whereClosedAt($value) |
|
39
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\UserReport whereClosedRemarks($value) |
|
40
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\UserReport whereClosedUserId($value) |
|
41
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection|\Venturecraft\Revisionable\Revision[] $revisionHistory |
|
42
|
|
|
*/ |
|
43
|
|
|
class UserReport extends Model |
|
44
|
|
|
{ |
|
45
|
|
|
use \Venturecraft\Revisionable\RevisionableTrait; |
|
46
|
|
|
protected $table = 'user_reports'; |
|
47
|
|
|
|
|
48
|
|
|
public $timestamps = true; |
|
49
|
|
|
|
|
50
|
|
|
protected $fillable = [ |
|
51
|
|
|
'user_id', |
|
52
|
|
|
'content_id', |
|
53
|
|
|
'content_type', |
|
54
|
|
|
'reason', |
|
55
|
|
|
'closed_user_id', |
|
56
|
|
|
'closed', |
|
57
|
|
|
'closed_remarks', |
|
58
|
|
|
'closed_at', |
|
59
|
|
|
]; |
|
60
|
|
|
|
|
61
|
|
|
protected $guarded = []; |
|
62
|
|
|
|
|
63
|
|
|
public function user() |
|
64
|
|
|
{ |
|
65
|
|
|
return $this->hasOne('App\Models\User', 'id', 'user_id'); |
|
66
|
|
|
} |
|
67
|
|
|
|
|
68
|
|
|
public function user_closed() |
|
69
|
|
|
{ |
|
70
|
|
|
return $this->hasOne('App\Models\User', 'id', 'closed_user_id'); |
|
71
|
|
|
} |
|
72
|
|
|
|
|
73
|
|
|
public function game() |
|
74
|
|
|
{ |
|
75
|
|
|
return $this->hasOne('App\Models\Game', 'id', 'content_id'); |
|
76
|
|
|
} |
|
77
|
|
|
} |
|
78
|
|
|
|