impl EntityTrait
This commit is contained in:
parent
70a1559c60
commit
0c4b69e3b3
@ -27,16 +27,6 @@ pub enum Relation {
|
||||
CakeFilling,
|
||||
}
|
||||
|
||||
impl EntityTrait for Entity {
|
||||
type Model = Model;
|
||||
|
||||
type Column = Column;
|
||||
|
||||
type PrimaryKey = PrimaryKey;
|
||||
|
||||
type Relation = Relation;
|
||||
}
|
||||
|
||||
impl ColumnTrait for Column {
|
||||
type EntityName = Entity;
|
||||
|
||||
|
@ -28,16 +28,6 @@ pub enum Relation {
|
||||
Filling,
|
||||
}
|
||||
|
||||
impl EntityTrait for Entity {
|
||||
type Model = Model;
|
||||
|
||||
type Column = Column;
|
||||
|
||||
type PrimaryKey = PrimaryKey;
|
||||
|
||||
type Relation = Relation;
|
||||
}
|
||||
|
||||
impl ColumnTrait for Column {
|
||||
type EntityName = Entity;
|
||||
|
||||
|
@ -24,16 +24,6 @@ pub enum PrimaryKey {
|
||||
#[derive(Copy, Clone, Debug, EnumIter)]
|
||||
pub enum Relation {}
|
||||
|
||||
impl EntityTrait for Entity {
|
||||
type Model = Model;
|
||||
|
||||
type Column = Column;
|
||||
|
||||
type PrimaryKey = PrimaryKey;
|
||||
|
||||
type Relation = Relation;
|
||||
}
|
||||
|
||||
impl ColumnTrait for Column {
|
||||
type EntityName = Entity;
|
||||
|
||||
|
@ -26,16 +26,6 @@ pub enum PrimaryKey {
|
||||
#[derive(Copy, Clone, Debug, EnumIter)]
|
||||
pub enum Relation {}
|
||||
|
||||
impl EntityTrait for Entity {
|
||||
type Model = Model;
|
||||
|
||||
type Column = Column;
|
||||
|
||||
type PrimaryKey = PrimaryKey;
|
||||
|
||||
type Relation = Relation;
|
||||
}
|
||||
|
||||
impl ColumnTrait for Column {
|
||||
type EntityName = Entity;
|
||||
|
||||
|
@ -39,5 +39,15 @@ pub fn expend_derive_entity(ident: Ident, attrs: Vec<Attribute>) -> syn::Result<
|
||||
write!(s, "{}", self.as_str()).unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
impl EntityTrait for #ident {
|
||||
type Model = Model;
|
||||
|
||||
type Column = Column;
|
||||
|
||||
type PrimaryKey = PrimaryKey;
|
||||
|
||||
type Relation = Relation;
|
||||
}
|
||||
))
|
||||
}
|
||||
|
@ -28,16 +28,6 @@ pub enum Relation {
|
||||
CakeFilling,
|
||||
}
|
||||
|
||||
impl EntityTrait for Entity {
|
||||
type Model = Model;
|
||||
|
||||
type Column = Column;
|
||||
|
||||
type PrimaryKey = PrimaryKey;
|
||||
|
||||
type Relation = Relation;
|
||||
}
|
||||
|
||||
impl ColumnTrait for Column {
|
||||
type EntityName = Entity;
|
||||
|
||||
|
@ -29,16 +29,6 @@ pub enum Relation {
|
||||
Filling,
|
||||
}
|
||||
|
||||
impl EntityTrait for Entity {
|
||||
type Model = Model;
|
||||
|
||||
type Column = Column;
|
||||
|
||||
type PrimaryKey = PrimaryKey;
|
||||
|
||||
type Relation = Relation;
|
||||
}
|
||||
|
||||
impl ColumnTrait for Column {
|
||||
type EntityName = Entity;
|
||||
|
||||
|
@ -25,16 +25,6 @@ pub enum PrimaryKey {
|
||||
#[derive(Copy, Clone, Debug, EnumIter)]
|
||||
pub enum Relation {}
|
||||
|
||||
impl EntityTrait for Entity {
|
||||
type Model = Model;
|
||||
|
||||
type Column = Column;
|
||||
|
||||
type PrimaryKey = PrimaryKey;
|
||||
|
||||
type Relation = Relation;
|
||||
}
|
||||
|
||||
impl ColumnTrait for Column {
|
||||
type EntityName = Entity;
|
||||
|
||||
|
@ -27,16 +27,6 @@ pub enum PrimaryKey {
|
||||
#[derive(Copy, Clone, Debug, EnumIter)]
|
||||
pub enum Relation {}
|
||||
|
||||
impl EntityTrait for Entity {
|
||||
type Model = Model;
|
||||
|
||||
type Column = Column;
|
||||
|
||||
type PrimaryKey = PrimaryKey;
|
||||
|
||||
type Relation = Relation;
|
||||
}
|
||||
|
||||
impl ColumnTrait for Column {
|
||||
type EntityName = Entity;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user