[seaorm] Añade soporte a SeaORM en PageTop

This commit is contained in:
Manuel Cillero 2024-12-06 05:45:37 +01:00
parent 49ba34ed0e
commit b8b98e07c7
17 changed files with 3453 additions and 12 deletions

View file

@ -0,0 +1,31 @@
use pagetop::prelude::*;
use std::sync::LazyLock;
pub mod config;
pub mod db;
/// The package Prelude.
pub mod prelude {
pub use crate::db;
pub use crate::install_migrations;
}
include_locales!(LOCALES_SEAORM);
/// Implements [`PackageTrait`] and specific package API.
pub struct SeaORM;
impl PackageTrait for SeaORM {
fn name(&self) -> L10n {
L10n::t("package_name", &LOCALES_SEAORM)
}
fn description(&self) -> L10n {
L10n::t("package_description", &LOCALES_SEAORM)
}
fn init(&self) {
LazyLock::force(&db::DBCONN);
}
}