|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <?php
- /**
- * Created by PhpStorm.
- * User: zhengmingwei
- * Date: 2020/1/6
- * Time: 11:25 下午
- */
-
-
- namespace addons\unishop\model;
-
-
- use addons\unishop\extend\Hashids;
- use think\Model;
-
- /**
- * 订单扩展模型
- * Class OrderExtend
- * @package addons\unishop\model
- */
- class OrderExtend extends Model
- {
- // 表名
- protected $name = 'unishop_order_extend';
-
- // 开启自动写入时间戳字段
- protected $autoWriteTimestamp = 'int';
-
- // 定义时间戳字段名
- protected $createTime = 'createtime';
- protected $updateTime = 'updatetime';
-
- // 隐藏属性
- protected $hidden = [
- 'order_id',
- 'product_id'
- ];
-
- /**
- * 关联地址信息
- */
- public function address()
- {
- $this->belongsTo('address', 'address_id', 'id');
- }
- }
|