chore: seed migration objects batch 21

This commit is contained in:
dev
2026-10-18 13:32:44 +08:00
parent 3b67ce6713
commit 4ddf138422
67 changed files with 4984 additions and 10 deletions
@@ -78,6 +78,15 @@ func GetUserId(ctx context.Context) int64 {
return user.Id
}
// GetTenantId 获取当前身份关联的统一租户ID(im_tenant.id)。
func GetTenantId(ctx context.Context) int64 {
user := GetUser(ctx)
if user == nil {
return 0
}
return user.TenantId
}
// GetRoleId 获取用户角色ID
func GetRoleId(ctx context.Context) int64 {
user := GetUser(ctx)