(db: &DbConn, name: &str)
| 209 | } |
| 210 | |
| 211 | pub async fn insert_bakery(db: &DbConn, name: &str) -> Result<bakery::Model, DbErr> { |
| 212 | bakery::ActiveModel { |
| 213 | name: Set(name.to_owned()), |
| 214 | profit_margin: Set(1.0), |
| 215 | ..Default::default() |
| 216 | } |
| 217 | .insert(db) |
| 218 | .await |
| 219 | } |
| 220 | |
| 221 | pub async fn insert_baker(db: &DbConn, name: &str, bakery_id: i32) -> Result<baker::Model, DbErr> { |
| 222 | baker::ActiveModel { |
no test coverage detected