Add created timestamps for tags

This commit is contained in:
Cameron Cordes
2021-10-11 21:32:17 -04:00
parent 9d925be84d
commit 2e5ac8861c
4 changed files with 16 additions and 3 deletions

View File

@@ -34,12 +34,14 @@ pub struct Favorite {
pub struct Tag {
pub id: i32,
pub name: String,
pub created_time: i64,
}
#[derive(Insertable, Clone, Debug)]
#[table_name = "tags"]
pub struct InsertTag {
pub name: String,
pub created_time: i64,
}
#[derive(Insertable, Clone, Debug)]
@@ -47,6 +49,7 @@ pub struct InsertTag {
pub struct InsertTaggedPhoto {
pub tag_id: i32,
pub photo_name: String,
pub created_time: i64,
}
#[derive(Queryable, Clone, Debug)]
@@ -54,4 +57,5 @@ pub struct TaggedPhoto {
pub id: i32,
pub photo_name: String,
pub tag_id: i32,
pub created_time: i64,
}

View File

@@ -11,6 +11,7 @@ table! {
id -> Integer,
photo_name -> Text,
tag_id -> Integer,
created_time -> BigInt,
}
}
@@ -18,6 +19,7 @@ table! {
tags (id) {
id -> Integer,
name -> Text,
created_time -> BigInt,
}
}