You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
OneAuth/oab/src/models/mod.rs

24 lines
450 B
Rust

3 years ago
//
// mod.rs
// Copyright (C) 2022 veypi <veypi@qq.com>
// 2022-06-02 23:04
// Distributed under terms of the MIT license.
//
3 years ago
pub mod app;
mod role;
3 years ago
mod user;
3 years ago
use tracing::info;
3 years ago
pub use app::{AUStatus, App, AppJoin, AppUser};
pub use role::{Access, Resource, Role};
3 years ago
pub use user::{AccessCore, AccessLevel, Token, User};
3 years ago
3 years ago
use crate::CONFIG;
3 years ago
pub async fn init() {
info!("init database");
3 years ago
sqlx::migrate!().run(CONFIG.db()).await.unwrap();
3 years ago
}