-my @ATTRS = qw(uuid custom_data history icon_id);
-my %ATTRS = (
- # uuid => sub { generate_uuid(printable => 1) },
- # icon_id => sub { defined $_[1] ? icon($_[1]) : ICON_PASSWORD },
- custom_icon_uuid => [undef, coerce => \&to_uuid],
- foreground_color => ['', coerce => \&to_string],
- background_color => ['', coerce => \&to_string],
- override_url => ['', coerce => \&to_string],
- tags => ['', coerce => \&to_string],
- auto_type => [{}],
- previous_parent_group => [undef, coerce => \&to_uuid],
- quality_check => [true, coerce => \&to_bool],
- strings => [{}],
- binaries => [{}],
- times => [{}],
- # custom_data => {},
- # history => [],
-);
-my %ATTRS_TIMES = (
- last_modification_time => [sub { gmtime }, coerce => \&to_time],
- creation_time => [sub { gmtime }, coerce => \&to_time],
- last_access_time => [sub { gmtime }, coerce => \&to_time],
- expiry_time => [sub { gmtime }, coerce => \&to_time],
- expires => [false, coerce => \&to_bool],
- usage_count => [0, coerce => \&to_number],
- location_changed => [sub { gmtime }, coerce => \&to_time],
-);
+# has uuid => sub { generate_uuid(printable => 1) };
+has icon_id => ICON_PASSWORD, coerce => \&to_icon_constant;
+has custom_icon_uuid => undef, coerce => \&to_uuid;
+has foreground_color => '', coerce => \&to_string;
+has background_color => '', coerce => \&to_string;
+has override_url => '', coerce => \&to_string;
+has tags => '', coerce => \&to_string;
+has auto_type => {};
+has previous_parent_group => undef, coerce => \&to_uuid;
+has quality_check => true, coerce => \&to_bool;
+has strings => {};
+has binaries => {};
+has times => {};
+# has custom_data => {};
+# has history => [];
+
+has last_modification_time => sub { gmtime }, store => 'times', coerce => \&to_time;
+has creation_time => sub { gmtime }, store => 'times', coerce => \&to_time;
+has last_access_time => sub { gmtime }, store => 'times', coerce => \&to_time;
+has expiry_time => sub { gmtime }, store => 'times', coerce => \&to_time;
+has expires => false, store => 'times', coerce => \&to_bool;
+has usage_count => 0, store => 'times', coerce => \&to_number;
+has location_changed => sub { gmtime }, store => 'times', coerce => \&to_time;
+
+# has 'auto_type.auto_type_enabled' => true, coerce => \&to_bool;
+has 'auto_type_obfuscation' => 0, path => 'auto_type.data_transfer_obfuscation',
+ coerce => \&to_number;
+has 'auto_type_default_sequence' => '{USERNAME}{TAB}{PASSWORD}{ENTER}',
+ path => 'auto_type.default_sequence', coerce => \&to_string;
+has 'auto_type_associations' => [], path => 'auto_type.associations';
+