Files
sam-api/app/Models/Boards/Board.php
2025-08-21 09:50:15 +09:00

26 lines
571 B
PHP

<?php
namespace App\Models\Boards;
use Illuminate\Database\Eloquent\Model;
/**
* @mixin IdeHelperBoard
*/
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'
];
public function customFields() {
return $this->hasMany(BoardSetting::class, 'board_id');
}
public function posts() {
return $this->hasMany(Post::class, 'board_id');
}
}