25 lines
468 B
PHP
25 lines
468 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
|
|
class Quota extends BaseModel
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $table = "quota";
|
|
|
|
const USE_NUM = 1; //暂定一次减少一个名额
|
|
|
|
public function collaboratorInfo()
|
|
{
|
|
return $this->hasOne(Collaborator::class, 'id', 'collaborator_id');
|
|
}
|
|
|
|
public function agencyInfo()
|
|
{
|
|
return $this->hasOne(Agency::class, 'id', 'agency_id');
|
|
}
|
|
}
|