1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*use std::collections::HashMap;
use serde::{Deserialize, Serialize};
use utoipa::ToSchema;
#[derive(Clone, Debug, Serialize, Deserialize, ToSchema)]
pub struct PnrZone {
pub name: String,
pub records: HashMap<String, PnrRecord>,
#[schema(read_only)]
pub resolver_address: Option<String>,
#[schema(read_only)]
pub personal_address: Option<String>,
}
impl PnrZone {
pub fn new(name: String, records: HashMap<String, PnrRecord>, resolver_address: Option<String>, personal_address: Option<String>) -> Self {
Self { name, records, resolver_address, personal_address }
}
}
#[derive(Clone, Debug, Serialize, Deserialize, ToSchema)]
pub struct PnrRecord {
pub address: String,
pub record_type: PnrRecordType,
pub ttl: u64,
}
impl PnrRecord {
pub fn new(address: String, record_type: PnrRecordType, ttl: u64) -> Self {
Self { address, record_type, ttl }
}
}
#[derive(Clone, Debug, Serialize, Deserialize, ToSchema)]
pub enum PnrRecordType {
A, X
}*/