oss_api/vo/oss_obj.rs
1use serde::Serialize;
2use serde_with::skip_serializing_none;
3use utoipa::ToSchema;
4
5#[skip_serializing_none] // 忽略空字段(好像必须放在#[derive(o2o, Serialize)]的上方才能起效)
6#[derive(ToSchema, Debug, Serialize, Clone)]
7#[serde(rename_all = "camelCase")]
8pub struct OssObjVo {
9 /// ID
10 pub id: String,
11 /// 文件路径
12 pub path: String,
13 /// 文件Hash
14 pub hash: String,
15 /// 文件大小
16 pub size: String,
17 /// 访问URL地址
18 pub url: String,
19 /// 是否完成
20 pub is_completed: bool,
21 /// 创建者ID
22 pub creator_id: String,
23 /// 创建时间戳
24 pub create_timestamp: String,
25 /// 更新者ID
26 pub updator_id: String,
27 /// 更新时间戳
28 pub update_timestamp: String,
29}