@@ -28,20 +28,23 @@ pub struct AdUnit {
28
28
/// Advertised URL
29
29
pub target_url : String ,
30
30
/// Number; minimum targeting score (optional)
31
+ #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
31
32
pub min_targeting_score : Option < f64 > ,
32
33
/// user address from the session
33
34
pub owner : ValidatorId ,
34
35
/// number, UTC timestamp in milliseconds, used as nonce for escaping duplicated spec ipfs hashes
35
36
#[ serde( with = "ts_milliseconds" ) ]
36
37
pub created : DateTime < Utc > ,
37
38
/// the name of the unit used in platform UI
39
+ #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
38
40
pub title : Option < String > ,
39
41
/// arbitrary text used in platform UI
42
+ #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
40
43
pub description : Option < String > ,
41
44
/// user can change it - used for filtering in platform UI
42
45
#[ serde( default ) ]
43
46
pub archived : bool ,
44
47
/// UTC timestamp in milliseconds, changed every time modifiable property is changed
45
- #[ serde( with = "ts_milliseconds_option" ) ]
48
+ #[ serde( default , with = "ts_milliseconds_option" , skip_serializing_if = "Option::is_none ") ]
46
49
pub modified : Option < DateTime < Utc > > ,
47
50
}
0 commit comments