configs/
events.rs

1use schema_loader::{asset_notification_bg_schema, color_schema, webp_url_schema};
2use schemars::JsonSchema;
3
4use serde::{Deserialize, Serialize};
5use tsify_next::Tsify;
6
7#[derive(
8    Clone, Debug, Serialize, Deserialize, PartialEq, Eq, Tsify, JsonSchema, i18n::Translate,
9)]
10pub struct EventDescription {
11    #[schemars(title = "Название эвента")]
12    pub name: String,
13    #[schemars(title = "Описание эвента")]
14    #[translate]
15    pub description: i18n::I18nString,
16    #[schemars(title = "Цвет эвента", schema_with = "color_schema")]
17    pub color: String,
18    #[schemars(title = "URL картинки", schema_with = "webp_url_schema")]
19    pub icon_url: String,
20    #[schemars(title = "URL фона(ленты)", schema_with = "webp_url_schema")]
21    pub bg_url: String,
22    #[schemars(title = "Фон (лента)", schema_with = "asset_notification_bg_schema")]
23    pub bg_path: String,
24    #[schemars(title = "URL текста", schema_with = "webp_url_schema")]
25    pub text_url: String,
26    #[schemars(title = "URL эффекта", schema_with = "webp_url_schema")]
27    pub effect_url: String,
28    #[schemars(title = "Время жизни эвента в миллисекундах")]
29    pub ttl_milliseconds: u64,
30}