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