use super::schema::resources; use beteran_common_rust as bcr; /// #[derive(Eq, Hash, Identifiable, Queryable, PartialEq, Debug, Clone)] #[table_name = "resources"] pub struct Resource { /// pub id: uuid::Uuid, /// pub parent_id: Option, /// pub name: String, /// pub key: String, /// pub description: String, /// pub can_use: bool, /// pub created_at: i64, /// pub updated_at: i64, } /// #[derive(Insertable, Debug, Clone)] #[table_name = "resources"] pub struct NewResource { /// pub parent_id: Option, /// pub name: String, /// pub key: String, /// pub description: String, /// pub can_use: bool, } /// #[derive(AsChangeset, Debug, Clone)] #[table_name = "resources"] pub struct ModifyResource { /// pub parent_id: Option, /// pub name: String, /// pub key: String, /// pub description: String, /// pub can_use: bool, } /// #[derive(AsChangeset, Debug, Clone)] #[table_name = "resources"] pub struct ModifyResource4CanUse { /// pub can_use: bool, } /// #[derive(Debug, Clone)] pub struct FindAllSearch { /// pub parent_id: Option, /// pub name_like: Option, /// pub key_like: Option, /// pub description_like: Option, /// pub can_use: Option, } /// #[derive(Debug, Clone)] pub struct FindAll { /// pub search: Option, /// pub pagination: Option, /// pub sorts: Option>, }