a blog index
This commit is contained in:
parent
bc3e3099b6
commit
2666492a18
10 changed files with 47 additions and 45 deletions
|
|
@ -51,9 +51,11 @@ namespace Yavsc.Models
|
|||
builder.Entity<Contact>().HasKey(x => new { x.OwnerId, x.UserId });
|
||||
builder.Entity<DeviceDeclaration>().Property(x => x.DeclarationDate).HasDefaultValueSql("LOCALTIMESTAMP");
|
||||
builder.Entity<BlogTag>().HasKey(x => new { x.PostId, x.TagId });
|
||||
|
||||
builder.Entity<ApplicationUser>().HasMany<ChatConnection>(c => c.Connections);
|
||||
builder.Entity<ApplicationUser>().Property(u => u.Avatar).HasDefaultValue(Constants.DefaultAvatar);
|
||||
builder.Entity<ApplicationUser>().Property(u => u.DiskQuota).HasDefaultValue(Constants.DefaultFSQ);
|
||||
|
||||
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 });
|
||||
|
|
@ -78,6 +80,7 @@ namespace Yavsc.Models
|
|||
|
||||
builder.Entity<Activity>().Property(a=>a.ParentCode).IsRequired(false);
|
||||
builder.Entity<BlogPost>().HasOne(p => p.Author).WithMany(a => a.Posts);
|
||||
|
||||
}
|
||||
|
||||
// this is not a failback procedure.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue