1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use serde::{Deserialize, Serialize};

use super::entity::*;
use crate::primitives::JobId;

#[derive(Debug, Serialize, Deserialize)]
pub struct JobByNameCursor {
    pub name: String,
    pub id: JobId,
}

impl From<Job> for JobByNameCursor {
    fn from(job: Job) -> Self {
        Self {
            name: job.name.clone(),
            id: job.id,
        }
    }
}