feat: add smt module

This commit is contained in:
nepiedg
2026-04-26 09:24:08 +08:00
parent 69eb3e5019
commit 613e4a58a9
78 changed files with 4629 additions and 5673 deletions
+29
View File
@@ -0,0 +1,29 @@
<?php
declare(strict_types=1);
namespace app\smt\model;
class User extends BaseBizModel
{
protected $name = 'users';
protected $pk = 'id';
public static function findBySessionKey(string $sessionKey): ?self
{
return self::where('session_key', $sessionKey)->whereNull('deleted_at')->find();
}
public static function findActiveById(int $id): ?self
{
return self::where('id', $id)->whereNull('deleted_at')->find();
}
public static function findByMiniProgramOpenId(int $miniProgramId, string $openId): ?self
{
return self::where('mini_program_id', $miniProgramId)
->where('open_id', $openId)
->whereNull('deleted_at')
->find();
}
}