feat: Add school_level column (985/211/双一流) to major export#2
Conversation
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Agent-Logs-Url: https://github.com/freecho/yzw/sessions/c7ce7f63-8e31-478a-b2d8-db8501632d9a Co-authored-by: freecho <53343985+freecho@users.noreply.github.com>
|
@copilot review the pr |
|
@copilot bad review, try it adain |
I re-reviewed the PR based only on implementation correctness (not external school-list authority verification): ✅
✅
No UI changes in this PR, so no UI screenshot is applicable. |
Adds a
school_levelcolumn to themajortable and CSV export, populated at insert time based on the school name. Values are slash-joined tier labels (e.g.985/211/双一流); empty string if unmatched.Changes
data/school_level.py(new): Three frozen sets (SCHOOLS_985,SCHOOLS_211,SCHOOLS_SHUANGYILIU) and a lookup function:data/entity.py:school_level = Column(String(50))inserted immediately afterschool_name— preserves column order in CSV export (which readsMajor.__table__.columnsdirectly).data/db.py:insert()callsget_school_level(item.get("dwmc", ""))to populate the field on every record.yzw.sql:school_level varchar(50)added afterschool_namein the DDL.README.md: New "导出字段说明" section documents the field and its possible values.Original prompt
This pull request was created from Copilot chat.