improve migration file + seedbox management

This commit is contained in:
xiaomlove
2022-07-21 15:42:12 +08:00
parent b2e3c2cce3
commit b507c41bf0
33 changed files with 577 additions and 12 deletions
+15
View File
@@ -93,3 +93,18 @@ function approval($params)
return $rep->approval($CURUSER['id'], $params);
}
function addSeedBoxRecord($params)
{
global $CURUSER;
$rep = new \App\Repositories\SeedBoxRepository();
$params['uid'] = $CURUSER['id'];
$params['type'] = \App\Models\SeedBoxRecord::TYPE_USER;
return $rep->store($params);
}
function removeSeedBoxRecord($params)
{
global $CURUSER;
$rep = new \App\Repositories\SeedBoxRepository();
return $rep->delete($params['id'], $CURUSER['id']);
}