-use crate::{newtypes::PersonId, schema::person_aggregates};
-use diesel::{result::Error, *};
-use serde::{Deserialize, Serialize};
-
-#[derive(
- Queryable, Associations, Identifiable, PartialEq, Debug, Serialize, Deserialize, Clone,
-)]
-#[table_name = "person_aggregates"]
-pub struct PersonAggregates {
- pub id: i32,
- pub person_id: PersonId,
- pub post_count: i64,
- pub post_score: i64,
- pub comment_count: i64,
- pub comment_score: i64,
-}
+use crate::{
+ aggregates::structs::PersonAggregates,
+ newtypes::PersonId,
+ schema::person_aggregates,
+ utils::{get_conn, DbPool},
+};
+use diesel::{result::Error, ExpressionMethods, QueryDsl};
+use diesel_async::RunQueryDsl;