Complete architectural overhaul across all 12 crates: - Replace validator crate with zod-rs for all DTO validation - Replace manual pagination with paginator-rs/paginator-sea-orm - Migrate all modules (iam, cms, gacha, dimentorin) to clean architecture: domain → application → infrastructure layers - Introduce trait-based DI (Arc<dyn Trait>) at every layer for repositories and services - Delete all v1/ legacy SurrealDB-era code across every crate - Replace opaque response helpers with typed IntoResponse structs (ApiSuccess, ApiCreated, ApiPaginated, ApiMessage) - Remove dual_mode_repository, migration_validation_errors, validator.rs dead code - Zero cargo clippy warnings; release build clean Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
13 lines
487 B
Rust
13 lines
487 B
Rust
use async_trait::async_trait;
|
|
use uuid::Uuid;
|
|
use imphnen_utils::AppError;
|
|
use super::gacha_roll::GachaRollEntity;
|
|
|
|
#[async_trait]
|
|
pub trait GachaRollService: Send + Sync {
|
|
async fn get_roll(&self, id: Uuid) -> Result<GachaRollEntity, AppError>;
|
|
async fn create_roll(&self, entity: GachaRollEntity) -> Result<(), AppError>;
|
|
async fn execute_roll(&self, user_id: Uuid) -> Result<GachaRollEntity, AppError>;
|
|
async fn delete_roll(&self, id: Uuid) -> Result<(), AppError>;
|
|
}
|