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