diff options
author | 杨宇千 <crupest@outlook.com> | 2019-10-19 21:37:15 +0800 |
---|---|---|
committer | 杨宇千 <crupest@outlook.com> | 2019-10-19 21:37:15 +0800 |
commit | 7bcf891d9d68ac0f12570b94938347ab8eec3247 (patch) | |
tree | e6168234660307247111ee369a0b2123823614eb /Timeline/Entities | |
parent | a268999b8c975588c01b345829edfc0099af6f93 (diff) | |
download | timeline-7bcf891d9d68ac0f12570b94938347ab8eec3247.tar.gz timeline-7bcf891d9d68ac0f12570b94938347ab8eec3247.tar.bz2 timeline-7bcf891d9d68ac0f12570b94938347ab8eec3247.zip |
...
Diffstat (limited to 'Timeline/Entities')
-rw-r--r-- | Timeline/Entities/DatabaseContext.cs | 10 | ||||
-rw-r--r-- | Timeline/Entities/UserAvatar.cs | 6 | ||||
-rw-r--r-- | Timeline/Entities/UserDetail.cs | 10 |
3 files changed, 13 insertions, 13 deletions
diff --git a/Timeline/Entities/DatabaseContext.cs b/Timeline/Entities/DatabaseContext.cs index d9815660..550db216 100644 --- a/Timeline/Entities/DatabaseContext.cs +++ b/Timeline/Entities/DatabaseContext.cs @@ -17,20 +17,20 @@ namespace Timeline.Entities public long Id { get; set; }
[Column("name"), MaxLength(26), Required]
- public string Name { get; set; }
+ public string Name { get; set; } = default!;
[Column("password"), Required]
- public string EncryptedPassword { get; set; }
+ public string EncryptedPassword { get; set; } = default!;
[Column("roles"), Required]
- public string RoleString { get; set; }
+ public string RoleString { get; set; } = default!;
[Column("version"), Required]
public long Version { get; set; }
- public UserAvatar Avatar { get; set; }
+ public UserAvatar? Avatar { get; set; }
- public UserDetailEntity Detail { get; set; }
+ public UserDetailEntity? Detail { get; set; }
}
public class DatabaseContext : DbContext
diff --git a/Timeline/Entities/UserAvatar.cs b/Timeline/Entities/UserAvatar.cs index d549aea5..d47bb28b 100644 --- a/Timeline/Entities/UserAvatar.cs +++ b/Timeline/Entities/UserAvatar.cs @@ -11,13 +11,13 @@ namespace Timeline.Entities public long Id { get; set; }
[Column("data")]
- public byte[] Data { get; set; }
+ public byte[]? Data { get; set; }
[Column("type")]
- public string Type { get; set; }
+ public string? Type { get; set; }
[Column("etag"), MaxLength(30)]
- public string ETag { get; set; }
+ public string? ETag { get; set; }
[Column("last_modified"), Required]
public DateTime LastModified { get; set; }
diff --git a/Timeline/Entities/UserDetail.cs b/Timeline/Entities/UserDetail.cs index bc14dbe6..e02d15c4 100644 --- a/Timeline/Entities/UserDetail.cs +++ b/Timeline/Entities/UserDetail.cs @@ -10,19 +10,19 @@ namespace Timeline.Entities public long Id { get; set; }
[Column("nickname"), MaxLength(15)]
- public string Nickname { get; set; }
+ public string? Nickname { get; set; }
[Column("qq"), MaxLength(15)]
- public string QQ { get; set; }
+ public string? QQ { get; set; }
[Column("email"), MaxLength(50)]
- public string Email { get; set; }
+ public string? Email { get; set; }
[Column("phone_number"), MaxLength(15)]
- public string PhoneNumber { get; set; }
+ public string? PhoneNumber { get; set; }
[Column("description")]
- public string Description { get; set; }
+ public string? Description { get; set; }
public long UserId { get; set; }
}
|