审查视图

application/api/model/Tax.php 446 字节
李忠强 authored
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
<?php


namespace app\api\model;


use think\Model;

class Tax extends Model
{
    // 自动写入时间戳字段
    protected $autoWriteTimestamp = 'int';
    protected $createTime = 'createtime';
    protected $updateTime = '';
    protected $append = [
        'tax_time_text'
    ];

    public function getTaxTimeTextAttr($value,$data)
    {
        $value = !empty($data['tax_time'])?date('Y年m月d日'):'';
        return $value;
    }
}