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

34 lines
1007 B
C#

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