bindizr_core/model/zone.rs
1use chrono::{DateTime, Utc};
2use sqlx::FromRow;
3
4// Structure for basic creation of SOA records and basic creation of NS records
5#[derive(Debug, PartialEq, Eq, Clone, FromRow)]
6pub struct Zone {
7 pub id: i32,
8 pub name: String, // zone name (e.g.: "example.com")
9 pub primary_ns: String, // primary name server (e.g.: "ns1.example.com")
10 pub admin_email: String, // admin email (e.g.: "admin.example.com")
11 pub ttl: i32, // default TTL (seconds)
12 pub serial: i32, // serial number (SOA record)
13 pub refresh: i32, // refresh period (seconds)
14 pub retry: i32, // retry period (seconds)
15 pub expire: i32, // expire period (seconds)
16 pub minimum_ttl: i32, // minimum TTL (seconds)
17 pub created_at: DateTime<Utc>,
18}