use super::create_meta::CreateMeta;
use super::{Load, Register};
use crate::stmt::{IntoExpr, IntoInsert, Path};
pub trait Model: Register + Load<Output = Self> + Sized {
type Query;
type Create: Default + IntoInsert<Model = Self> + IntoExpr<Self>;
type Update<'a>;
type UpdateQuery;
type Path<Origin>;
const CREATE_META: CreateMeta;
fn new_path<Origin>(path: Path<Origin, Self>) -> Self::Path<Origin>;
fn new_root_path() -> Self::Path<Self> {
Self::new_path(Path::root())
}
fn new_create() -> Self::Create {
Self::Create::default()
}
}