default avatar
This commit is contained in:
parent
c7e3f3af47
commit
be1d75ce73
35 changed files with 1626 additions and 15 deletions
|
|
@ -37,10 +37,12 @@ namespace Yavsc.Models
|
|||
builder.Entity<GoogleCloudMobileDeclaration>().Property(x=>x.DeclarationDate).HasDefaultValueSql("LOCALTIMESTAMP");
|
||||
builder.Entity<PostTag>().HasKey(x=>new { x.PostId, x.TagId});
|
||||
builder.Entity<ApplicationUser>().HasMany<Connection>( c=>c.Connections );
|
||||
builder.Entity<ApplicationUser>().Property(u=>u.Avatar).HasDefaultValue(Constants.DefaultAvatar);
|
||||
builder.Entity<UserActivity>().HasKey(u=> new { u.DoesCode, u.UserId});
|
||||
builder.Entity<Instrumentation>().HasKey(u=> new { u.InstrumentId, u.UserId});
|
||||
builder.Entity<CircleAuthorizationToBlogPost>().HasKey(a=> new { a.CircleId, a.BlogPostId});
|
||||
builder.Entity<CircleMember>().HasKey(c=> new { MemberId = c.MemberId, CircleId = c.CircleId });
|
||||
|
||||
foreach (var et in builder.Model.GetEntityTypes()) {
|
||||
if (et.ClrType.GetInterface("IBaseTrackedEntity")!=null)
|
||||
et.FindProperty("DateCreated").IsReadOnlyAfterSave = true;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ namespace Yavsc.Models
|
|||
/// <see>Startup.UserFilesOptions</see>
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[MaxLength(512)]
|
||||
[MaxLength(512),Required]
|
||||
public string Avatar { get; set; }
|
||||
|
||||
[MaxLength(512)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue