pzct/app/model/SpecialRoute.php

24 lines
637 B
PHP
Raw Permalink Normal View History

2023-07-25 09:22:32 +00:00
<?php
namespace app\model;
//特殊路由表
class SpecialRoute extends Base
{
const type_archives = "archives";
const type_archives_category = "archives_category";
public static function findOneByUrl(string $url="")
{
return self::where('route', $url)->find();
}
public static function deleteByTypeIds($ids,$type)
{
return self::where([['relation_id', "in",$ids],["type","=",$type]])->delete();
}
public static function findByTypeRelaTioneId($relationId,$type)
{
return self::where([['relation_id', "=",$relationId],["type","=",$type]])->find();
}
}