Skip to content

Commit 95bc173

Browse files
committed
docs: update User model description
- Removed `isAdmin` flag mention - Added `role` property mention
1 parent fe2238f commit 95bc173

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ This package provides the following core data models:
2727
* **`Category`**: Represents a news category with an ID, name, and optional description and icon URL.
2828
* **`Source`**: Represents a news source, including ID, name, description, URL, language, optional headquarters (`Country`), and a `SourceType` enum (e.g., `newsAgency`, `blog`).
2929
* **`Country`**: Represents a country with an ID, ISO code, name, and flag URL.
30-
* **`User`**: Represents an authenticated user within the system, including an `isAdmin` flag.
30+
* **`User`**: Represents a user within the system, including their assigned `role`.
3131
* **`PaginatedResponse<T>`**: A generic class for handling paginated API responses, containing a list of items (`items`), a `cursor` for the next page, and a `hasMore` flag.
3232
* **`AuthSuccessResponse`**: Represents the successful result of an authentication operation, typically containing the authenticated user details and an access token.
3333
* **`SuccessApiResponse<T>`**: A generic wrapper for successful API responses, containing the main `data` payload (of type `T`) and optional `ResponseMetadata`.

lib/src/models/user.dart

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,10 @@ import 'package:json_annotation/json_annotation.dart';
33

44
part 'user.g.dart';
55

6-
/// Represents an authenticated user within the system.
6+
/// Represents a user within the system.
77
///
88
/// This model holds basic information about the user, including their
9-
/// unique identifier, email (if available), and whether they are
10-
/// authenticated anonymously. It also includes an [isAdmin] flag
11-
/// to indicate administrative privileges.
9+
/// unique identifier, email (if available), and their assigned [role].
1210
@JsonSerializable()
1311
class User extends Equatable {
1412
/// Creates a new [User] instance.

0 commit comments

Comments
 (0)