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
598 B

  1. <?php
  2. namespace app\admin\model\unishop;
  3. use think\Model;
  4. class OrderExtend extends Model
  5. {
  6. //数据库
  7. protected $connection = 'database';
  8. // 表名
  9. protected $name = 'unishop_order_extend';
  10. // 自动写入时间戳字段
  11. protected $autoWriteTimestamp = 'int';
  12. // 定义时间戳字段名
  13. protected $createTime = 'createtime';
  14. protected $updateTime = 'updatetime';
  15. /**
  16. * 关联订单表
  17. * @return Model|\think\model\relation\HasOne
  18. */
  19. public function order()
  20. {
  21. return $this->hasOne('order', 'id', 'order_id');
  22. }
  23. }