汪总电商平台
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.

32 lines
694 B

3 months ago
<?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 = '';
// 追加属性
2 months ago
// 追加属性
3 months ago
protected $append = [
2 months ago
"time_text","createtime"
3 months ago
];
2 months ago
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);
}
3 months ago
}