UserModel class

Model app table 'users'

Annotations

Constructors

UserModel({required int? id, required String name, required String email, required String password, required UserRole role})
UserModel.create({required String name, required String email, required String password, UserRole role = UserRole.user})
UserModel.fromJson(Map<String, dynamic> json)
factory

Properties

email String
final
hashCode int
The hash code for this object.
no setterinherited
id int?
final
isNew bool
no setter
name String
final
password String
final
role UserRole
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

copy([Map<String, dynamic>? json]) UserModel
generateCookieSecret(String token, DateTime createAt) String
generateToken() String
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toCompanion() UsersCompanion
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited