1234567891011121314151617181920212223242526272829 |
- <?php
- namespace app\common\model;
- use app\admin\model\Admin;
- use think\Model;
- use Yansongda\Supports\Str;
- /**
- * 配置模型
- */
- class MobileOrderOperation extends Model
- {
- protected $autoWriteTimestamp=true;
- protected $updateTime=null;
- protected $append=[
- 'create_time_format',
- 'create_time_format_short',
- ];
- public function getCreateTimeFormatAttr($a,$m){
- return date('Y-m-d H:i:s',$m['create_time']);
- }
- public function getCreateTimeFormatShortAttr($a,$m){
- return date('m/d',$m['create_time']);
- }
- public function admin(){
- return $this->belongsTo(Admin::class);
- }
- }
|