Skip to content

调整SessionId和Description为可空字符串类型#756

Merged
MayueCif merged 1 commit intomainfrom
feat/update_entity_adapt_PersistedGrantDbContext
Mar 4, 2026
Merged

调整SessionId和Description为可空字符串类型#756
MayueCif merged 1 commit intomainfrom
feat/update_entity_adapt_PersistedGrantDbContext

Conversation

@MayueCif
Copy link
Contributor

@MayueCif MayueCif commented Mar 4, 2026

适配PersistedGrantDbContext中的定义,将DeviceFlowCodes和PersistedGrant中的SessionId与Description属性由非空字符串改为可空字符串(string?),并移除默认空字符串赋值,以更准确表达属性可为null的业务场景。

将DeviceFlowCodes和PersistedGrant中的SessionId与Description属性由非空字符串改为可空字符串(string?),并移除默认空字符串赋值,以更准确表达属性可为null的业务场景。
Copilot AI review requested due to automatic review settings March 4, 2026 01:06
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

该 PR 通过将 PersistedGrantDeviceFlowCodes 实体中的 SessionIdDescription 从非空字符串调整为可空字符串(string?),以匹配当前 EF Core EntityTypeConfiguration 中对这些字段“可选(IsRequired(false) / 可空推断)”的建模语义,更准确表达数据库/业务允许为 NULL 的场景。

Changes:

  • PersistedGrant.SessionIdPersistedGrant.Description 调整为 string?,并移除默认 string.Empty 初始化
  • DeviceFlowCodes.SessionIdDeviceFlowCodes.Description 调整为 string?,并移除默认 string.Empty 初始化

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/BuildingBlocks/Authentication/OpenIdConnect/Masa.BuildingBlocks.Authentication.OpenIdConnect.Domain/Entities/PersistedGrant.cs SessionId/Description 改为可空以贴合 EF 配置的可选列语义
src/BuildingBlocks/Authentication/OpenIdConnect/Masa.BuildingBlocks.Authentication.OpenIdConnect.Domain/Entities/DeviceFlowCodes.cs SessionId/Description 改为可空以贴合 EF 配置的可选列语义

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 4, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
C Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@MayueCif MayueCif merged commit c210923 into main Mar 4, 2026
6 of 7 checks passed
@MayueCif MayueCif deleted the feat/update_entity_adapt_PersistedGrantDbContext branch March 4, 2026 01:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants