| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <?php
- namespace App\Module\Pet\Models;
- use UCore\ModelCore;
- use App\Module\Pet\Casts\DisplayAttributesCast;
- use App\Module\Pet\Casts\NumericAttributesCast;
- /**
- * 宠物配置模型
- *
- * field start
- * @property int $id
- * @property string $pet_type 宠物类型
- * @property string $name 宠物名字
- * @property \App\Module\Pet\Casts\DisplayAttributesCast $display_attributes 显示属性配置
- * @property \App\Module\Pet\Casts\NumericAttributesCast $numeric_attributes 数值属性配置
- * @property \Carbon\Carbon $created_at
- * @property \Carbon\Carbon $updated_at
- * field end
- */
- class PetConfig extends ModelCore
- {
- /**
- * 与模型关联的表名
- *
- * @var string
- */
- protected $table = 'pet_configs';
- // attrlist start
- protected $fillable = [
- 'id',
- 'pet_type',
- 'name',
- 'display_attributes',
- 'numeric_attributes',
- ];
- // attrlist end
- /**
- * 应该被转换为原生类型的属性
- *
- * @var array
- */
- protected $casts = [
- 'display_attributes' => DisplayAttributesCast::class,
- 'numeric_attributes' => NumericAttributesCast::class,
- ];
- }
|