Skip to content

Commit 5b18cd0

Browse files
committed
fix: synonyms字段从KeywordGroup移到Keyword模型
- synonyms字段实际在keywords表,但模型错放在KeywordGroup - 导致关键词API 500错误和关键词匹配失败
1 parent ec3434c commit 5b18cd0

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

backend/app/models/keyword.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,6 @@ class KeywordGroup(Base):
4848
total_keywords = Column(Integer, default=0, comment="关键词数量")
4949
total_matches = Column(Integer, default=0, comment="总匹配次数")
5050

51-
# 同义词扩展
52-
synonyms = Column(JSON, comment="同义词列表")
53-
5451
# 元数据
5552
created_at = Column(DateTime, server_default=func.now(), comment="创建时间")
5653
updated_at = Column(DateTime, server_default=func.now(), onupdate=func.now(), comment="更新时间")
@@ -81,6 +78,9 @@ class Keyword(Base):
8178
match_count = Column(Integer, default=0, comment="匹配次数")
8279
last_matched_at = Column(DateTime, comment="最后匹配时间")
8380

81+
# 同义词扩展
82+
synonyms = Column(JSON, comment="同义词列表")
83+
8484
# 状态
8585
is_active = Column(Boolean, default=True, comment="是否激活")
8686

0 commit comments

Comments
 (0)