21 lines
386 B
Rust
21 lines
386 B
Rust
use serde::Serialize;
|
|
|
|
use crate::domain::entity::label::Label;
|
|
|
|
#[derive(Serialize)]
|
|
pub struct LabelResponseDto {
|
|
pub id: u32,
|
|
pub name: String,
|
|
pub color: String,
|
|
}
|
|
|
|
impl From<Label> for LabelResponseDto {
|
|
fn from(entity: Label) -> Self {
|
|
Self {
|
|
id: entity.id,
|
|
name: entity.name,
|
|
color: entity.color,
|
|
}
|
|
}
|
|
|
|
} |