From 937ae2c1574cdbe07cc736b77d5b5fecc1d4b3ff Mon Sep 17 00:00:00 2001 From: amtoaer Date: Sun, 31 Mar 2024 00:41:31 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E7=A7=BB=E9=99=A4=E3=80=81=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E4=B8=80=E4=BA=9B=E6=95=B0=E6=8D=AE=E5=BA=93=E5=AD=97?= =?UTF-8?q?=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entity/src/entities/page.rs | 1 - entity/src/entities/video.rs | 2 +- migration/src/m20240322_000001_create_table.rs | 6 ++---- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/entity/src/entities/page.rs b/entity/src/entities/page.rs index 9a2813b..675b8d7 100644 --- a/entity/src/entities/page.rs +++ b/entity/src/entities/page.rs @@ -13,7 +13,6 @@ pub struct Model { pub name: String, pub path: String, pub image: Option, - pub valid: bool, pub download_status: u32, pub created_at: String, } diff --git a/entity/src/entities/video.rs b/entity/src/entities/video.rs index 28ae2d5..3b9d57b 100644 --- a/entity/src/entities/video.rs +++ b/entity/src/entities/video.rs @@ -20,7 +20,7 @@ pub struct Model { pub ctime: DateTime, pub pubtime: DateTime, pub favtime: DateTime, - pub handled: bool, + pub download_status: u32, pub valid: bool, pub tags: Option, pub single_page: Option, diff --git a/migration/src/m20240322_000001_create_table.rs b/migration/src/m20240322_000001_create_table.rs index 49caf8f..2a5eae0 100644 --- a/migration/src/m20240322_000001_create_table.rs +++ b/migration/src/m20240322_000001_create_table.rs @@ -56,7 +56,7 @@ impl MigrationTrait for Migration { .col(ColumnDef::new(Video::Ctime).timestamp().not_null()) .col(ColumnDef::new(Video::Pubtime).timestamp().not_null()) .col(ColumnDef::new(Video::Favtime).timestamp().not_null()) - .col(ColumnDef::new(Video::Handled).boolean().default(false).not_null()) + .col(ColumnDef::new(Video::DownloadStatus).unsigned().not_null()) .col(ColumnDef::new(Video::Valid).boolean().not_null()) .col(ColumnDef::new(Video::Tags).json_binary()) .col(ColumnDef::new(Video::SinglePage).boolean()) @@ -87,7 +87,6 @@ impl MigrationTrait for Migration { .col(ColumnDef::new(Page::Name).string().not_null()) .col(ColumnDef::new(Page::Path).string().not_null()) .col(ColumnDef::new(Page::Image).string()) - .col(ColumnDef::new(Page::Valid).boolean().not_null()) .col(ColumnDef::new(Page::DownloadStatus).unsigned().not_null()) .col( ColumnDef::new(Page::CreatedAt) @@ -161,7 +160,7 @@ enum Video { Ctime, Pubtime, Favtime, - Handled, + DownloadStatus, Valid, Tags, SinglePage, @@ -178,7 +177,6 @@ enum Page { Name, Path, Image, - Valid, DownloadStatus, CreatedAt, }