Skip to content
This repository was archived by the owner on Jul 16, 2024. It is now read-only.

User Info Level #97

Open
nichujie opened this issue Mar 12, 2022 · 1 comment
Open

User Info Level #97

nichujie opened this issue Mar 12, 2022 · 1 comment
Labels
p2 Will work on this later

Comments

@nichujie
Copy link
Contributor

class UserDetail(TimestampMixin, User):
email: EmailStr = Field(nullable=False)
student_id: str = Field(
"",
index=True,
nullable=False,
sa_column_kwargs={"server_default": ""},
)
real_name: str = Field(
"",
index=True,
nullable=False,
sa_column_kwargs={"server_default": ""},
)
register_ip: str = Field(
nullable=False,
sa_column_kwargs={"server_default": "127.0.0.1"},
)
login_at: datetime = Field(
sa_column=get_datetime_column(nullable=False, server_default=utcnow()),
)
login_ip: str = Field(
nullable=False,
sa_column_kwargs={"server_default": "127.0.0.1"},
)
class UserDetailWithDomainRole(UserDetail, UserWithDomainRole):
...

Better to have multi-level design:

  • Preview: username, gravatar...
  • Domain manager: realname, email, studentId...
  • Only root can see: register_ip, login_ip, ...
@nichujie nichujie added the p0 Should be fixed ASAP label Mar 12, 2022
@BoYanZh
Copy link
Member

BoYanZh commented Mar 13, 2022

We need to discuss the detailed design.

@BoYanZh BoYanZh added p2 Will work on this later and removed p0 Should be fixed ASAP labels May 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p2 Will work on this later
Projects
None yet
Development

No branches or pull requests

2 participants