mirror of
https://github.com/amtoaer/bili-sync.git
synced 2026-09-07 00:17:24 +08:00
chore: 添加实体文件定义(非最终)
This commit is contained in:
Generated
+2173
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,9 @@
|
|||||||
|
[package]
|
||||||
|
name = "entity"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2021"
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
sea-orm = { version = "0.12" }
|
||||||
|
serde = { version = "1.0.197", features = ["derive"] }
|
||||||
|
serde_json = "1.0"
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.15
|
||||||
|
|
||||||
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
|
#[sea_orm(table_name = "favorite")]
|
||||||
|
pub struct Model {
|
||||||
|
#[sea_orm(primary_key)]
|
||||||
|
pub id: i32,
|
||||||
|
#[sea_orm(unique)]
|
||||||
|
pub f_id: i32,
|
||||||
|
pub name: String,
|
||||||
|
pub path: String,
|
||||||
|
pub enabled: bool,
|
||||||
|
pub created_at: String,
|
||||||
|
pub updated_at: String,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
|
||||||
|
pub enum Relation {}
|
||||||
|
|
||||||
|
impl ActiveModelBehavior for ActiveModel {}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.15
|
||||||
|
|
||||||
|
pub mod prelude;
|
||||||
|
|
||||||
|
pub mod favorite;
|
||||||
|
pub mod page;
|
||||||
|
pub mod video;
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.15
|
||||||
|
|
||||||
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
|
#[sea_orm(table_name = "page")]
|
||||||
|
pub struct Model {
|
||||||
|
#[sea_orm(primary_key)]
|
||||||
|
pub id: i32,
|
||||||
|
pub video_id: i32,
|
||||||
|
pub cid: i32,
|
||||||
|
pub page: i32,
|
||||||
|
pub name: String,
|
||||||
|
pub path: String,
|
||||||
|
pub image: String,
|
||||||
|
pub valid: bool,
|
||||||
|
pub download_status: i32,
|
||||||
|
pub downloaded: bool,
|
||||||
|
pub created_at: String,
|
||||||
|
pub updated_at: String,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
|
||||||
|
pub enum Relation {}
|
||||||
|
|
||||||
|
impl ActiveModelBehavior for ActiveModel {}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.15
|
||||||
|
|
||||||
|
pub use super::favorite::Entity as Favorite;
|
||||||
|
pub use super::page::Entity as Page;
|
||||||
|
pub use super::video::Entity as Video;
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.12.15
|
||||||
|
|
||||||
|
use sea_orm::entity::prelude::*;
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
|
||||||
|
#[sea_orm(table_name = "video")]
|
||||||
|
pub struct Model {
|
||||||
|
#[sea_orm(primary_key)]
|
||||||
|
pub id: i32,
|
||||||
|
pub favorite_id: i32,
|
||||||
|
pub upper_id: i32,
|
||||||
|
pub name: String,
|
||||||
|
pub path: String,
|
||||||
|
pub category: String,
|
||||||
|
pub bvid: String,
|
||||||
|
pub intro: String,
|
||||||
|
pub cover: String,
|
||||||
|
pub ctime: String,
|
||||||
|
pub pubtime: String,
|
||||||
|
pub favtime: String,
|
||||||
|
pub downloaded: bool,
|
||||||
|
pub valid: bool,
|
||||||
|
pub tags: String,
|
||||||
|
pub single_page: bool,
|
||||||
|
pub created_at: String,
|
||||||
|
pub updated_at: String,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
|
||||||
|
pub enum Relation {}
|
||||||
|
|
||||||
|
impl ActiveModelBehavior for ActiveModel {}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
mod entities;
|
||||||
|
pub use entities::*;
|
||||||
Reference in New Issue
Block a user