feat: add setup_tokens entity and migration for SeaORM

This commit is contained in:
GW_MC
2026-03-03 07:44:40 +00:00
parent 091743bb51
commit 520ab74391
4 changed files with 84 additions and 0 deletions

View File

@@ -5,6 +5,7 @@ pub mod prelude;
pub mod agents;
pub mod certificates;
pub mod organizations;
pub mod setup_tokens;
pub mod upstreams;
pub mod users;
pub mod virtual_hosts;

View File

@@ -0,0 +1,21 @@
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.19
use sea_orm::entity::prelude::*;
use serde::{Deserialize, Serialize};
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Serialize, Deserialize)]
#[sea_orm(table_name = "setup_tokens")]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: Uuid,
#[sea_orm(unique)]
pub token_hash: String,
pub expires_at: DateTimeWithTimeZone,
pub used_at: Option<DateTimeWithTimeZone>,
pub created_at: DateTimeWithTimeZone,
}
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {}
impl ActiveModelBehavior for ActiveModel {}