Session constructor

Session({
  1. required String id,
  2. required User user,
  3. required String token,
  4. required DateTime expiresAt,
  5. String? ipAddress,
  6. String? userAgent,
  7. bool isCurrent = false,
  8. required DateTime createdAt,
})

Creates a new Session instance.

All parameters are required except ipAddress, userAgent, and isCurrent.

Implementation

Session({
  required this.id,
  required this.user,
  required this.token,
  required this.expiresAt,
  this.ipAddress,
  this.userAgent,
  this.isCurrent = false,
  required this.createdAt,
});