#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum AccountLevel {
Default = 0,
Admin = 1,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Deserialize, Serialize)]
pub enum AccountError {
Nothing,
PassNotMatched,
UserNotExists,
DatabaseError,
UsernameAlreadyExists,
EmailAlreadyExists,
NetworkError,
PasswordVerifyFailed,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Deserialize, Serialize)]
pub enum BlogError {
Nothing,
AuthError,
DatabaseError,
NetworkError,
PermissionError,
TooShortTitle,
TooShortBody,
InvalidTags,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Deserialize, Serialize)]
pub struct AccountToken {
pk: i32,
}