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
@@ -21,22 +21,22 @@ class Members extends Table {
DateTimeColumn get inviteRejectedAt => dateTime().nullable()();
/// True if the user has been invited to the channel
BoolColumn get invited => boolean().nullable()();
BoolColumn get invited => boolean().withDefault(const Constant(false))();
/// True if the member is banned from the channel
BoolColumn get banned => boolean().nullable()();
BoolColumn get banned => boolean().withDefault(const Constant(false))();
/// True if the member is shadow banned from the channel
BoolColumn get shadowBanned => boolean().nullable()();
BoolColumn get shadowBanned => boolean().withDefault(const Constant(false))();
/// True if the user is a moderator of the channel
BoolColumn get isModerator => boolean().nullable()();
BoolColumn get isModerator => boolean().withDefault(const Constant(false))();
/// The date of creation
DateTimeColumn get createdAt => dateTime()();
DateTimeColumn get createdAt => dateTime().withDefault(currentDateAndTime)();
/// The last date of update
DateTimeColumn get updatedAt => dateTime().nullable()();
DateTimeColumn get updatedAt => dateTime().withDefault(currentDateAndTime)();
@override
Set<Column> get primaryKey => {