- 
  Notifications
 You must be signed in to change notification settings 
- Fork 5
feat:add skl in salmon base #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| WalkthroughThe recent changes introduce the  Changes
 Poem
 Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit: 
 Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
 Additionally, you can add  CodeRabbit Configuration File ( | 
 
 @coderabbitai
 
 coderabbitai
 bot
 
 
 left a comment
 
 
 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- campusapis/sklInfo/v1/skl.proto (1 hunks)
Additional context used
buf
campusapis/sklInfo/v1/skl.proto
5-5: Import "campusapis/schoolTime/defined.proto" is unused.
(IMPORT_USED)
6-6: Import "campusapis/staff/base.proto" is unused.
(IMPORT_USED)
8-8: Import "google/protobuf/empty.proto" is unused.
(IMPORT_USED)
75-75: RPC request type "SklUnitInfoRequest" should be named "GetSklUnitInfoRequest" or "SklInfoServiceGetSklUnitInfoRequest".
(RPC_REQUEST_STANDARD_NAME)
75-75: RPC response type "SklUnitInfo" should be named "GetSklUnitInfoResponse" or "SklInfoServiceGetSklUnitInfoResponse".
(RPC_RESPONSE_STANDARD_NAME)
Additional comments not posted (3)
campusapis/sklInfo/v1/skl.proto (3)
11-31: Go package and OpenAPI documentation look good.The Go package and OpenAPI documentation options are well-defined, enhancing usability and accessibility for developers.
36-71:SklStudentHistoryInfomessage definition looks good.The fields are well-defined and appropriately commented, providing clear context for each field.
86-102: Message definitions look good, but verify alignment with renaming.The field definitions for
SklUnitInfo,SklUnitInfoRequest, andSklUnitInfoResponseare appropriate. Ensure that the response message aligns with the suggested renaming of the RPC types.
 
 
 campusapis/sklInfo/v1/skl.proto
 
 Outdated
 
 
 There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove unused imports.
The following imports are unused and can be removed to clean up the file:
- campusapis/schoolTime/defined.proto
- campusapis/staff/base.proto
- google/protobuf/empty.proto
Remove the unused imports:
- import "campusapis/schoolTime/defined.proto"; - import "campusapis/staff/base.proto"; - import "google/protobuf/empty.proto";
Committable suggestion
!!️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
Tools
buf
5-5: Import "campusapis/schoolTime/defined.proto" is unused.
(IMPORT_USED)
6-6: Import "campusapis/staff/base.proto" is unused.
(IMPORT_USED)
8-8: Import "google/protobuf/empty.proto" is unused.
(IMPORT_USED)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider renaming RPC request and response types.
To align with standard naming conventions, consider renaming:
- SklUnitInfoRequestto- GetSklUnitInfoRequest
- SklUnitInfoto- GetSklUnitInfoResponse
Rename the types as follows:
- rpc GetSklUnitInfo(SklUnitInfoRequest) returns (SklUnitInfo) { + rpc GetSklUnitInfo(GetSklUnitInfoRequest) returns (GetSklUnitInfoResponse) {
Committable suggestion
!!️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
Tools
buf
75-75: RPC request type "SklUnitInfoRequest" should be named "GetSklUnitInfoRequest" or "SklInfoServiceGetSklUnitInfoRequest".
(RPC_REQUEST_STANDARD_NAME)
75-75: RPC response type "SklUnitInfo" should be named "GetSklUnitInfoResponse" or "SklInfoServiceGetSklUnitInfoResponse".
(RPC_RESPONSE_STANDARD_NAME)
 
 @coderabbitai
 
 coderabbitai
 bot
 
 
 left a comment
 
 
 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range, codebase verification and nitpick comments (1)
campusapis/sklInfo/v1/skl.proto (1)
33-68: Remove commented-out code if not needed.The commented-out
SklStudentHistoryInfomessage should be removed if it's not required, to maintain cleanliness and readability.-//// Skl 数据库中的student_history_info表 -//message SklStudentHistoryInfo { -// string StudentName = 1; // 学生姓名 -// string UnitId = 2; // 学院ID -// ... -//}
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- campusapis/sklInfo/v1/skl.proto (1 hunks)
Additional context used
buf
campusapis/sklInfo/v1/skl.proto
72-72: RPC request type "SklUnitInfoRequest" should be named "GetSklUnitInfoRequest" or "SklInfoServiceGetSklUnitInfoRequest".
(RPC_REQUEST_STANDARD_NAME)
72-72: RPC response type "SklUnitInfo" should be named "GetSklUnitInfoResponse" or "SklInfoServiceGetSklUnitInfoResponse".
(RPC_RESPONSE_STANDARD_NAME)
Additional comments not posted (5)
campusapis/sklInfo/v1/skl.proto (5)
1-3: Syntax and package declaration are correct.The syntax is set to proto3, and the package is correctly defined.
5-6: Import statements are appropriate.The imports are relevant for API annotations and OpenAPI documentation.
10-28: OpenAPI options are well-defined.The options enhance the documentation and usability of the API.
70-79: Consider renaming RPC request and response types.To align with standard naming conventions, consider renaming:
SklUnitInfoRequesttoGetSklUnitInfoRequest
SklUnitInfotoGetSklUnitInfoResponseRename the types as follows:
- rpc GetSklUnitInfo(SklUnitInfoRequest) returns (SklUnitInfo) { + rpc GetSklUnitInfo(GetSklUnitInfoRequest) returns (GetSklUnitInfoResponse) {Tools
buf
72-72: RPC request type "SklUnitInfoRequest" should be named "GetSklUnitInfoRequest" or "SklInfoServiceGetSklUnitInfoRequest".
(RPC_REQUEST_STANDARD_NAME)
72-72: RPC response type "SklUnitInfo" should be named "GetSklUnitInfoResponse" or "SklInfoServiceGetSklUnitInfoResponse".
(RPC_RESPONSE_STANDARD_NAME)
82-99: Consider renaming message types for consistency.To align with standard naming conventions, consider renaming:
SklUnitInfotoGetSklUnitInfoResponse
SklUnitInfoRequesttoGetSklUnitInfoRequestThis will improve consistency with the RPC method naming.
Uh oh!
There was an error while loading. Please reload this page.
Summary by CodeRabbit
New Features
Bug Fixes