You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
694 B
31 lines
694 B
<?php
|
|
|
|
namespace app\common\model;
|
|
|
|
use think\Model;
|
|
|
|
/**
|
|
* 会员余额日志模型
|
|
*/
|
|
class MoneyLog extends Model
|
|
{
|
|
|
|
// 表名
|
|
protected $name = 'user_money_log';
|
|
// 开启自动写入时间戳字段
|
|
protected $autoWriteTimestamp = 'int';
|
|
// 定义时间戳字段名
|
|
protected $createTime = 'createtime';
|
|
protected $updateTime = '';
|
|
// 追加属性
|
|
// 追加属性
|
|
protected $append = [
|
|
"time_text","createtime"
|
|
];
|
|
public function getTimeTextAttr($value, $data){
|
|
return date("m月d日 H:i:s",$data['createtime']);
|
|
}
|
|
public function getCreatetimeAttr($value, $data){
|
|
return date("Y-m-d H:i:s",$value);
|
|
}
|
|
}
|
|
|