relocate newdrink

This commit is contained in:
Zynh0722 2023-11-14 21:54:43 -08:00
parent ccfefbf501
commit b03ea80e8e

View file

@ -22,6 +22,15 @@ pub struct Drink {
pub time: chrono::NaiveDateTime, pub time: chrono::NaiveDateTime,
} }
#[derive(Insertable, Deserialize, Debug)]
#[diesel(table_name = crate::schema::drinks)]
#[diesel(check_for_backend(diesel::mysql::Mysql))]
pub struct NewDrink {
pub price: u32,
pub quantity: u32,
pub shift: u32,
}
#[derive(Identifiable, Queryable, Selectable, Debug, Clone)] #[derive(Identifiable, Queryable, Selectable, Debug, Clone)]
#[diesel(table_name = crate::schema::dancers)] #[diesel(table_name = crate::schema::dancers)]
#[diesel(check_for_backend(diesel::mysql::Mysql))] #[diesel(check_for_backend(diesel::mysql::Mysql))]
@ -49,12 +58,3 @@ pub struct Show {
pub start: chrono::NaiveDateTime, pub start: chrono::NaiveDateTime,
pub end: Option<chrono::NaiveDateTime>, pub end: Option<chrono::NaiveDateTime>,
} }
#[derive(Insertable, Deserialize, Debug)]
#[diesel(table_name = crate::schema::drinks)]
#[diesel(check_for_backend(diesel::mysql::Mysql))]
pub struct NewDrink {
pub price: u32,
pub quantity: u32,
pub shift: u32,
}