Skip to content

Commit 1cc020e

Browse files
authored
Update unique columns in dict models (#577)
1 parent bb33e99 commit 1cc020e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

backend/plugin/dict/model/dict_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class DictData(Base):
2222

2323
id: Mapped[id_key] = mapped_column(init=False)
2424
label: Mapped[str] = mapped_column(String(32), unique=True, comment='字典标签')
25-
value: Mapped[str] = mapped_column(String(32), unique=True, comment='字典值')
25+
value: Mapped[str] = mapped_column(String(32), comment='字典值')
2626
sort: Mapped[int] = mapped_column(default=0, comment='排序')
2727
status: Mapped[int] = mapped_column(default=1, comment='状态(0停用 1正常)')
2828
remark: Mapped[str | None] = mapped_column(

backend/plugin/dict/model/dict_type.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class DictType(Base):
2121
__tablename__ = 'sys_dict_type'
2222

2323
id: Mapped[id_key] = mapped_column(init=False)
24-
name: Mapped[str] = mapped_column(String(32), unique=True, comment='字典类型名称')
24+
name: Mapped[str] = mapped_column(String(32), comment='字典类型名称')
2525
code: Mapped[str] = mapped_column(String(32), unique=True, comment='字典类型编码')
2626
status: Mapped[int] = mapped_column(default=1, comment='状态(0停用 1正常)')
2727
remark: Mapped[str | None] = mapped_column(

0 commit comments

Comments
 (0)