pub trait EntityName: IdenStatic + Default {
// Required method
fn table_name(&self) -> &'static str;
// Provided methods
fn schema_name(&self) -> Option<&str> { ... }
fn comment(&self) -> Option<&str> { ... }
fn table_ref(&self) -> TableRef { ... }
}Expand description
A Trait for mapping an Entity to a database table
Required Methods§
Sourcefn table_name(&self) -> &'static str
fn table_name(&self) -> &'static str
Get the name of the table
Provided Methods§
Sourcefn schema_name(&self) -> Option<&str>
fn schema_name(&self) -> Option<&str>
Method to get the name for the schema, defaults to Option::None if not set
Sourcefn comment(&self) -> Option<&str>
fn comment(&self) -> Option<&str>
Method to get the comment for the schema, defaults to Option::None if not set
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.
Implementors§
impl EntityName for sea_orm::rbac::entity::permission::Entity
Available on crate feature
rbac only.impl EntityName for sea_orm::rbac::entity::resource::Entity
Available on crate feature
rbac only.impl EntityName for sea_orm::rbac::entity::role::Entity
Available on crate feature
rbac only.impl EntityName for sea_orm::rbac::entity::role_hierarchy::Entity
Available on crate feature
rbac only.impl EntityName for sea_orm::rbac::entity::role_permission::Entity
Available on crate feature
rbac only.impl EntityName for sea_orm::rbac::entity::user_override::Entity
Available on crate feature
rbac only.impl EntityName for sea_orm::rbac::entity::user_role::Entity
Available on crate feature
rbac only.