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.
 
 
 
 
 
 

47 line
808 B

  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: zhengmingwei
  5. * Date: 2020/1/6
  6. * Time: 11:25 下午
  7. */
  8. namespace addons\unishop\model;
  9. use addons\unishop\extend\Hashids;
  10. use think\Model;
  11. /**
  12. * 订单扩展模型
  13. * Class OrderExtend
  14. * @package addons\unishop\model
  15. */
  16. class OrderExtend extends Model
  17. {
  18. // 表名
  19. protected $name = 'unishop_order_extend';
  20. // 开启自动写入时间戳字段
  21. protected $autoWriteTimestamp = 'int';
  22. // 定义时间戳字段名
  23. protected $createTime = 'createtime';
  24. protected $updateTime = 'updatetime';
  25. // 隐藏属性
  26. protected $hidden = [
  27. 'order_id',
  28. 'product_id'
  29. ];
  30. /**
  31. * 关联地址信息
  32. */
  33. public function address()
  34. {
  35. $this->belongsTo('address', 'address_id', 'id');
  36. }
  37. }