Added count to domian
This commit is contained in:
parent
d080ece9c1
commit
66ce2a6678
|
@ -2,7 +2,6 @@ use chrono::{DateTime, Utc};
|
|||
use serde::{Serialize, Deserialize};
|
||||
|
||||
|
||||
/// A unit of measurement to define a page load
|
||||
#[derive(Serialize, Deserialize, Default, Clone, PartialEq, Eq, PartialOrd, Ord)]
|
||||
pub struct Contact {
|
||||
pub id: i32,
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
use serde::{Serialize, Deserialize};
|
||||
|
||||
|
||||
/// Used to retrieve count(*) from the database. The reason there's a need for this is sqlx::query_as macro requires a struct, not a primitive.
|
||||
#[derive(Serialize, Deserialize, Default, Clone, PartialEq, Eq, PartialOrd, Ord)]
|
||||
pub struct Count {
|
||||
pub count: Option<i64>
|
||||
}
|
|
@ -11,4 +11,5 @@ pub mod project_type;
|
|||
pub mod unit;
|
||||
pub mod unit_type;
|
||||
pub mod visit;
|
||||
pub mod contact;
|
||||
pub mod contact;
|
||||
pub mod count;
|
Loading…
Reference in New Issue