diff --git a/src/entity/model.rs b/src/entity/model.rs index 7874c377..4d3dd625 100644 --- a/src/entity/model.rs +++ b/src/entity/model.rs @@ -2,7 +2,7 @@ use crate::{ColumnTrait, QueryResult, TypeErr}; pub use sea_query::Value; use std::fmt::Debug; -pub trait ModelTrait: Clone + Debug + Default { +pub trait ModelTrait: Clone + Debug { type Column: ColumnTrait; fn get(&self, c: Self::Column) -> Value; diff --git a/src/tests_cfg/cake.rs b/src/tests_cfg/cake.rs index 56b2742c..d61c13ee 100644 --- a/src/tests_cfg/cake.rs +++ b/src/tests_cfg/cake.rs @@ -5,7 +5,7 @@ use crate::entity::prelude::*; #[table = "cake"] pub struct Entity; -#[derive(Clone, Debug, Default, PartialEq, DeriveModel)] +#[derive(Clone, Debug, PartialEq, DeriveModel)] pub struct Model { pub id: i32, pub name: String, diff --git a/src/tests_cfg/fruit.rs b/src/tests_cfg/fruit.rs index 23a274c3..c4067a28 100644 --- a/src/tests_cfg/fruit.rs +++ b/src/tests_cfg/fruit.rs @@ -5,7 +5,7 @@ use crate::entity::prelude::*; #[table = "fruit"] pub struct Entity; -#[derive(Clone, Debug, Default, PartialEq, DeriveModel)] +#[derive(Clone, Debug, PartialEq, DeriveModel)] pub struct Model { pub id: i32, pub name: String,