(db: &DbConn, name: &str, bakery_id: i32)
| 219 | } |
| 220 | |
| 221 | pub async fn insert_baker(db: &DbConn, name: &str, bakery_id: i32) -> Result<baker::Model, DbErr> { |
| 222 | baker::ActiveModel { |
| 223 | name: Set(name.to_owned()), |
| 224 | contact_details: Set(serde_json::json!({})), |
| 225 | bakery_id: Set(Some(bakery_id)), |
| 226 | ..Default::default() |
| 227 | } |
| 228 | .insert(db) |
| 229 | .await |
| 230 | } |
| 231 | |
| 232 | pub async fn insert_cake( |
| 233 | db: &DbConn, |
no test coverage detected