|
|
@@ -9,7 +9,25 @@ use UCore\ModelCore;
|
|
|
/**
|
|
|
* 物品基础信息
|
|
|
*
|
|
|
- * field start
|
|
|
+ * field start
|
|
|
+ * @property int $id 物品ID,主键
|
|
|
+ * @property string $name 物品名称
|
|
|
+ * @property string $description 物品描述
|
|
|
+ * @property int $category_id 物品分类ID,外键关联kku_item_categories表
|
|
|
+ * @property int $type 物品类型(1:可使用, 2:可装备, 3:可合成, 4:可交任务, 5:可开启...)
|
|
|
+ * @property int $is_unique 是否是单独属性物品(0:否,默认, 1:是)
|
|
|
+ * @property int $rarity 稀有度(1:普通, 2:稀有, 3:史诗, 4:传说...)
|
|
|
+ * @property string $icon 物品图标路径
|
|
|
+ * @property int $max_stack 最大堆叠数量
|
|
|
+ * @property int $sell_price 出售价格
|
|
|
+ * @property int $tradable 是否可交易(0:不可交易, 1:可交易,默认)
|
|
|
+ * @property int $dismantlable 是否可分解(0:不可分解, 1:可分解,默认)
|
|
|
+ * @property int $default_expire_seconds 玩家获取物品后的默认有效秒数(0表示永久有效)
|
|
|
+ * @property object|array $display_attributes 展示属性,以JSON格式存储键值对,用于界面展示和描述的属性
|
|
|
+ * @property object|array $numeric_attributes 数值属性,以JSON格式存储键值对,用于计算和游戏逻辑的属性
|
|
|
+ * @property string $global_expire_at 物品全局过期时间(可为空)
|
|
|
+ * @property \Carbon\Carbon $created_at 创建时间
|
|
|
+ * @property \Carbon\Carbon $updated_at 更新时间
|
|
|
* field end
|
|
|
*/
|
|
|
class Item extends ModelCore
|
|
|
@@ -21,12 +39,9 @@ class Item extends ModelCore
|
|
|
*/
|
|
|
protected $table = 'item_items';
|
|
|
|
|
|
- /**
|
|
|
- * 可批量赋值的属性
|
|
|
- *
|
|
|
- * @var array
|
|
|
- */
|
|
|
+ // attrlist start
|
|
|
protected $fillable = [
|
|
|
+ 'id',
|
|
|
'name',
|
|
|
'description',
|
|
|
'category_id',
|
|
|
@@ -43,6 +58,7 @@ class Item extends ModelCore
|
|
|
'numeric_attributes',
|
|
|
'global_expire_at',
|
|
|
];
|
|
|
+ // attrlist end
|
|
|
|
|
|
/**
|
|
|
* 应该被转换为日期的属性
|