pub trait Model: Sized {
const TABLE: &'static str;
const PK: &'static str;
const SOFT_DELETE_FIELD: Option<&'static str> = None;
}Expand description
Model trait 定义了模型的基本元数据
Required Associated Constants§
Provided Associated Constants§
Sourceconst SOFT_DELETE_FIELD: Option<&'static str> = None
const SOFT_DELETE_FIELD: Option<&'static str> = None
逻辑删除字段名(可选),如果为 Some,则使用逻辑删除
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.