초기 커밋
This commit is contained in:
22
lib/features/auth/domain/entities/user.dart
Normal file
22
lib/features/auth/domain/entities/user.dart
Normal file
@@ -0,0 +1,22 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
import '../../../../shared/models/user_role.dart';
|
||||
|
||||
part 'user.freezed.dart';
|
||||
part 'user.g.dart';
|
||||
|
||||
@freezed
|
||||
class User with _$User {
|
||||
const factory User({
|
||||
required String id,
|
||||
required String email,
|
||||
required String name,
|
||||
@Default(UserRole.user) UserRole role,
|
||||
String? avatarUrl,
|
||||
DateTime? createdAt,
|
||||
DateTime? lastLoginAt,
|
||||
@Default(true) bool isActive,
|
||||
}) = _User;
|
||||
|
||||
factory User.fromJson(Map<String, dynamic> json) => _$UserFromJson(json);
|
||||
}
|
||||
Reference in New Issue
Block a user