yavsc/src/Yavsc.Server/Models/Chat/ChatRoom.cs
2019-05-08 01:57:18 +01:00

26 lines
No EOL
669 B
C#

using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Abstract.Chat;
namespace Yavsc.Models.Chat
{
public class ChatRoom: IChatRoom<ChatRoomAccess>
{
public string Topic { get; set; }
[Key]
[StringLengthAttribute(Constants.MaxChanelName, MinimumLength=3)]
public string Name { get; set;}
public string OwnerId { get; set; }
[ForeignKey("OwnerId")]
public virtual ApplicationUser Owner { get; set; }
[InverseProperty("Room")]
public virtual List<ChatRoomAccess> Moderation { get; set; }
}
}