File tree Expand file tree Collapse file tree 4 files changed +13
-13
lines changed
Expand file tree Collapse file tree 4 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ public sealed class DeviceOnline
1010{
1111 public const string IndexName = "device-online" ;
1212
13- [ RedisIdField ] [ Indexed ] public required Guid Id { get ; set ; }
14- [ Indexed ] public required Guid Owner { get ; set ; }
13+ [ RedisIdField ] [ Indexed ( IndexEmptyAndMissing = false ) ] public required Guid Id { get ; set ; }
14+ [ Indexed ( IndexEmptyAndMissing = false ) ] public required Guid Owner { get ; set ; }
1515 [ JsonConverter ( typeof ( SemVersionJsonConverter ) ) ]
1616 public required SemVersion FirmwareVersion { get ; set ; }
1717 public required string Gateway { get ; set ; }
Original file line number Diff line number Diff line change @@ -5,6 +5,6 @@ namespace OpenShock.Common.Redis;
55[ Document ( StorageType = StorageType . Json , IndexName = "device-pair" ) ]
66public sealed class DevicePair
77{
8- [ RedisIdField ] [ Indexed ] public required Guid Id { get ; set ; }
9- [ Indexed ] public required string PairCode { get ; set ; }
8+ [ RedisIdField ] [ Indexed ( IndexEmptyAndMissing = false ) ] public required Guid Id { get ; set ; }
9+ [ Indexed ( IndexEmptyAndMissing = false ) ] public required string PairCode { get ; set ; }
1010}
Original file line number Diff line number Diff line change @@ -5,9 +5,9 @@ namespace OpenShock.Common.Redis;
55[ Document ( StorageType = StorageType . Json , IndexName = "lcg-online-v4" ) ]
66public sealed class LcgNode
77{
8- [ RedisIdField ] [ Indexed ] public required string Fqdn { get ; set ; }
9- [ Indexed ] public required string Country { get ; set ; }
10- [ Indexed ( Sortable = true ) ] public required byte Load { get ; set ; }
11- [ Indexed ] public string Environment { get ; set ; } = "Production" ;
8+ [ RedisIdField ] [ Indexed ( IndexEmptyAndMissing = false ) ] public required string Fqdn { get ; set ; }
9+ [ Indexed ( IndexEmptyAndMissing = false ) ] public required string Country { get ; set ; }
10+ [ Indexed ( Sortable = true , IndexEmptyAndMissing = false ) ] public required byte Load { get ; set ; }
11+ [ Indexed ( IndexEmptyAndMissing = false ) ] public string Environment { get ; set ; } = "Production" ;
1212
1313}
Original file line number Diff line number Diff line change @@ -7,11 +7,11 @@ namespace OpenShock.Common.Redis;
77[ Document ( StorageType = StorageType . Json , IndexName = "login-session-v2" ) ]
88public sealed class LoginSession
99{
10- [ RedisIdField ] [ Indexed ] public required string Id { get ; set ; }
11- [ Indexed ] public required Guid UserId { get ; set ; }
12- [ Indexed ] public required string Ip { get ; set ; }
13- [ Indexed ] public required string UserAgent { get ; set ; }
14- [ Indexed ] public Guid ? PublicId { get ; set ; }
10+ [ RedisIdField ] [ Indexed ( IndexEmptyAndMissing = false ) ] public required string Id { get ; set ; }
11+ [ Indexed ( IndexEmptyAndMissing = false ) ] public required Guid UserId { get ; set ; }
12+ [ Indexed ( IndexEmptyAndMissing = false ) ] public required string Ip { get ; set ; }
13+ [ Indexed ( IndexEmptyAndMissing = false ) ] public required string UserAgent { get ; set ; }
14+ [ Indexed ( IndexEmptyAndMissing = false ) ] public Guid ? PublicId { get ; set ; }
1515 [ JsonConverter ( typeof ( UnixMillisecondsDateTimeOffsetConverter ) ) ]
1616 public DateTimeOffset ? Created { get ; set ; }
1717 [ JsonConverter ( typeof ( UnixMillisecondsDateTimeOffsetConverter ) ) ]
You can’t perform that action at this time.
0 commit comments