dropping GCM support
This commit is contained in:
@ -57,7 +57,7 @@ namespace Yavsc.Models
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[InverseProperty("DeviceOwner"),JsonIgnore]
|
||||
public virtual List<GoogleCloudMobileDeclaration> Devices { get; set; }
|
||||
public virtual List<DeviceDeclaration> DeviceDeclarations { get; set; }
|
||||
|
||||
[InverseProperty("Owner"),JsonIgnore]
|
||||
public virtual List<ChatConnection> Connections { get; set; }
|
||||
@ -101,5 +101,12 @@ namespace Yavsc.Models
|
||||
public virtual List<BlackListed> BlackList { get; set; }
|
||||
|
||||
public bool AllowMonthlyEmail { get; set; } = false;
|
||||
|
||||
[JsonIgnore][InverseProperty("Owner")]
|
||||
public virtual List<ChatRoom> Rooms { get; set; }
|
||||
|
||||
[JsonIgnore][InverseProperty("User")]
|
||||
public virtual List<ChatRoomAccess> RoomAccess { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Newtonsoft.Json;
|
||||
@ -7,10 +7,8 @@ namespace Yavsc.Models.Identity
|
||||
{
|
||||
[JsonObject]
|
||||
|
||||
public class GoogleCloudMobileDeclaration : IGCMDeclaration {
|
||||
public class DeviceDeclaration : IMobileDeviceDeclaration {
|
||||
|
||||
[Required]
|
||||
public string GCMRegistrationId { get; set; }
|
||||
|
||||
[Key,Required]
|
||||
public string DeviceId { get; set; }
|
@ -20,7 +20,6 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
@ -41,9 +40,6 @@ namespace Yavsc.Models.Chat
|
||||
|
||||
public bool Connected { get; set; }
|
||||
|
||||
[InverseProperty("ChatUserConnection")]
|
||||
public virtual List<ChatRoomPresence> Rooms { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -2,26 +2,25 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Yavsc.Abstract.Streaming;
|
||||
using Yavsc.Abstract.Chat;
|
||||
|
||||
namespace Yavsc.Models.Chat
|
||||
{
|
||||
public class ChatRoom: IChatRoom<ChatRoomPresence>
|
||||
public class ChatRoom: IChatRoom<ChatRoomAccess>
|
||||
{
|
||||
[StringLengthAttribute(1023,MinimumLength=1)]
|
||||
public string Topic { get; set; }
|
||||
|
||||
[Key]
|
||||
[StringLengthAttribute(255,MinimumLength=1)]
|
||||
[StringLengthAttribute(Constants.MaxChanelName, MinimumLength=3)]
|
||||
public string Name { get; set;}
|
||||
|
||||
public string ApplicationUserId { get; set; }
|
||||
public string OwnerId { get; set; }
|
||||
|
||||
[ForeignKey("ApplicationUserId")]
|
||||
[ForeignKey("OwnerId")]
|
||||
public virtual ApplicationUser Owner { get; set; }
|
||||
|
||||
[InverseProperty("Room")]
|
||||
public virtual List<ChatRoomPresence> UserList { get; set;}
|
||||
public virtual List<ChatRoomAccess> Moderation { get; set; }
|
||||
|
||||
}
|
||||
}
|
33
src/Yavsc.Server/Models/Chat/ChatRoomAccess.cs
Normal file
33
src/Yavsc.Server/Models/Chat/ChatRoomAccess.cs
Normal file
@ -0,0 +1,33 @@
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Yavsc.Abstract.Chat;
|
||||
|
||||
namespace Yavsc.Models.Chat
|
||||
{
|
||||
public class ChatRoomAccess: IChatRoomAccess
|
||||
{
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public string ChannelName { get; set; }
|
||||
[ForeignKey("ChannelName")]
|
||||
public virtual ChatRoom Room { get; set; }
|
||||
|
||||
[Required]
|
||||
public string UserId { get; set; }
|
||||
|
||||
public ChatRoomAccessLevel Level
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
|
||||
|
||||
[ForeignKey("UserId")]
|
||||
public virtual ApplicationUser User { get; set; }
|
||||
}
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Yavsc.Abstract.Streaming;
|
||||
|
||||
namespace Yavsc.Models.Chat
|
||||
{
|
||||
public class ChatRoomPresence: IChatRoomUsage
|
||||
{
|
||||
public string ChannelName { get; set; }
|
||||
[ForeignKey("ChannelName")]
|
||||
public virtual ChatRoom Room { get; set; }
|
||||
|
||||
public string ChatUserConnectionId { get; set; }
|
||||
|
||||
[ForeignKey("ChatUserConnectionId")]
|
||||
public virtual ChatConnection ChatUserConnection { get; set; }
|
||||
|
||||
public ChatRoomUsageLevel Level
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
}
|
||||
}
|
@ -17,7 +17,6 @@ namespace Yavsc.Server.Models.EMailing
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public DateTime DateModified
|
||||
{
|
||||
get;
|
||||
@ -44,12 +43,24 @@ namespace Yavsc.Server.Models.EMailing
|
||||
public virtual ApplicationUser Manager { get; set; }
|
||||
|
||||
public Periodicity ToSend { get; set; }
|
||||
|
||||
[Required]
|
||||
public string ManagerId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[Required]
|
||||
public string SuccessorId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ForeignKey("SuccessorId")]
|
||||
public virtual ApplicationUser Successor { get; set; }
|
||||
|
||||
public string UserCreated
|
||||
{
|
||||
get;
|
||||
|
@ -4,7 +4,7 @@ using Newtonsoft.Json;
|
||||
|
||||
namespace Yavsc.Models.Relationship
|
||||
{
|
||||
public class Contact
|
||||
public class Contact: IContact
|
||||
{
|
||||
[Required()]
|
||||
public string UserId { get; set; }
|
||||
@ -15,7 +15,10 @@ namespace Yavsc.Models.Relationship
|
||||
public string Name { get; set; }
|
||||
public string EMail { get; set; }
|
||||
|
||||
public PostalAddress PostalAddress { get; set; }
|
||||
public long AddressId { get ; set; }
|
||||
|
||||
[ForeignKey("AddressId")]
|
||||
public virtual PostalAddress PostalAddress { get; set; }
|
||||
|
||||
|
||||
[ForeignKeyAttribute("OwnerId"),NotMapped]
|
||||
|
@ -1,14 +1,21 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Yavsc.Models.Relationship
|
||||
{
|
||||
/// <summary>
|
||||
/// Well defined postal adress
|
||||
/// </summary>
|
||||
public class PostalAddress
|
||||
{
|
||||
public string Street1 { get; set; }
|
||||
public string Street2 { get; set; }
|
||||
public string PostalCode { get; set; }
|
||||
public string City { get; set; }
|
||||
public string State { get; set; }
|
||||
public string Province { get; set; }
|
||||
|
||||
|
||||
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id { get; set; }
|
||||
public string Street1 { get; set; }
|
||||
public string Street2 { get; set; }
|
||||
public string PostalCode { get; set; }
|
||||
public string City { get; set; }
|
||||
public string State { get; set; }
|
||||
public string Province { get; set; }
|
||||
public string Country { get; set; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user