durable_db/entity/
sea_orm_active_enums.rs1use sea_orm::entity::prelude::*;
4use serde::{Deserialize, Serialize};
5
6#[derive(
7 Debug,
8 Clone,
9 PartialEq,
10 Eq,
11 EnumIter,
12 DeriveActiveEnum,
13 Serialize,
14 Deserialize,
15 strum :: Display,
16 strum :: EnumString,
17)]
18#[sea_orm(rs_type = "String", db_type = "Enum", enum_name = "task_status")]
19#[strum(serialize_all = "SCREAMING_SNAKE_CASE")]
20pub enum TaskStatus {
21 #[sea_orm(string_value = "PENDING")]
22 Pending,
23 #[sea_orm(string_value = "RUNNING")]
24 Running,
25 #[sea_orm(string_value = "COMPLETED")]
26 Completed,
27 #[sea_orm(string_value = "FAILED")]
28 Failed,
29 #[sea_orm(string_value = "PAUSED")]
30 Paused,
31 #[sea_orm(string_value = "CANCELLED")]
32 Cancelled,
33}