Working auth and added shared notes
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
import '../global/utils.dart';
|
||||
|
||||
part 'token.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class Token {
|
||||
const Token({
|
||||
required this.userId,
|
||||
required this.familyId,
|
||||
required this.generatedAt,
|
||||
required this.expiresAt,
|
||||
});
|
||||
|
||||
final int familyId, userId;
|
||||
|
||||
@JsonKey(fromJson: dateFromJson, toJson: dateToJson)
|
||||
final DateTime generatedAt;
|
||||
|
||||
@JsonKey(fromJson: dateFromJson, toJson: dateToJson)
|
||||
final DateTime expiresAt;
|
||||
|
||||
factory Token.fromJson(Map<String, dynamic> json) => _$TokenFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$TokenToJson(this);
|
||||
}
|
||||
Reference in New Issue
Block a user