#![allow(proc_macro_derive_resolution_fallback, unused_imports)] #[macro_use] extern crate diesel; use diesel::{pg::PgConnection, prelude::*}; use diesel_factories::{Association, Factory}; mod schema { table! { users (id) { id -> Integer, } } } #[derive(Queryable, Clone)] struct User { pub id: i32, } #[derive(Clone, Factory)] #[factory( model = User, table = crate::schema::users, connection = diesel::pg::PgConnection )] struct UserFactory {} impl Default for UserFactory { fn default() -> Self { Self {} } } fn main() {}