初始化
This commit is contained in:
45
addons/webman/model/PlayerPlatformCash.php
Normal file
45
addons/webman/model/PlayerPlatformCash.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
namespace addons\webman\model;
|
||||
|
||||
use addons\webman\traits\HasDateTimeFormatter;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class PlayerPlatformCash
|
||||
* @property int id 主键
|
||||
* @property int player_id 玩家id
|
||||
* @property string player_account 玩家账户
|
||||
* @property int platform_id 平台id
|
||||
* @property string platform_name 平台名称
|
||||
* @property float money 点数
|
||||
* @property int status 遊戲平台狀態 0=鎖定 1=正常
|
||||
* @property string created_at 创建时间
|
||||
* @property string updated_at 最后一次修改时间
|
||||
*
|
||||
* @package addons\webman\model
|
||||
*/
|
||||
class PlayerPlatformCash extends Model
|
||||
{
|
||||
use HasDateTimeFormatter;
|
||||
|
||||
CONST PLATFORM_SELF = 1; // 实体机平台
|
||||
|
||||
protected $fillable = ['player_id', 'platform_id', 'platform_name', 'money'];
|
||||
public function __construct(array $attributes = [])
|
||||
{
|
||||
parent::__construct($attributes);
|
||||
$this->setTable(plugin()->webman->config('database.player_platform_cash_table'));
|
||||
}
|
||||
|
||||
/**
|
||||
* 点数
|
||||
*
|
||||
* @param $value
|
||||
* @return float
|
||||
*/
|
||||
public function getMoneyAttribute($value): float
|
||||
{
|
||||
return floatval($value);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user