21 lines
562 B
Rust
21 lines
562 B
Rust
use crate::{DateTimeUtc, UserId};
|
|
use sea_orm::entity::prelude::*;
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Serialize, Deserialize)]
|
|
#[sea_orm(table_name = "user_email_change")]
|
|
pub struct Model {
|
|
#[sea_orm(primary_key)]
|
|
pub token: String,
|
|
pub user_uid: UserId,
|
|
pub new_email: String,
|
|
pub expires_at: DateTimeUtc,
|
|
pub used: bool,
|
|
pub created_at: DateTimeUtc,
|
|
}
|
|
|
|
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
|
|
pub enum Relation {}
|
|
|
|
impl ActiveModelBehavior for ActiveModel {}
|