MobileOrderSubRemark.php 597 B

12345678910111213141516171819202122232425
  1. <?php
  2. namespace app\admin\model;
  3. use think\Model;
  4. class MobileOrderSubRemark extends Model
  5. {
  6. protected $autoWriteTimestamp=true;
  7. protected $updateTime=null;
  8. protected $append=[
  9. 'create_time_format',
  10. 'create_time_format_short',
  11. ];
  12. public function getCreateTimeFormatAttr($a,$m){
  13. return date('m/d H:i',$m['create_time']);
  14. }
  15. public function getCreateTimeFormatShortAttr($a,$m){
  16. return date('m/d',$m['create_time']);
  17. }
  18. public function admin(){
  19. return $this->belongsTo(Admin::class,'sub_admin_id','id',[],'left');
  20. }
  21. }