mod belongsto;
pub use belongsto::BelongsTo;
mod hasmany;
pub use hasmany::HasMany;
mod hasone;
pub use hasone::HasOne;
mod manual;
pub use manual::ManualRelationship;
pub trait Relationship<SELF, R>: Clone + PartialEq + Send {
fn their_key(&self) -> String;
fn my_key(&self) -> String;
}
pub trait RelationshipCompare<T, R>
where
Self: Relationship<T, R>,
{
fn is_related(&self, source: &T, other: &R) -> bool;
}
pub trait HasRelations {
type Relation: Default;
}
pub trait RelationAdder {}
pub trait HasJoinTableForeignkey<T> {
fn fk_column() -> &'static str;
}