Update unique columns in dict models (#577)

This commit is contained in:
Wu Clan
2025-04-17 11:06:29 +08:00
committed by GitHub
parent bb33e99e33
commit 1cc020efdd
2 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ class DictData(Base):
id: Mapped[id_key] = mapped_column(init=False)
label: Mapped[str] = mapped_column(String(32), unique=True, comment='字典标签')
value: Mapped[str] = mapped_column(String(32), unique=True, comment='字典值')
value: Mapped[str] = mapped_column(String(32), comment='字典值')
sort: Mapped[int] = mapped_column(default=0, comment='排序')
status: Mapped[int] = mapped_column(default=1, comment='状态0停用 1正常')
remark: Mapped[str | None] = mapped_column(

View File

@ -21,7 +21,7 @@ class DictType(Base):
__tablename__ = 'sys_dict_type'
id: Mapped[id_key] = mapped_column(init=False)
name: Mapped[str] = mapped_column(String(32), unique=True, comment='字典类型名称')
name: Mapped[str] = mapped_column(String(32), comment='字典类型名称')
code: Mapped[str] = mapped_column(String(32), unique=True, comment='字典类型编码')
status: Mapped[int] = mapped_column(default=1, comment='状态0停用 1正常')
remark: Mapped[str | None] = mapped_column(