49 lines
891 B
Rust
49 lines
891 B
Rust
use serde::{Deserialize, Serialize};
|
|
|
|
use crate::domains::common::*;
|
|
|
|
#[derive(Debug, Serialize, Deserialize)]
|
|
pub struct Strategy {
|
|
pub name: String,
|
|
}
|
|
|
|
impl DomainModel for Strategy {
|
|
fn kind() -> DomainModelKind {
|
|
DomainModelKind::MitigateStrategy
|
|
}
|
|
|
|
fn name(&self) -> &str {
|
|
self.name.as_str()
|
|
}
|
|
}
|
|
|
|
#[derive(Debug, Serialize, Deserialize)]
|
|
pub struct Platform {
|
|
pub name: String,
|
|
}
|
|
|
|
impl DomainModel for Platform {
|
|
fn kind() -> DomainModelKind {
|
|
DomainModelKind::MitigatePlatform
|
|
}
|
|
|
|
fn name(&self) -> &str {
|
|
self.name.as_str()
|
|
}
|
|
}
|
|
|
|
#[derive(Debug, Serialize, Deserialize)]
|
|
pub struct Configuration {
|
|
pub name: String,
|
|
}
|
|
|
|
impl DomainModel for Configuration {
|
|
fn kind() -> DomainModelKind {
|
|
DomainModelKind::MitigateConfiguration
|
|
}
|
|
|
|
fn name(&self) -> &str {
|
|
self.name.as_str()
|
|
}
|
|
}
|