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

26 lines
669 B
C#
Raw Normal View History

2018-01-02 16:35:03 +01:00
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
2019-05-08 01:35:10 +01:00
using Yavsc.Abstract.Chat;
2018-01-02 16:35:03 +01:00
namespace Yavsc.Models.Chat
{
2019-05-08 01:35:10 +01:00
public class ChatRoom: IChatRoom<ChatRoomAccess>
2018-01-02 16:35:03 +01:00
{
public string Topic { get; set; }
[Key]
2019-05-08 01:35:10 +01:00
[StringLengthAttribute(Constants.MaxChanelName, MinimumLength=3)]
2018-01-02 16:35:03 +01:00
public string Name { get; set;}
2019-05-08 01:35:10 +01:00
public string OwnerId { get; set; }
2018-01-02 16:35:03 +01:00
2019-05-08 01:35:10 +01:00
[ForeignKey("OwnerId")]
2018-01-02 16:35:03 +01:00
public virtual ApplicationUser Owner { get; set; }
[InverseProperty("Room")]
2019-05-08 01:35:10 +01:00
public virtual List<ChatRoomAccess> Moderation { get; set; }
2018-01-02 16:35:03 +01:00
}
}