Add flag for user logged in notifications
This commit is contained in:
parent
cd15080f29
commit
35bc2f97c3
|
|
@ -142,6 +142,7 @@ abstract class UserEntity extends Object
|
||||||
phoneVerified: false,
|
phoneVerified: false,
|
||||||
languageId: '',
|
languageId: '',
|
||||||
userCompany: userCompany,
|
userCompany: userCompany,
|
||||||
|
userLoggedInNotification: true,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -211,6 +212,9 @@ abstract class UserEntity extends Object
|
||||||
@BuiltValueField(wireName: 'language_id')
|
@BuiltValueField(wireName: 'language_id')
|
||||||
String get languageId;
|
String get languageId;
|
||||||
|
|
||||||
|
@BuiltValueField(wireName: 'user_logged_in_notification')
|
||||||
|
bool get userLoggedInNotification;
|
||||||
|
|
||||||
String get fullName => (firstName + ' ' + lastName).trim();
|
String get fullName => (firstName + ' ' + lastName).trim();
|
||||||
|
|
||||||
bool canEdit(BaseEntity entity) =>
|
bool canEdit(BaseEntity entity) =>
|
||||||
|
|
@ -342,7 +346,8 @@ abstract class UserEntity extends Object
|
||||||
..password = ''
|
..password = ''
|
||||||
..lastEmailAddress = ''
|
..lastEmailAddress = ''
|
||||||
..oauthUserToken = ''
|
..oauthUserToken = ''
|
||||||
..languageId = '';
|
..languageId = ''
|
||||||
|
..userLoggedInNotification = true;
|
||||||
|
|
||||||
static Serializer<UserEntity> get serializer => _$userEntitySerializer;
|
static Serializer<UserEntity> get serializer => _$userEntitySerializer;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -306,6 +306,9 @@ class _$UserEntitySerializer implements StructuredSerializer<UserEntity> {
|
||||||
'language_id',
|
'language_id',
|
||||||
serializers.serialize(object.languageId,
|
serializers.serialize(object.languageId,
|
||||||
specifiedType: const FullType(String)),
|
specifiedType: const FullType(String)),
|
||||||
|
'user_logged_in_notification',
|
||||||
|
serializers.serialize(object.userLoggedInNotification,
|
||||||
|
specifiedType: const FullType(bool)),
|
||||||
'created_at',
|
'created_at',
|
||||||
serializers.serialize(object.createdAt,
|
serializers.serialize(object.createdAt,
|
||||||
specifiedType: const FullType(int)),
|
specifiedType: const FullType(int)),
|
||||||
|
|
@ -447,6 +450,10 @@ class _$UserEntitySerializer implements StructuredSerializer<UserEntity> {
|
||||||
result.languageId = serializers.deserialize(value,
|
result.languageId = serializers.deserialize(value,
|
||||||
specifiedType: const FullType(String))! as String;
|
specifiedType: const FullType(String))! as String;
|
||||||
break;
|
break;
|
||||||
|
case 'user_logged_in_notification':
|
||||||
|
result.userLoggedInNotification = serializers.deserialize(value,
|
||||||
|
specifiedType: const FullType(bool))! as bool;
|
||||||
|
break;
|
||||||
case 'isChanged':
|
case 'isChanged':
|
||||||
result.isChanged = serializers.deserialize(value,
|
result.isChanged = serializers.deserialize(value,
|
||||||
specifiedType: const FullType(bool)) as bool?;
|
specifiedType: const FullType(bool)) as bool?;
|
||||||
|
|
@ -1022,6 +1029,8 @@ class _$UserEntity extends UserEntity {
|
||||||
@override
|
@override
|
||||||
final String languageId;
|
final String languageId;
|
||||||
@override
|
@override
|
||||||
|
final bool userLoggedInNotification;
|
||||||
|
@override
|
||||||
final bool? isChanged;
|
final bool? isChanged;
|
||||||
@override
|
@override
|
||||||
final int createdAt;
|
final int createdAt;
|
||||||
|
|
@ -1060,6 +1069,7 @@ class _$UserEntity extends UserEntity {
|
||||||
this.userCompany,
|
this.userCompany,
|
||||||
required this.oauthProvider,
|
required this.oauthProvider,
|
||||||
required this.languageId,
|
required this.languageId,
|
||||||
|
required this.userLoggedInNotification,
|
||||||
this.isChanged,
|
this.isChanged,
|
||||||
required this.createdAt,
|
required this.createdAt,
|
||||||
required this.updatedAt,
|
required this.updatedAt,
|
||||||
|
|
@ -1097,6 +1107,8 @@ class _$UserEntity extends UserEntity {
|
||||||
oauthProvider, r'UserEntity', 'oauthProvider');
|
oauthProvider, r'UserEntity', 'oauthProvider');
|
||||||
BuiltValueNullFieldError.checkNotNull(
|
BuiltValueNullFieldError.checkNotNull(
|
||||||
languageId, r'UserEntity', 'languageId');
|
languageId, r'UserEntity', 'languageId');
|
||||||
|
BuiltValueNullFieldError.checkNotNull(
|
||||||
|
userLoggedInNotification, r'UserEntity', 'userLoggedInNotification');
|
||||||
BuiltValueNullFieldError.checkNotNull(
|
BuiltValueNullFieldError.checkNotNull(
|
||||||
createdAt, r'UserEntity', 'createdAt');
|
createdAt, r'UserEntity', 'createdAt');
|
||||||
BuiltValueNullFieldError.checkNotNull(
|
BuiltValueNullFieldError.checkNotNull(
|
||||||
|
|
@ -1135,6 +1147,7 @@ class _$UserEntity extends UserEntity {
|
||||||
userCompany == other.userCompany &&
|
userCompany == other.userCompany &&
|
||||||
oauthProvider == other.oauthProvider &&
|
oauthProvider == other.oauthProvider &&
|
||||||
languageId == other.languageId &&
|
languageId == other.languageId &&
|
||||||
|
userLoggedInNotification == other.userLoggedInNotification &&
|
||||||
isChanged == other.isChanged &&
|
isChanged == other.isChanged &&
|
||||||
createdAt == other.createdAt &&
|
createdAt == other.createdAt &&
|
||||||
updatedAt == other.updatedAt &&
|
updatedAt == other.updatedAt &&
|
||||||
|
|
@ -1168,6 +1181,7 @@ class _$UserEntity extends UserEntity {
|
||||||
_$hash = $jc(_$hash, userCompany.hashCode);
|
_$hash = $jc(_$hash, userCompany.hashCode);
|
||||||
_$hash = $jc(_$hash, oauthProvider.hashCode);
|
_$hash = $jc(_$hash, oauthProvider.hashCode);
|
||||||
_$hash = $jc(_$hash, languageId.hashCode);
|
_$hash = $jc(_$hash, languageId.hashCode);
|
||||||
|
_$hash = $jc(_$hash, userLoggedInNotification.hashCode);
|
||||||
_$hash = $jc(_$hash, isChanged.hashCode);
|
_$hash = $jc(_$hash, isChanged.hashCode);
|
||||||
_$hash = $jc(_$hash, createdAt.hashCode);
|
_$hash = $jc(_$hash, createdAt.hashCode);
|
||||||
_$hash = $jc(_$hash, updatedAt.hashCode);
|
_$hash = $jc(_$hash, updatedAt.hashCode);
|
||||||
|
|
@ -1201,6 +1215,7 @@ class _$UserEntity extends UserEntity {
|
||||||
..add('userCompany', userCompany)
|
..add('userCompany', userCompany)
|
||||||
..add('oauthProvider', oauthProvider)
|
..add('oauthProvider', oauthProvider)
|
||||||
..add('languageId', languageId)
|
..add('languageId', languageId)
|
||||||
|
..add('userLoggedInNotification', userLoggedInNotification)
|
||||||
..add('isChanged', isChanged)
|
..add('isChanged', isChanged)
|
||||||
..add('createdAt', createdAt)
|
..add('createdAt', createdAt)
|
||||||
..add('updatedAt', updatedAt)
|
..add('updatedAt', updatedAt)
|
||||||
|
|
@ -1296,6 +1311,11 @@ class UserEntityBuilder implements Builder<UserEntity, UserEntityBuilder> {
|
||||||
String? get languageId => _$this._languageId;
|
String? get languageId => _$this._languageId;
|
||||||
set languageId(String? languageId) => _$this._languageId = languageId;
|
set languageId(String? languageId) => _$this._languageId = languageId;
|
||||||
|
|
||||||
|
bool? _userLoggedInNotification;
|
||||||
|
bool? get userLoggedInNotification => _$this._userLoggedInNotification;
|
||||||
|
set userLoggedInNotification(bool? userLoggedInNotification) =>
|
||||||
|
_$this._userLoggedInNotification = userLoggedInNotification;
|
||||||
|
|
||||||
bool? _isChanged;
|
bool? _isChanged;
|
||||||
bool? get isChanged => _$this._isChanged;
|
bool? get isChanged => _$this._isChanged;
|
||||||
set isChanged(bool? isChanged) => _$this._isChanged = isChanged;
|
set isChanged(bool? isChanged) => _$this._isChanged = isChanged;
|
||||||
|
|
@ -1355,6 +1375,7 @@ class UserEntityBuilder implements Builder<UserEntity, UserEntityBuilder> {
|
||||||
_userCompany = $v.userCompany?.toBuilder();
|
_userCompany = $v.userCompany?.toBuilder();
|
||||||
_oauthProvider = $v.oauthProvider;
|
_oauthProvider = $v.oauthProvider;
|
||||||
_languageId = $v.languageId;
|
_languageId = $v.languageId;
|
||||||
|
_userLoggedInNotification = $v.userLoggedInNotification;
|
||||||
_isChanged = $v.isChanged;
|
_isChanged = $v.isChanged;
|
||||||
_createdAt = $v.createdAt;
|
_createdAt = $v.createdAt;
|
||||||
_updatedAt = $v.updatedAt;
|
_updatedAt = $v.updatedAt;
|
||||||
|
|
@ -1414,6 +1435,7 @@ class UserEntityBuilder implements Builder<UserEntity, UserEntityBuilder> {
|
||||||
userCompany: _userCompany?.build(),
|
userCompany: _userCompany?.build(),
|
||||||
oauthProvider: BuiltValueNullFieldError.checkNotNull(oauthProvider, r'UserEntity', 'oauthProvider'),
|
oauthProvider: BuiltValueNullFieldError.checkNotNull(oauthProvider, r'UserEntity', 'oauthProvider'),
|
||||||
languageId: BuiltValueNullFieldError.checkNotNull(languageId, r'UserEntity', 'languageId'),
|
languageId: BuiltValueNullFieldError.checkNotNull(languageId, r'UserEntity', 'languageId'),
|
||||||
|
userLoggedInNotification: BuiltValueNullFieldError.checkNotNull(userLoggedInNotification, r'UserEntity', 'userLoggedInNotification'),
|
||||||
isChanged: isChanged,
|
isChanged: isChanged,
|
||||||
createdAt: BuiltValueNullFieldError.checkNotNull(createdAt, r'UserEntity', 'createdAt'),
|
createdAt: BuiltValueNullFieldError.checkNotNull(createdAt, r'UserEntity', 'createdAt'),
|
||||||
updatedAt: BuiltValueNullFieldError.checkNotNull(updatedAt, r'UserEntity', 'updatedAt'),
|
updatedAt: BuiltValueNullFieldError.checkNotNull(updatedAt, r'UserEntity', 'updatedAt'),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue