oauth response array

This commit is contained in:
xiaomlove
2024-04-05 22:40:06 +08:00
parent 8d07ad98f7
commit ff1b88a25f
15 changed files with 418 additions and 3 deletions
+4
View File
@@ -7,4 +7,8 @@ class Forum extends NexusModel
{
protected $fillable = ['sort', 'name', 'description', 'minclassread', 'minclasswrite', 'postcount', 'topiccount', 'minclasscreate', 'forid'];
public function moderators()
{
return $this->belongsToMany(User::class, "forummods", "forumid", "userid");
}
}
+13
View File
@@ -0,0 +1,13 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class OverForum extends NexusModel
{
protected $table = "overforums";
}
+10
View File
@@ -16,4 +16,14 @@ class Topic extends NexusModel
{
return $this->belongsTo(Forum::class. 'forumid');
}
public function firstPost()
{
return $this->belongsTo(Post::class, "firstpost");
}
public function lastPost()
{
return $this->belongsTo(Post::class, "lastpost");
}
}