modify entities according to NNBD models
Signed-off-by: Sahil Kumar <[email protected]>
This commit is contained in:
@@ -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>())();
|
||||
|
||||
Reference in New Issue
Block a user