Add created timestamps for tags
This commit is contained in:
@@ -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,
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user