- 修改了 User、Activity、Circle、Club 和 Game 控制器中的消息查询逻辑 - 增加了对俱乐部成员的判断,使得俱乐部消息能够展示给相关用户 - 调整了消息表中的字段名称,统一使用 user_id 替代 target_id - 优化了订单创建流程,只在需要时创建订单 - 更新了活动模型中的 costKey 属性,以适应新的费用结构 - 添加了新的费用类型翻译,以支持多退少补等功能
54 lines
1.0 KiB
PHP
54 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace app\admin\model\zy\game;
|
|
|
|
use think\Model;
|
|
|
|
|
|
class Activity extends Model
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
// 表名
|
|
protected $table = 'zy_activity';
|
|
public static $tableName = 'zy_activity';
|
|
|
|
// 自动写入时间戳字段
|
|
protected $autoWriteTimestamp = false;
|
|
|
|
// 定义时间戳字段名
|
|
protected $createTime = false;
|
|
protected $updateTime = false;
|
|
protected $deleteTime = false;
|
|
|
|
// 追加属性
|
|
protected $append = [];
|
|
|
|
|
|
|
|
public $costKey = ['pay_type' => '支付方式', 'male' => '男费用', 'woman' => '女费用', 'extra' => '附加费', 'server' => '服务费'];
|
|
|
|
|
|
|
|
|
|
public function stadium()
|
|
{
|
|
return $this->belongsTo('app\admin\model\zy\Stadium', 'gym_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
|
}
|
|
|
|
|
|
public function club()
|
|
{
|
|
return $this->belongsTo('app\admin\model\zy\Club', 'club_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
|
}
|
|
|
|
|
|
public function user()
|
|
{
|
|
return $this->belongsTo('app\admin\model\User', 'referee', 'id', [], 'LEFT')->setEagerlyType(0);
|
|
}
|
|
}
|