mirror of
https://gitee.com/ulthon/layui-ul.git
synced 2026-07-01 10:32:49 +08:00
初始化项目
This commit is contained in:
24
app/model/PostTag.php
Normal file
24
app/model/PostTag.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace app\model;
|
||||
|
||||
use think\Model;
|
||||
|
||||
/**
|
||||
* @mixin think\Model
|
||||
*/
|
||||
class PostTag extends Model
|
||||
{
|
||||
//
|
||||
public function tag()
|
||||
{
|
||||
return $this->belongsTo(Tag::class,'tag_id');
|
||||
}
|
||||
|
||||
public function post()
|
||||
{
|
||||
return $this->belongsTo(Post::class, 'post_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user