mirror of
https://github.com/CloudNebulaProject/barycenter.git
synced 2026-04-10 21:20:41 +00:00
22 lines
599 B
Rust
22 lines
599 B
Rust
|
|
use sea_orm::entity::prelude::*;
|
||
|
|
use serde::{Deserialize, Serialize};
|
||
|
|
|
||
|
|
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)]
|
||
|
|
#[sea_orm(table_name = "refresh_tokens")]
|
||
|
|
pub struct Model {
|
||
|
|
#[sea_orm(primary_key, auto_increment = false)]
|
||
|
|
pub token: String,
|
||
|
|
pub client_id: String,
|
||
|
|
pub subject: String,
|
||
|
|
pub scope: String,
|
||
|
|
pub created_at: i64,
|
||
|
|
pub expires_at: i64,
|
||
|
|
pub revoked: i64,
|
||
|
|
pub parent_token: Option<String>,
|
||
|
|
}
|
||
|
|
|
||
|
|
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
|
||
|
|
pub enum Relation {}
|
||
|
|
|
||
|
|
impl ActiveModelBehavior for ActiveModel {}
|