cala_server/job/
cursor.rs

1use serde::{Deserialize, Serialize};
2
3use super::entity::*;
4use crate::primitives::JobId;
5
6#[derive(Debug, Serialize, Deserialize)]
7pub struct JobByNameCursor {
8    pub name: String,
9    pub id: JobId,
10}
11
12impl From<Job> for JobByNameCursor {
13    fn from(job: Job) -> Self {
14        Self {
15            name: job.name.clone(),
16            id: job.id,
17        }
18    }
19}