mirror of
https://github.com/amtoaer/bili-sync.git
synced 2026-09-06 16:07:26 +08:00
fix: 允许 page.image 为 None
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
||||||
#[sea_orm(table_name = "page")]
|
#[sea_orm(table_name = "page")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key)]
|
#[sea_orm(primary_key)]
|
||||||
@@ -12,7 +12,7 @@ pub struct Model {
|
|||||||
pub pid: i32,
|
pub pid: i32,
|
||||||
pub name: String,
|
pub name: String,
|
||||||
pub path: String,
|
pub path: String,
|
||||||
pub image: String,
|
pub image: Option<String>,
|
||||||
pub valid: bool,
|
pub valid: bool,
|
||||||
pub download_status: u32,
|
pub download_status: u32,
|
||||||
pub created_at: String,
|
pub created_at: String,
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
use sea_orm::entity::prelude::*;
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
||||||
#[sea_orm(table_name = "video")]
|
#[sea_orm(table_name = "video")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key)]
|
#[sea_orm(primary_key)]
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ impl MigrationTrait for Migration {
|
|||||||
.col(ColumnDef::new(Page::Pid).unsigned().not_null())
|
.col(ColumnDef::new(Page::Pid).unsigned().not_null())
|
||||||
.col(ColumnDef::new(Page::Name).string().not_null())
|
.col(ColumnDef::new(Page::Name).string().not_null())
|
||||||
.col(ColumnDef::new(Page::Path).string().not_null())
|
.col(ColumnDef::new(Page::Path).string().not_null())
|
||||||
.col(ColumnDef::new(Page::Image).string().not_null())
|
.col(ColumnDef::new(Page::Image).string())
|
||||||
.col(ColumnDef::new(Page::Valid).boolean().not_null())
|
.col(ColumnDef::new(Page::Valid).boolean().not_null())
|
||||||
.col(ColumnDef::new(Page::DownloadStatus).unsigned().not_null())
|
.col(ColumnDef::new(Page::DownloadStatus).unsigned().not_null())
|
||||||
.col(
|
.col(
|
||||||
|
|||||||
Reference in New Issue
Block a user