feat: 添加新的错误码以支持配置版本管理,更新彩票配置以启用手动审核,增强 API 路由以支持玩法和赔率版本化管理
This commit is contained in:
43
app/Models/RiskCapItem.php
Normal file
43
app/Models/RiskCapItem.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
/**
|
||||
* {@see risk_cap_items}
|
||||
*
|
||||
* `cap_amount`:与钱包一致的最小货币单位(整数)。
|
||||
*/
|
||||
class RiskCapItem extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'version_id',
|
||||
'draw_id',
|
||||
'normalized_number',
|
||||
'cap_amount',
|
||||
'cap_type',
|
||||
];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'version_id' => 'integer',
|
||||
'draw_id' => 'integer',
|
||||
'cap_amount' => 'integer',
|
||||
];
|
||||
}
|
||||
|
||||
/** @return BelongsTo<RiskCapVersion, RiskCapItem> */
|
||||
public function version(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(RiskCapVersion::class, 'version_id');
|
||||
}
|
||||
|
||||
/** @return BelongsTo<Draw, RiskCapItem> */
|
||||
public function draw(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Draw::class, 'draw_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user