Skip to content

Commit f90b466

Browse files
authored
Fix data rule expression column comment (#473)
1 parent 3b2b45d commit f90b466

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

backend/app/admin/model/data_rule.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class DataRule(Base):
1818
column: Mapped[str] = mapped_column(String(20), comment='数据库字段')
1919
operator: Mapped[int] = mapped_column(comment='运算符(0:and、1:or)')
2020
expression: Mapped[int] = mapped_column(
21-
comment='表达式(0:>、1:>=、2:<、3:<=、4:==、5:!=、6:in、7:not_in)'
21+
comment='表达式(0:==、1:!=、2:>、3:>=、4:<、5:<=、6:in、7:not_in)'
2222
)
2323
value: Mapped[str] = mapped_column(String(255), comment='规则值')
2424

backend/common/enums.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ class RoleDataRuleOperatorType(IntEnum):
4545
class RoleDataRuleExpressionType(IntEnum):
4646
"""数据权限规则表达式"""
4747

48-
eq = 0
49-
ne = 1
50-
gt = 2
51-
ge = 3
52-
lt = 4
53-
le = 5
48+
eq = 0 # ==
49+
ne = 1 # !=
50+
gt = 2 # >
51+
ge = 3 # >=
52+
lt = 4 # <
53+
le = 5 # <=
5454
in_ = 6
5555
not_in = 7
5656

0 commit comments

Comments
 (0)