Последняя версия с сервера прошлого разработчика
This commit is contained in:
32
app/Domain/Complaints/Models/CommentComplaint.php
Executable file
32
app/Domain/Complaints/Models/CommentComplaint.php
Executable file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Domain\Complaints\Models;
|
||||
|
||||
use App\Models\User;
|
||||
use App\Models\Model;
|
||||
use App\Domain\Comments\Models\Comment;
|
||||
use App\Domain\Complaints\Models\Reason;
|
||||
|
||||
class CommentComplaint extends Model
|
||||
{
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
|
||||
public function moderator()
|
||||
{
|
||||
return $this->belongsTo(User::class, 'moderator_checking_id');
|
||||
}
|
||||
|
||||
public function reason()
|
||||
{
|
||||
return $this->belongsTo(Reason::class);
|
||||
}
|
||||
|
||||
public function comment()
|
||||
{
|
||||
return $this->belongsTo(Comment::class);
|
||||
}
|
||||
}
|
||||
36
app/Domain/Complaints/Models/Complaint.php
Executable file
36
app/Domain/Complaints/Models/Complaint.php
Executable file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
namespace App\Domain\Complaints\Models;
|
||||
|
||||
use App\Domain\Feeds\Models\Feed;
|
||||
use App\Models\Model;
|
||||
use App\Models\User;
|
||||
|
||||
class Complaint extends Model
|
||||
{
|
||||
public static function boot()
|
||||
{
|
||||
parent::boot();
|
||||
}
|
||||
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
|
||||
public function moderator()
|
||||
{
|
||||
return $this->belongsTo(User::class, 'moderator_checking_id');
|
||||
}
|
||||
|
||||
public function reason()
|
||||
{
|
||||
return $this->belongsTo(Reason::class);
|
||||
}
|
||||
|
||||
public function feed()
|
||||
{
|
||||
return $this->belongsTo(Feed::class);
|
||||
}
|
||||
|
||||
}
|
||||
10
app/Domain/Complaints/Models/Reason.php
Executable file
10
app/Domain/Complaints/Models/Reason.php
Executable file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Domain\Complaints\Models;
|
||||
|
||||
use App\Models\Model;
|
||||
|
||||
class Reason extends Model
|
||||
{
|
||||
public $timestamps = false;
|
||||
}
|
||||
Reference in New Issue
Block a user