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, }