diff --git a/src/migrations/m20240322_000002_add_likes_shares.rs b/src/migrations/m20240322_000002_add_likes_shares.rs index 4a53522..24311ea 100644 --- a/src/migrations/m20240322_000002_add_likes_shares.rs +++ b/src/migrations/m20240322_000002_add_likes_shares.rs @@ -19,6 +19,7 @@ impl MigrationTrait for Migration { ) .col(ColumnDef::new(Likes::Actor).string().not_null()) .col(ColumnDef::new(Likes::Likes).string().not_null()) + .col(ColumnDef::new(Likes::Date).date_time().not_null()) .to_owned() ) .await?; @@ -64,6 +65,7 @@ enum Likes { Id, Actor, Likes, + Date, } #[derive(DeriveIden)] diff --git a/src/model/like.rs b/src/model/like.rs index 6b35512..2922857 100644 --- a/src/model/like.rs +++ b/src/model/like.rs @@ -7,6 +7,7 @@ pub struct Model { pub id: i64, pub actor: String, pub likes: String, + pub date: ChronoDateTimeUtc, } #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] diff --git a/src/model/share.rs b/src/model/share.rs index 797a981..405d176 100644 --- a/src/model/share.rs +++ b/src/model/share.rs @@ -7,7 +7,7 @@ pub struct Model { pub id: i64, pub actor: String, pub shares: String, - pub date: ChronoDateTime, + pub date: ChronoDateTimeUtc, } #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]