Skip to main content

toasty_driver_integration_suite/scenarios/
versioned_counter.rs

1use crate::prelude::*;
2
3scenario! {
4    #[derive(Debug, toasty::Model)]
5    struct Counter {
6        #[key]
7        #[auto]
8        id: uuid::Uuid,
9
10        value: i64,
11
12        #[version]
13        version: u64,
14    }
15
16    async fn setup(test: &mut Test) -> toasty::Db {
17        test.setup_db(models!(Counter)).await
18    }
19}