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

36 lines
1.0 KiB
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;
using Yavsc.Attributes.Validation;
8 years ago
namespace Yavsc.Models.Chat
{
12 months ago
public class ChatRoom: IChatRoom<ChatRoomAccess>, ITrackedEntity
8 years ago
{
public string Topic { get; set; }
[Key]
[YaStringLength(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
}
12 months ago
}