<?php
// +----------------------------------------------------------------------
// | A3Mall
// +----------------------------------------------------------------------
// | Copyright (c) 2020 http://www.a3-mall.com All rights reserved.
// +----------------------------------------------------------------------
// | Author: xzncit <158373108@qq.com>
// +----------------------------------------------------------------------

namespace app\api\model\promotion;

use app\common\model\goods\Goods as GoodsModel;
use app\common\model\promotion\Bargain as BargainModel;
use app\common\model\promotion\BargainUsers as BargainUsersModel;

/**
 * @package app\api\model\promotion
 * @class BargainUsers
 * @author xzncit 2024-03-04
 */
class BargainUsers extends BargainUsersModel {

    /**
     * 关联表
     * @return \think\model\relation\HasOne
     */
    public function goods(){
        return $this->hasOne(GoodsModel::class,'id','goods_id');
    }

    /**
     * 关联表
     * @return \think\model\relation\HasOne
     */
    public function bargain(){
        return $this->hasOne(BargainModel::class,'id','bargain_id');
    }

}