12345678910111213141516171819202122232425 |
- <?php
- namespace app\admin\model;
- use think\Model;
- class MobileOrderSubRemark extends Model
- {
- protected $autoWriteTimestamp=true;
- protected $updateTime=null;
- protected $append=[
- 'create_time_format',
- 'create_time_format_short',
- ];
- public function getCreateTimeFormatAttr($a,$m){
- return date('m/d H:i',$m['create_time']);
- }
- public function getCreateTimeFormatShortAttr($a,$m){
- return date('m/d',$m['create_time']);
- }
- public function admin(){
- return $this->belongsTo(Admin::class,'sub_admin_id','id',[],'left');
- }
- }
|