User class

Inheritance
Implemented types

Constructors

User({required int id, DateTime? fetchedAt, required String studentId, required String nameZh, String? nameEn, DateTime? dateOfBirth, String? programZh, String? programEn, String? departmentZh, String? departmentEn, required String avatarFilename, required String email, int? passwordExpiresInDays, DateTime? semestersFetchedAt})
const
User.fromJson(Map<String, dynamic> json, {ValueSerializer? serializer})
factory

Properties

avatarFilename String
Filename of the user's avatar image stored locally.
final
dateOfBirth DateTime?
Student's date of birth.
final
departmentEn String?
Department name in English (e.g., "Electronic Engineering").
final
departmentZh String?
Department name in Chinese (e.g., "電子工程系").
final
email String
User's email address.
final
fetchedAt DateTime?
Timestamp of when complete data was last fetched from the server.
final
hashCode int
The hash code for this object.
no setteroverride
id int
Auto-incrementing primary key.
final
nameEn String?
Student's name in English.
final
nameZh String
Student's name in Chinese.
final
passwordExpiresInDays int?
Number of days until the user's password expires.
final
programEn String?
Program name in English (e.g., "4-Year Undergraduate Program").
final
programZh String?
Program name in Chinese (e.g., "四技日間").
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
semestersFetchedAt DateTime?
When the semester list was last fetched from the course system.
final
studentId String
Unique student ID (學號).
final

Methods

copyWith({int? id, Value<DateTime?> fetchedAt = const Value.absent(), String? studentId, String? nameZh, Value<String?> nameEn = const Value.absent(), Value<DateTime?> dateOfBirth = const Value.absent(), Value<String?> programZh = const Value.absent(), Value<String?> programEn = const Value.absent(), Value<String?> departmentZh = const Value.absent(), Value<String?> departmentEn = const Value.absent(), String? avatarFilename, String? email, Value<int?> passwordExpiresInDays = const Value.absent(), Value<DateTime?> semestersFetchedAt = const Value.absent()}) User
copyWithCompanion(UsersCompanion data) User
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toColumns(bool nullToAbsent) Map<String, Expression<Object>>
Converts this object into a map of column names to expressions to insert or update.
override
toCompanion(bool nullToAbsent) UsersCompanion
toJson({ValueSerializer? serializer}) Map<String, dynamic>
Converts this object into a representation that can be encoded with json. The serializer can be used to configure how individual values will be encoded. By default, DriftRuntimeOptions.defaultSerializer will be used. See ValueSerializer.defaults for details.
override
toJsonString({ValueSerializer? serializer}) String
Converts this object into a json representation. The serializer can be used to configure how individual values will be encoded. By default, DriftRuntimeOptions.defaultSerializer will be used. See ValueSerializer.defaults for details.
inherited
toString() String
A string representation of this object.
override

Operators

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