fix: 允许 page.image 为 None
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
use sea_orm::entity::prelude::*;
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
||||
#[sea_orm(table_name = "page")]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key)]
|
||||
@@ -12,7 +12,7 @@ pub struct Model {
|
||||
pub pid: i32,
|
||||
pub name: String,
|
||||
pub path: String,
|
||||
pub image: String,
|
||||
pub image: Option<String>,
|
||||
pub valid: bool,
|
||||
pub download_status: u32,
|
||||
pub created_at: String,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
use sea_orm::entity::prelude::*;
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq, Default)]
|
||||
#[sea_orm(table_name = "video")]
|
||||
pub struct Model {
|
||||
#[sea_orm(primary_key)]
|
||||
|
||||
@@ -96,7 +96,7 @@ impl MigrationTrait for Migration {
|
||||
.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::Image).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(
|
||||
|
||||
Reference in New Issue
Block a user