Merged
Conversation
将DeviceFlowCodes和PersistedGrant中的SessionId与Description属性由非空字符串改为可空字符串(string?),并移除默认空字符串赋值,以更准确表达属性可为null的业务场景。
There was a problem hiding this comment.
Pull request overview
该 PR 通过将 PersistedGrant 与 DeviceFlowCodes 实体中的 SessionId、Description 从非空字符串调整为可空字符串(string?),以匹配当前 EF Core EntityTypeConfiguration 中对这些字段“可选(IsRequired(false) / 可空推断)”的建模语义,更准确表达数据库/业务允许为 NULL 的场景。
Changes:
- 将
PersistedGrant.SessionId、PersistedGrant.Description调整为string?,并移除默认string.Empty初始化 - 将
DeviceFlowCodes.SessionId、DeviceFlowCodes.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.
Qinyouzeng
approved these changes
Mar 4, 2026
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




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