fixe l'accès web au chat privé
This commit is contained in:
parent
371151ebde
commit
7d0625f44d
18 changed files with 2400 additions and 101 deletions
|
|
@ -12,7 +12,8 @@ using Yavsc.Models.OAuth;
|
|||
using Yavsc.Models.Workflow;
|
||||
using Yavsc.Models.Identity;
|
||||
using Yavsc.Models.Market;
|
||||
using Yavsc.Model;
|
||||
using Yavsc.Model;
|
||||
using Yavsc.Model.Chat;
|
||||
|
||||
namespace Yavsc.Models
|
||||
{
|
||||
|
|
@ -30,6 +31,7 @@ namespace Yavsc.Models
|
|||
builder.Entity<Blog>().Property(x=>x.Posted).HasDefaultValueSql("LOCALTIMESTAMP");
|
||||
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 );
|
||||
}
|
||||
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||
|
|
@ -184,6 +186,9 @@ namespace Yavsc.Models
|
|||
|
||||
public DbSet<Contact> Contacts { get; set; }
|
||||
|
||||
public DbSet<ClientProviderInfo> ClientProviderInfo { get; set; }
|
||||
public DbSet<ClientProviderInfo> ClientProviderInfo { get; set; }
|
||||
|
||||
public DbSet<Connection> Connections { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,20 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Newtonsoft.Json;
|
||||
using Yavsc.Models;
|
||||
|
||||
namespace Yavsc.Model.Chat
|
||||
{
|
||||
|
||||
public class Connection
|
||||
{
|
||||
public string ConnectionID { get; set; }
|
||||
[JsonIgnore]
|
||||
public string ApplicationUserId { get; set; }
|
||||
[ForeignKey("ApplicationUserId"),JsonIgnore]
|
||||
public virtual ApplicationUser Owner { get; set; }
|
||||
|
||||
[Key]
|
||||
public string ConnectionId { get; set; }
|
||||
public string UserAgent { get; set; }
|
||||
public bool Connected { get; set; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,7 +54,8 @@ namespace Yavsc.Models
|
|||
[InverseProperty("DeviceOwner")]
|
||||
public virtual List<GoogleCloudMobileDeclaration> Devices { get; set; }
|
||||
|
||||
public ICollection<Connection> Connections { get; set; }
|
||||
[InverseProperty("Owner")]
|
||||
public virtual List<Connection> Connections { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue