25 lines
487 B
Rust
25 lines
487 B
Rust
use serde::{Deserialize, Serialize};
|
|
use uuid::Uuid;
|
|
|
|
use crate::domain;
|
|
|
|
#[derive(Debug, Deserialize)]
|
|
pub struct UserAppRequest {}
|
|
|
|
impl UserAppRequest {
|
|
pub fn into_domain(self, user_id: Uuid, id: Uuid) -> domain::UserApp {
|
|
domain::UserApp { id, user_id }
|
|
}
|
|
}
|
|
|
|
#[derive(Debug, Serialize)]
|
|
pub struct UserAppResponse {
|
|
pub id: Uuid,
|
|
}
|
|
|
|
impl From<domain::UserApp> for UserAppResponse {
|
|
fn from(app: domain::UserApp) -> Self {
|
|
Self { id: app.id }
|
|
}
|
|
}
|