love_php/app/Models/ServerQuestion.php

21 lines
376 B
PHP
Raw Permalink Normal View History

2026-04-02 09:20:51 +08:00
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class ServerQuestion extends Model
{
protected $fillable = [];
protected $guarded = [];
public function keywords()
{
return $this->hasMany(ServerQuestionKeyword::class, 'question_id', 'id');
}
public function answer()
{
return $this->hasOne(ServerAnswer::class, 'question_id', 'id');
}
}