ryzz
ryzz copied to clipboard
Support enums?
I'd like to be able to use an enum to specify a field. Ideally, I can be able to have an enum that I can use then that would get stored as a String in the table
use ryzz::*;
use serde::{Deserialize, Serialize};
#[derive(Debug, Serialize, Deserialize)]
enum ContentType {
Shiny,
Plumber,
Rmd,
Qmd,
}
#[table("content")]
struct Content {
#[ryzz(pk)]
id: String,
name: String,
entrypoint: String,
slug: Option<String>,
content_type: ContentType,
}