| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <?php
- namespace app\model;
- use think\Model;
- class GameImproveRtpGlobalModel extends Model
- {
- // 设置表名
- protected $name = 'improve_rtp_global_control';
- // 设置主键
- protected $pk = 'app_id';
- protected $connection = 'fortue_tiger';
- // 设置自动时间戳
- protected $autoWriteTimestamp = 'int';
- // 设置字段类型
- protected $type = [
- 'app_id' => 'int', // 商户ID
- 'effective_count' => 'int', // 周期内可被系统控制的次数
- 'evaluation_period' => 'int', // 系统控制的触发周期选择
- 'net_income' => 'int', // 设定玩家在游戏内盈利值达到后关闭功能
- 'trigger_interval_rounds' => 'int', // 每次系统控制间隔局数
- 'turnover_multiple' => 'int', // 达到设定流水倍数关闭提升状态
- 'custom_time_start' => 'int', // 周期自定义时间
- 'custom_time_end' => 'int', // 周期自定义时间
- 'status' => 'int', // 状态 1 正常,0 取消
- 'create_time' => 'int',
- 'update_time' => 'int',
- 'open_status_time' => 'int',
- ];
- public static function initCreateGlobal($app_id) {
- self::create([
- 'app_id' => $app_id,
- 'status' => 1,
- 'effective_count' => 1,
- 'evaluation_period' => 4,
- 'net_income' => 100,
- 'trigger_interval_rounds' => 300,
- 'turnover_multiple' => 5,
- 'custom_time_start' => 0,
- 'custom_time_end' => 0,
- 'open_status_time' => time()
- ]);
- }
- public static function getInfo($app_id) {
- return self::find($app_id);
- }
- }
|