This commit is contained in:
fengchuanhn@gmail.com
2026-05-21 00:19:11 +08:00
parent 1325ff92e5
commit 7f57dfa9ed
31 changed files with 10437 additions and 12 deletions

View File

@@ -1,8 +1,9 @@
ROLE_ADMIN = 1
ROLE_AGENT = 2
ROLE_OEM=3
ROLE_LABELS: dict[int, str] = {
0: "普通用户",
ROLE_ADMIN: "管理员",
ROLE_AGENT: "代理",
ROLE_OEM:"oem",
}

View File

@@ -19,7 +19,7 @@ class AdminUserCreate(BaseModel):
username: str = Field(min_length=1, max_length=64)
password: str = Field(min_length=6, max_length=128)
phone: str | None = Field(default=None, max_length=64)
role_id: int = Field(default=0, ge=0, le=2)
role_id: int = Field(default=0, ge=0, le=3)
vip_end_time: datetime | None = None
@field_validator("username")