- 新增报名费商品类别和商品创建逻辑 - 实现报名费价格动态更新 - 添加活动报名功能 - 优化 SkuPrice trait 中的 sku 处理逻辑 - 修复活动列表和详情页面的一些小问题
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 = ['man' => '男报名费', '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);
|
|
}
|
|
}
|