From 03dcfc6255548d94b38973e2847abfe916cccc54 Mon Sep 17 00:00:00 2001 From: philipp Date: Thu, 9 Feb 2023 13:19:00 +0100 Subject: [PATCH] push --- README.md | 19 ++----------------- db.sqlite | Bin 40960 -> 40960 bytes src/main.rs | 20 ++------------------ 3 files changed, 4 insertions(+), 35 deletions(-) diff --git a/README.md b/README.md index 876aea5..e04419d 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,5 @@ -# DB -- day - - day (e.g. 2023-02-07) UNIQUE - - planned\_amount\_coxes (e.g. 2) DEFAULT 0 - - planned\_starting\_time NULLABLE STRING - - open\_registration DEFAULT true (false e.g. when usi rowing) -- trip - - day (FK) - - user\_id - - cox\_id NULLABLE (used if person wants to go with specific cox) - - begin STRING NULLABLE (only used user\_id wants to to be a cox) - - created TIMESTAMP DEFAULT NOW -- user - - id - - name UNIQUE - - is\_cox DEFAULT false - - is\_admin DEFAULT false +# Next +- User edit view (for admins) # UI - Next 7 days as columns diff --git a/db.sqlite b/db.sqlite index d8a30b1ca625722584cf0e1fbfeaf3531c6e6e3b..7e4d0e999f446ab08c90beed5e3eff19b93a4c7a 100644 GIT binary patch delta 497 zcmZXQKS%;$7{zMa5BL5jY2N zOVOYZG`K{eOA>?*L9`gO_mzWQzT5lb$MZhC`*mr*E*($P@<}8^%h&6daT6azMwQ|Y z&!~D9Kf`8NW;UHP9PT7z+=(TUQetkN^Dy;co|5}m^5F#U+eFNSF-YO5KYL7I8BKyO zbkX#zg$E!Y+jMYD_PWcFV2GK*WN7@F?`Y!*4bkof7GsQ)=) z1TDOvgKvC_+o#AN=SUrf@MmD zLN;GqD=y`-tHpF~#a30@@Hrz&l=)+LN*Qr%O>i5#?*}o3-!4f7#NuNFEQ}HrZIxOa&ynntU0N6=3!T, day: Form) -> Redirect #[derive(FromForm)] struct RegisterForm { day: NaiveDateForm, + #[field(validate = len(3..))] name: String, } @@ -233,21 +235,3 @@ async fn rocket() -> _ { .mount("/public", FileServer::from("static/")) .mount("/", routes![index, create, register, name, setname]) } - -//#[tokio::main] -//async fn main() { -// println!("Hello, world!"); -// let db = Database::connect("sqlite://db.sqlite").await.unwrap(); -// -// let day = day::ActiveModel { -// day: Set("2023-02-08".into()), -// ..Default::default() -// }; -// -// //day.insert(&db).await.unwrap(); -// -// let a: Vec = day::Entity::find().all(&db).await.unwrap(); -// println!("{:?}", a); -// -// db.close().await.unwrap(); -//}