mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-13 08:12:14 -06:00
feat: Add hive type adapters to api models, migrate to freezed
This commit is contained in:
18
lib/core/database/tables/user_credentials.dart
Normal file
18
lib/core/database/tables/user_credentials.dart
Normal file
@@ -0,0 +1,18 @@
|
||||
import 'package:hive/hive.dart';
|
||||
import 'package:paperless_mobile/core/config/hive/hive_config.dart';
|
||||
import 'package:paperless_mobile/features/login/model/client_certificate.dart';
|
||||
|
||||
part 'user_credentials.g.dart';
|
||||
|
||||
@HiveType(typeId: HiveTypeIds.userCredentials)
|
||||
class UserCredentials extends HiveObject {
|
||||
@HiveField(0)
|
||||
final String token;
|
||||
@HiveField(1)
|
||||
final ClientCertificate? clientCertificate;
|
||||
|
||||
UserCredentials({
|
||||
required this.token,
|
||||
this.clientCertificate,
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user