From 21213f1d184668ac3f3accae3de43533e1e15a89 Mon Sep 17 00:00:00 2001 From: amtoaer Date: Sun, 31 Mar 2024 13:51:15 +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/favorite.rs | 1 - entity/src/entities/page.rs | 2 +- migration/src/m20240322_000001_create_table.rs | 4 +--- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/entity/src/entities/favorite.rs b/entity/src/entities/favorite.rs index a4f12dc..d6e0666 100644 --- a/entity/src/entities/favorite.rs +++ b/entity/src/entities/favorite.rs @@ -11,7 +11,6 @@ pub struct Model { pub f_id: i32, pub name: String, pub path: String, - pub enabled: bool, pub created_at: String, } diff --git a/entity/src/entities/page.rs b/entity/src/entities/page.rs index 675b8d7..f8935a1 100644 --- a/entity/src/entities/page.rs +++ b/entity/src/entities/page.rs @@ -11,7 +11,7 @@ pub struct Model { pub cid: i32, pub pid: i32, pub name: String, - pub path: String, + pub path: Option, pub image: Option, pub download_status: u32, pub created_at: String, diff --git a/migration/src/m20240322_000001_create_table.rs b/migration/src/m20240322_000001_create_table.rs index 2a5eae0..5e18b5d 100644 --- a/migration/src/m20240322_000001_create_table.rs +++ b/migration/src/m20240322_000001_create_table.rs @@ -21,7 +21,6 @@ impl MigrationTrait for Migration { .col(ColumnDef::new(Favorite::FId).unique_key().unsigned().not_null()) .col(ColumnDef::new(Favorite::Name).string().not_null()) .col(ColumnDef::new(Favorite::Path).string().not_null()) - .col(ColumnDef::new(Favorite::Enabled).boolean().not_null()) .col( ColumnDef::new(Favorite::CreatedAt) .timestamp() @@ -85,7 +84,7 @@ impl MigrationTrait for Migration { .col(ColumnDef::new(Page::Cid).unsigned().not_null()) .col(ColumnDef::new(Page::Pid).unsigned().not_null()) .col(ColumnDef::new(Page::Name).string().not_null()) - .col(ColumnDef::new(Page::Path).string().not_null()) + .col(ColumnDef::new(Page::Path).string()) .col(ColumnDef::new(Page::Image).string()) .col(ColumnDef::new(Page::DownloadStatus).unsigned().not_null()) .col( @@ -139,7 +138,6 @@ enum Favorite { FId, Name, Path, - Enabled, CreatedAt, }