Initial commit

This commit is contained in:
Connor Johnstone
2026-03-17 14:14:46 -04:00
commit 305ddff278
27 changed files with 1897 additions and 0 deletions

18
src/error.rs Normal file
View File

@@ -0,0 +1,18 @@
use sea_orm::DbErr;
#[derive(Debug, thiserror::Error)]
pub enum DbError {
#[error("database error: {0}")]
SeaOrm(#[from] DbErr),
#[error("migration error: {0}")]
Migration(String),
#[error("not found: {0}")]
NotFound(String),
#[error("serialization error: {0}")]
Serialization(#[from] serde_json::Error),
}
pub type DbResult<T> = Result<T, DbError>;