fplus_lib/core/application/client.rs
1use super::file::Client;
2
3impl Client {
4 fn new(i: Client) -> Self {
5 Self { ..i }
6 }
7
8 fn validate(&self) -> bool {
9 let Client {
10 name,
11 region,
12 industry,
13 website,
14 social_media,
15 social_media_type,
16 role,
17 } = self;
18 name.len() > 0
19 && region.len() > 0
20 && industry.len() > 0
21 && website.len() > 0
22 && social_media.len() > 0
23 && social_media_type.len() > 0
24 && role.len() > 0
25 }
26}