toasty_driver_integration_suite/scenarios/user_with_zip_address.rs
1use crate::prelude::*;
2
3scenario! {
4 #![id(ID)]
5
6 #[derive(Debug, toasty::Model)]
7 #[allow(dead_code)]
8 struct User {
9 #[key]
10 #[auto]
11 id: ID,
12
13 name: String,
14
15 address: Address,
16 }
17
18 #[derive(Debug, toasty::Embed)]
19 struct Address {
20 street: String,
21 city: String,
22 zip: String,
23 }
24
25 async fn setup(test: &mut Test) -> toasty::Db {
26 test.setup_db(models!(User)).await
27 }
28}