toasty_driver_integration_suite/scenarios/in_list_item.rs
1//! Single `Item` model with one of each filterable type the `IN`-list tests
2//! exercise: a String column (`name`), a numeric column (`n`), an Option
3//! column (`bio`), and the auto-generated `id` (whose concrete type varies
4//! by ID variant — `u64` or `uuid::Uuid`).
5
6use crate::prelude::*;
7
8scenario! {
9 #![id(ID)]
10
11 #[derive(Debug, toasty::Model)]
12 struct Item {
13 #[key]
14 #[auto]
15 id: ID,
16
17 #[index]
18 name: String,
19
20 #[index]
21 n: i64,
22
23 bio: Option<String>,
24 }
25
26 async fn setup(test: &mut Test) -> toasty::Db {
27 test.setup_db(models!(Item)).await
28 }
29}