pub struct DbModel {Show 21 fields
pub id: Uuid,
pub name: String,
pub display_name: String,
pub description: Option<String>,
pub version: String,
pub model_type: String,
pub size_category: String,
pub file_size: i64,
pub provider: String,
pub license: Option<String>,
pub tags: Json<Vec<String>>,
pub languages: Json<Vec<String>>,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
pub file_path: Option<String>,
pub checksum: Option<String>,
pub download_url: Option<String>,
pub config: Json<HashMap<String, Value>>,
pub rating: Option<f32>,
pub download_count: i64,
pub is_official: bool,
}
Expand description
数据库模型表 - 对应 burncloud_service_models::Model
Fields§
§id: Uuid
§name: String
§display_name: String
§description: Option<String>
§version: String
§model_type: String
§size_category: String
§file_size: i64
§provider: String
§license: Option<String>
§languages: Json<Vec<String>>
§created_at: DateTime<Utc>
§updated_at: DateTime<Utc>
§file_path: Option<String>
§checksum: Option<String>
§download_url: Option<String>
§config: Json<HashMap<String, Value>>
§rating: Option<f32>
§download_count: i64
§is_official: bool
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DbModel
impl<'de> Deserialize<'de> for DbModel
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<Model> for DbModel
转换器:Service Models <-> Database Models
将 Service Model 转换为 Database Model
impl From<Model> for DbModel
转换器:Service Models <-> Database Models 将 Service Model 转换为 Database Model
Source§impl<'a, R: Row> FromRow<'a, R> for DbModelwhere
&'a str: ColumnIndex<R>,
Uuid: Decode<'a, R::Database> + Type<R::Database>,
String: Decode<'a, R::Database> + Type<R::Database>,
Option<String>: Decode<'a, R::Database> + Type<R::Database>,
i64: Decode<'a, R::Database> + Type<R::Database>,
Json<Vec<String>>: Decode<'a, R::Database> + Type<R::Database>,
DateTime<Utc>: Decode<'a, R::Database> + Type<R::Database>,
Json<HashMap<String, Value>>: Decode<'a, R::Database> + Type<R::Database>,
Option<f32>: Decode<'a, R::Database> + Type<R::Database>,
bool: Decode<'a, R::Database> + Type<R::Database>,
impl<'a, R: Row> FromRow<'a, R> for DbModelwhere
&'a str: ColumnIndex<R>,
Uuid: Decode<'a, R::Database> + Type<R::Database>,
String: Decode<'a, R::Database> + Type<R::Database>,
Option<String>: Decode<'a, R::Database> + Type<R::Database>,
i64: Decode<'a, R::Database> + Type<R::Database>,
Json<Vec<String>>: Decode<'a, R::Database> + Type<R::Database>,
DateTime<Utc>: Decode<'a, R::Database> + Type<R::Database>,
Json<HashMap<String, Value>>: Decode<'a, R::Database> + Type<R::Database>,
Option<f32>: Decode<'a, R::Database> + Type<R::Database>,
bool: Decode<'a, R::Database> + Type<R::Database>,
Auto Trait Implementations§
impl Freeze for DbModel
impl RefUnwindSafe for DbModel
impl Send for DbModel
impl Sync for DbModel
impl Unpin for DbModel
impl UnwindSafe for DbModel
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more