mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-09 01:36:57 +08:00
15 lines
397 B
Python
15 lines
397 B
Python
|
|
from sqlmodel import SQLModel, Field
|
|
|
|
class sys_user(SQLModel, table=True):
|
|
id: int = Field(primary_key=True, index=True)
|
|
account: str = Field(max_length=255, unique=True)
|
|
password: str = Field(max_length=255)
|
|
oid: int = Field(default=1)
|
|
|
|
def to_dict(self):
|
|
return {
|
|
"id": self.id,
|
|
"account": self.account,
|
|
"oid": self.oid
|
|
} |