yavsc/src/Yavsc.Server/Models/Chat/ChatRoom.cs

26 lines
669 B
C#

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