hopr_db_entity/codegen/sqlite/
network_peer.rs

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
//! `SeaORM` Entity, @generated by sea-orm-codegen 1.1.4

use sea_orm::entity::prelude::*;

#[derive(Clone, Debug, PartialEq, DeriveEntityModel)]
#[sea_orm(table_name = "network_peer")]
pub struct Model {
    #[sea_orm(primary_key)]
    pub id: i32,
    #[sea_orm(column_type = "Binary(32)", unique)]
    pub packet_key: Vec<u8>,
    pub multi_addresses: Json,
    pub origin: i8,
    pub version: Option<String>,
    pub last_seen: DateTimeUtc,
    pub last_seen_latency: i32,
    pub ignored: Option<DateTimeUtc>,
    pub public: bool,
    #[sea_orm(column_type = "Double")]
    pub quality: f64,
    #[sea_orm(column_type = "Binary(1)", nullable)]
    pub quality_sma: Option<Vec<u8>>,
    #[sea_orm(column_type = "Double", nullable)]
    pub backoff: Option<f64>,
    pub heartbeats_sent: Option<i32>,
    pub heartbeats_successful: Option<i32>,
}

#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {}

impl ActiveModelBehavior for ActiveModel {}