use sea_orm::entity::prelude::*; use time::OffsetDateTime; use uuid::Uuid; #[sea_orm::model] #[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)] #[sea_orm(table_name = "system_permissions")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub role_id: Uuid, #[sea_orm(primary_key, auto_increment = false)] pub permission: String, pub created_at: OffsetDateTime, #[sea_orm(belongs_to, from = "role_id", to = "id")] pub role: BelongsTo, } impl ActiveModelBehavior for ActiveModel {}