style: Laravel Pint 코드 포맷팅 적용
- PSR-12 스타일 가이드 준수 - 302개 파일 스타일 이슈 자동 수정 - 코드 로직 변경 없음 (포맷팅만)
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace App\Models\Boards;
|
||||
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
@@ -11,15 +10,19 @@
|
||||
class Board extends Model
|
||||
{
|
||||
protected $table = 'boards';
|
||||
|
||||
protected $fillable = [
|
||||
'tenant_id', 'board_code', 'name', 'description', 'editor_type',
|
||||
'allow_files', 'max_file_count', 'max_file_size', 'extra_settings', 'is_active'
|
||||
'allow_files', 'max_file_count', 'max_file_size', 'extra_settings', 'is_active',
|
||||
];
|
||||
|
||||
public function customFields() {
|
||||
public function customFields()
|
||||
{
|
||||
return $this->hasMany(BoardSetting::class, 'board_id');
|
||||
}
|
||||
public function posts() {
|
||||
|
||||
public function posts()
|
||||
{
|
||||
return $this->hasMany(Post::class, 'board_id');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
namespace App\Models\Boards;
|
||||
|
||||
use App\Models\Members\User;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use App\Models\Members\User;
|
||||
|
||||
/**
|
||||
* @mixin IdeHelperBoardComment
|
||||
@@ -14,20 +14,28 @@ class BoardComment extends Model
|
||||
use SoftDeletes;
|
||||
|
||||
protected $table = 'board_comments';
|
||||
|
||||
protected $fillable = [
|
||||
'post_id', 'tenant_id', 'user_id', 'parent_id', 'content', 'ip_address', 'status'
|
||||
'post_id', 'tenant_id', 'user_id', 'parent_id', 'content', 'ip_address', 'status',
|
||||
];
|
||||
|
||||
public function post() {
|
||||
public function post()
|
||||
{
|
||||
return $this->belongsTo(Post::class, 'post_id');
|
||||
}
|
||||
public function user() {
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(User::class, 'user_id');
|
||||
}
|
||||
public function parent() {
|
||||
|
||||
public function parent()
|
||||
{
|
||||
return $this->belongsTo(BoardComment::class, 'parent_id');
|
||||
}
|
||||
public function children() {
|
||||
|
||||
public function children()
|
||||
{
|
||||
return $this->hasMany(BoardComment::class, 'parent_id')->where('status', 'active');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,11 +10,13 @@
|
||||
class BoardSetting extends Model
|
||||
{
|
||||
protected $table = 'board_settings';
|
||||
|
||||
protected $fillable = [
|
||||
'board_id', 'name', 'field_key', 'field_type', 'field_meta', 'is_required', 'sort_order'
|
||||
'board_id', 'name', 'field_key', 'field_type', 'field_meta', 'is_required', 'sort_order',
|
||||
];
|
||||
|
||||
public function board() {
|
||||
public function board()
|
||||
{
|
||||
return $this->belongsTo(Board::class, 'board_id');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
namespace App\Models\Boards;
|
||||
|
||||
use App\Models\Commons\File;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use App\Models\Commons\File;
|
||||
|
||||
/**
|
||||
* @mixin IdeHelperPost
|
||||
@@ -14,18 +14,24 @@ class Post extends Model
|
||||
use SoftDeletes;
|
||||
|
||||
protected $table = 'posts';
|
||||
|
||||
protected $fillable = [
|
||||
'tenant_id', 'board_id', 'user_id', 'title', 'content', 'editor_type',
|
||||
'ip_address', 'is_notice', 'is_secret', 'views', 'status'
|
||||
'ip_address', 'is_notice', 'is_secret', 'views', 'status',
|
||||
];
|
||||
|
||||
public function files() {
|
||||
public function files()
|
||||
{
|
||||
return $this->morphMany(File::class, 'fileable');
|
||||
}
|
||||
public function comments() {
|
||||
|
||||
public function comments()
|
||||
{
|
||||
return $this->hasMany(BoardComment::class, 'post_id')->whereNull('parent_id')->where('status', 'active');
|
||||
}
|
||||
public function board() {
|
||||
|
||||
public function board()
|
||||
{
|
||||
return $this->belongsTo(Board::class, 'board_id');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,12 +10,16 @@
|
||||
class PostCustomFieldValue extends Model
|
||||
{
|
||||
protected $table = 'post_custom_field_values';
|
||||
|
||||
protected $fillable = ['post_id', 'field_id', 'value'];
|
||||
|
||||
public function post() {
|
||||
public function post()
|
||||
{
|
||||
return $this->belongsTo(Post::class, 'post_id');
|
||||
}
|
||||
public function field() {
|
||||
|
||||
public function field()
|
||||
{
|
||||
return $this->belongsTo(BoardSetting::class, 'field_id');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user