about summary refs log tree commit diff stats
path: root/crates/rocie-server/src/storage/sql/recipe.rs
blob: 835d98b16fac70f5330122f379c75d8198640168 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::path::PathBuf;

use serde::{Deserialize, Serialize};
use utoipa::ToSchema;

use crate::storage::sql::mk_id;

#[derive(ToSchema, Debug, Clone, Serialize, Deserialize)]
pub(crate) struct Recipe {
    pub(crate) id: RecipeId,

    #[schema(value_type = String)]
    pub(crate) path: PathBuf,

    pub(crate) content: String,
}

mk_id!(RecipeId and RecipeIdStub);