Fix example
This commit is contained in:
parent
abcdbf2a48
commit
d4a915616a
@ -13,17 +13,6 @@ pub enum Relation {
|
|||||||
Fruit,
|
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 {
|
impl RelationTrait for Relation {
|
||||||
fn def(&self) -> RelationDef {
|
fn def(&self) -> RelationDef {
|
||||||
match self {
|
match self {
|
||||||
|
@ -35,7 +35,7 @@ pub fn expand_derive_entity_model(data: Data, attrs: Vec<Attribute>) -> syn::Res
|
|||||||
pub struct Entity;
|
pub struct Entity;
|
||||||
|
|
||||||
impl sea_orm::prelude::EntityName for Entity {
|
impl sea_orm::prelude::EntityName for Entity {
|
||||||
fn schema_name(&self) -> &str {
|
fn schema_name(&self) -> Option<&str> {
|
||||||
#schema_name
|
#schema_name
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user