InventoryKind entity definition and Display impl

This commit is contained in:
YK 2025-09-20 10:59:52 +03:00
parent 8471deef8c
commit 2e742629dd

View File

@ -1,3 +1,5 @@
use std::fmt::Display;
use chrono::{ NaiveDate, NaiveDateTime };
use reactive_stores::Store;
@ -226,3 +228,19 @@ impl Name {
pub struct Settings {
}
#[derive(Clone, Debug, Store)]
pub enum InventoryKind {
Personal,
Common
}
impl Display for InventoryKind {
fn fmt (&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{}", match self {
Self::Personal => "Личный",
Self::Common => "Общий",
})
}
}