EntityName

Trait EntityName 

Source
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§

Source

fn table_name(&self) -> &'static str

Get the name of the table

Provided Methods§

Source

fn schema_name(&self) -> Option<&str>

Method to get the name for the schema, defaults to Option::None if not set

Source

fn comment(&self) -> Option<&str>

Method to get the comment for the schema, defaults to Option::None if not set

Source

fn table_ref(&self) -> TableRef

Get the TableRef from invoking the self.schema_name()

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§

Source§

impl EntityName for sea_orm::rbac::entity::permission::Entity

Available on crate feature rbac only.
Source§

impl EntityName for sea_orm::rbac::entity::resource::Entity

Available on crate feature rbac only.
Source§

impl EntityName for sea_orm::rbac::entity::role::Entity

Available on crate feature rbac only.
Source§

impl EntityName for sea_orm::rbac::entity::role_hierarchy::Entity

Available on crate feature rbac only.
Source§

impl EntityName for sea_orm::rbac::entity::role_permission::Entity

Available on crate feature rbac only.
Source§

impl EntityName for sea_orm::rbac::entity::user_override::Entity

Available on crate feature rbac only.
Source§

impl EntityName for sea_orm::rbac::entity::user_role::Entity

Available on crate feature rbac only.