@@ -26,17 +26,6 @@ pub struct CreateFileDTO<'a, 'b> {
2626 pub group_id : i32 ,
2727}
2828
29- // NOTE: you may find File is like SearchFile
30- // it is bcs IDK how to unify them
31- #[ derive( serde:: Deserialize ) ]
32- pub struct FileFilter {
33- pub id : Option < i32 > ,
34- pub type_ : Option < String > ,
35- pub path : Option < String > ,
36- pub reference_count : Option < i32 > ,
37- pub group_id : Option < i32 > ,
38- }
39-
4029#[ derive( serde:: Deserialize , Clone ) ]
4130pub enum FileCondition {
4231 Id ( i32 ) ,
@@ -89,6 +78,30 @@ pub struct UpdateFileDTO {
8978 pub group_id : Option < i32 > ,
9079}
9180
81+ // NOTE: you may find File is like SearchFile
82+ // it is bcs IDK how to unify them,
83+ // and it was used to select or update or delete
84+ #[ derive( serde:: Deserialize ) ]
85+ pub struct FileFilter {
86+ pub id : Option < i32 > ,
87+ pub type_ : Option < String > ,
88+ pub path : Option < String > ,
89+ pub reference_count : Option < i32 > ,
90+ pub group_id : Option < i32 > ,
91+ }
92+
93+ pub struct FileSet {
94+ pub path : Option < String > ,
95+ pub type_ : Option < String > ,
96+ pub reference_count : Option < i32 > ,
97+ pub group_id : Option < i32 > ,
98+ }
99+
100+ pub struct UpdateFile {
101+ pub set : FileSet ,
102+ pub filter : FileFilter ,
103+ }
104+
92105/** Group Related
93106*/
94107
@@ -187,7 +200,8 @@ pub struct UpdateGroupDTO {
187200}
188201
189202// NOTE: you may find File is like SearchFile
190- // it is bcs IDK how to unify them
203+ // it is bcs IDK how to unify them,
204+ // and it was used to select or update or delete
191205#[ derive( Deserialize ) ]
192206pub struct GroupFilter {
193207 pub id : Option < i32 > ,
0 commit comments