Fix example

This commit is contained in:
Marco Napetti 2021-09-07 10:38:42 +02:00
parent abcdbf2a48
commit d4a915616a
2 changed files with 1 additions and 12 deletions

View File

@ -13,17 +13,6 @@ pub enum Relation {
Fruit,
}
impl ColumnTrait for Column {
type EntityName = Entity;
fn def(&self) -> ColumnDef {
match self {
Self::Id => ColumnType::Integer.def(),
Self::Name => ColumnType::String(None).def(),
}
}
}
impl RelationTrait for Relation {
fn def(&self) -> RelationDef {
match self {

View File

@ -35,7 +35,7 @@ pub fn expand_derive_entity_model(data: Data, attrs: Vec<Attribute>) -> syn::Res
pub struct Entity;
impl sea_orm::prelude::EntityName for Entity {
fn schema_name(&self) -> &str {
fn schema_name(&self) -> Option<&str> {
#schema_name
}