You've already forked guangan
26 lines
512 B
PHP
26 lines
512 B
PHP
<?php
|
|
|
|
namespace plugin\points_mall\model;
|
|
|
|
use think\admin\Model;
|
|
|
|
class PointsMallOrderItem extends Model
|
|
{
|
|
/**
|
|
* 关联订单信息
|
|
* @return \think\model\relation\HasOne
|
|
*/
|
|
public function main()
|
|
{
|
|
return $this->hasOne(PointsMallOrder::class, 'order_no', 'order_no');
|
|
}
|
|
|
|
/**
|
|
* 关联商品信息
|
|
* @return \think\model\relation\HasOne
|
|
*/
|
|
public function goods()
|
|
{
|
|
return $this->hasOne(PointsMallGoods::class, 'code', 'gcode');
|
|
}
|
|
} |