Fix example
This commit is contained in:
parent
abcdbf2a48
commit
d4a915616a
@ -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 {
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user