modify entities according to NNBD models

Signed-off-by: Sahil Kumar <[email protected]>
This commit is contained in:
Sahil Kumar
2021-04-20 15:37:12 +05:30
parent 271dad7f0c
commit e3589a3030
8 changed files with 1323 additions and 1459 deletions
@@ -12,19 +12,19 @@ class Users extends Table {
TextColumn get role => text().nullable()();
/// Date of user creation
DateTimeColumn get createdAt => dateTime().nullable()();
DateTimeColumn get createdAt => dateTime().withDefault(currentDateAndTime)();
/// Date of last user update
DateTimeColumn get updatedAt => dateTime().nullable()();
DateTimeColumn get updatedAt => dateTime().withDefault(currentDateAndTime)();
/// Date of last user connection
DateTimeColumn get lastActive => dateTime().nullable()();
/// True if user is online
BoolColumn get online => boolean().nullable()();
BoolColumn get online => boolean().withDefault(const Constant(false))();
/// True if user is banned from the chat
BoolColumn get banned => boolean().nullable()();
BoolColumn get banned => boolean().withDefault(const Constant(false))();
/// Map of custom user extraData
TextColumn get extraData => text().nullable().map(MapConverter<Object>())();