12345678910111213141516171819202122232425262728 |
- <?php
- namespace app\admin\model\instrument;
- use think\Model;
- /**
- * Display
- */
- class Display extends Model
- {
- // 表名
- protected $name = 'instrument_display';
- // 自动写入时间戳字段
- protected $autoWriteTimestamp = true;
- public function getInstrumentValueAttr($value): float
- {
- return (float)$value;
- }
- public function getInstrumentIntroductionAttr($value): string
- {
- return !$value ? '' : htmlspecialchars_decode($value);
- }
- }
|