use super::reference::ReferenceMeta;
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum RelationCardinality {
One,
Many,
}
pub trait Backref: 'static {
type From: crate::Model;
type To: crate::Model;
const NAME: &'static str;
const CARDINALITY: RelationCardinality;
fn meta() -> ReferenceMeta;
}
pub trait OneBackref: Backref {}
pub trait ManyBackref: Backref {}
pub trait ManyToMany: 'static {
type From: crate::Model;
type Through: crate::Model;
type To: crate::Model;
const NAME: &'static str;
fn from_through() -> ReferenceMeta;
fn through_to() -> ReferenceMeta;
}