sway_groups_core/db/entities/setting.rs
1//! Generic key/value settings entity for DB-stored runtime flags.
2//!
3//! Used for global flags that need to be togglable at runtime (e.g.
4//! `show_hidden_workspaces`). The `active_group` per-output state stays on
5//! the `outputs` table.
6
7use sea_orm::entity::prelude::*;
8
9#[sea_orm::model]
10#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]
11#[sea_orm(table_name = "settings")]
12pub struct Model {
13 #[sea_orm(primary_key, auto_increment = false)]
14 pub key: String,
15 pub value: String,
16}
17
18impl ActiveModelBehavior for ActiveModel {}
19
20/// Key constant for the `show_hidden_workspaces` global flag.
21pub const SHOW_HIDDEN_WORKSPACES: &str = "show_hidden_workspaces";