Files
duolamaojiazhen/application/admin/model/Moments.php
gitfjn 16d1adacca 后台:
添加服务逻辑的编辑
接口:
添加服务列表
添加服务详情
添加服务点赞、收藏
2025-12-24 23:03:48 +08:00

33 lines
685 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
namespace app\admin\model;
use app\common\model\Goods;
use think\Model;
class Moments extends Model
{
protected $name = 'moments';
/**
* 关联员工belongsTomoments 属于 staffmoments.sid = staff.id
*/
public function getStaff()
{
return $this->belongsTo(Staff::class, 'sid', 'id');
}
/**
* 关联订单belongsTomoments 属于 ordermoments.oid = order.id
*/
public function getOrder()
{
return $this->belongsTo(Order::class, 'oid', 'id');
}
//关联产品
public function getProduct()
{
return $this->belongsTo(Goods::class, 'goods_id', 'id');
}
}