Files
chatroom/app/Models/MarriageConfig.php

45 lines
856 B
PHP
Raw Normal View History

<?php
/**
* 文件功能:婚姻参数配置 Model
*
* 对应 marriage_configs 表,存储所有婚姻系统的可调参数。
* 管理员可在后台「婚姻管理 参数配置」页面修改,通过 MarriageConfigService 读取。
*
* @author ChatRoom Laravel
*
* @version 1.0.0
*/
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class MarriageConfig extends Model
{
/** @var list<string> */
protected $fillable = [
'group',
'key',
'value',
'label',
'description',
'min',
'max',
];
/**
* 字段类型转换。
*
* @return array<string, string>
*/
protected function casts(): array
{
return [
'value' => 'integer',
'min' => 'integer',
'max' => 'integer',
];
}
}