model and Dto
This commit is contained in:
41
Hushian.Domain/Entites/Company.cs
Normal file
41
Hushian.Domain/Entites/Company.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
using Hushian.Domain.Abstracts;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Hushian.Domain.Entites
|
||||
{
|
||||
public class Company : BaseEntity
|
||||
{
|
||||
#region Key
|
||||
public int ID { get; set; }
|
||||
#endregion
|
||||
|
||||
#region Fild
|
||||
public DateTime Cdatetime
|
||||
{ get; set; } = DateTime.Now;
|
||||
public string Password { get; set; }
|
||||
public string FullName { get; set; }
|
||||
public string? FullNameManager { get; set; }
|
||||
public string Mobile { get; set; }
|
||||
public string? WebSite { get; set; }
|
||||
public string? Email { get; set; }
|
||||
public byte[]? img { get; set; }
|
||||
public bool Available { get; set; } = true;
|
||||
public bool allowBot { get; set; } = true;
|
||||
#endregion
|
||||
|
||||
#region Navigation
|
||||
public ICollection<Group> Groups { get; set; }
|
||||
= new List<Group>();
|
||||
public ICollection<Exper> Expers { get; set; }
|
||||
= new List<Exper>();
|
||||
public ICollection<Conversation> Conversations { get; set; }
|
||||
= new List<Conversation>();
|
||||
public ICollection<CompanyContentInfo> CompanyContentInfos { get; set; }
|
||||
= new List<CompanyContentInfo>();
|
||||
#endregion
|
||||
}
|
||||
}
|
29
Hushian.Domain/Entites/CompanyContentInfo.cs
Normal file
29
Hushian.Domain/Entites/CompanyContentInfo.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using Hushian.Domain.Abstracts;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Hushian.Domain.Entites
|
||||
{
|
||||
public class CompanyContentInfo : BaseEntity
|
||||
{
|
||||
#region Key
|
||||
public int ID { get; set; }
|
||||
public int CompanyID { get; set; }
|
||||
#endregion
|
||||
|
||||
#region Fild
|
||||
public string Content { get; set; }
|
||||
public DateTime Cdatetime
|
||||
{ get; set; } = DateTime.Now;
|
||||
#endregion
|
||||
|
||||
#region Navigation
|
||||
[ForeignKey("CompanyID")]
|
||||
public Company company { get; set; }
|
||||
#endregion
|
||||
}
|
||||
}
|
40
Hushian.Domain/Entites/Conversation.cs
Normal file
40
Hushian.Domain/Entites/Conversation.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
using Common.Enums;
|
||||
using Hushian.Domain.Abstracts;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Hushian.Domain.Entites
|
||||
{
|
||||
public class Conversation : BaseEntity
|
||||
{
|
||||
#region Key
|
||||
public int ID { get; set; }
|
||||
public int CompanyID { get; set; }
|
||||
public int UserID { get; set; }
|
||||
public int? GroupID { get; set; }
|
||||
#endregion
|
||||
|
||||
#region Fild
|
||||
public string Title { get; set; }
|
||||
public ConversationStatus Status { get; set; }
|
||||
public DateTime? FinishedDateTime { get; set; }
|
||||
public DateTime Cdatetime
|
||||
{ get; set; } = DateTime.Now;
|
||||
#endregion
|
||||
|
||||
#region Navigation
|
||||
[ForeignKey("CompanyID")]
|
||||
public Company Company { get; set; }
|
||||
[ForeignKey("UserID")]
|
||||
public User User { get; set; }
|
||||
[ForeignKey("GroupID")]
|
||||
public Group? Group { get; set; }
|
||||
public ICollection<ConversationItem> conversationItems { get; set; }
|
||||
= new List<ConversationItem>();
|
||||
#endregion
|
||||
}
|
||||
}
|
41
Hushian.Domain/Entites/ConversationItem.cs
Normal file
41
Hushian.Domain/Entites/ConversationItem.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
using Common.Enums;
|
||||
using Hushian.Domain.Abstracts;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Hushian.Domain.Entites
|
||||
{
|
||||
public class ConversationItem : BaseEntity
|
||||
{
|
||||
#region Key
|
||||
public int ID { get; set; }
|
||||
public int ConversationID { get; set; }
|
||||
public string? ExperID { get; set; }
|
||||
#endregion
|
||||
|
||||
#region Fild
|
||||
public bool IsRead { get; set; } = false;
|
||||
public ConversationType Type { get; set; }
|
||||
public string Text { get; set; }
|
||||
public string? FileName { get; set; }
|
||||
public string? FileType { get; set; }
|
||||
public byte[]? FileContent { get; set; }
|
||||
public DateTime? ReadDateTime { get; set; }
|
||||
public DateTime Cdatetime
|
||||
{ get; set; } = DateTime.Now;
|
||||
#endregion
|
||||
|
||||
#region Navigation
|
||||
[ForeignKey("ConversationID")]
|
||||
public Conversation conversation { get; set; }
|
||||
|
||||
[ForeignKey("ExperID")]
|
||||
public Exper? Exper { get; set; }
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
35
Hushian.Domain/Entites/Exper.cs
Normal file
35
Hushian.Domain/Entites/Exper.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using Hushian.Domain.Abstracts;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Hushian.Domain.Entites
|
||||
{
|
||||
public class Exper : BaseEntity
|
||||
{
|
||||
#region Key
|
||||
public int ID { get; set; }
|
||||
public int CompanyID { get; set; }
|
||||
#endregion
|
||||
|
||||
#region Fild
|
||||
public DateTime Cdatetime
|
||||
{ get; set; } = DateTime.Now;
|
||||
|
||||
public string FullName { get; set; }
|
||||
public string UserName { get; set; }
|
||||
public string Password { get; set; }
|
||||
public bool Available { get; set; } = true;
|
||||
#endregion
|
||||
|
||||
#region Navigation
|
||||
[ForeignKey("CompanyID")]
|
||||
public Company Company { get; set; }
|
||||
public ICollection<ExperGroup> EG { get; set; }
|
||||
= new List<ExperGroup>();
|
||||
#endregion
|
||||
}
|
||||
}
|
30
Hushian.Domain/Entites/ExperGroup.cs
Normal file
30
Hushian.Domain/Entites/ExperGroup.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using Hushian.Domain.Abstracts;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Hushian.Domain.Entites
|
||||
{
|
||||
public class ExperGroup
|
||||
{
|
||||
#region Key
|
||||
public int ExperID { get; set; }
|
||||
public int GroupID { get; set; }
|
||||
#endregion
|
||||
|
||||
#region Fild
|
||||
public DateTime Cdatetime
|
||||
{ get; set; } = DateTime.Now;
|
||||
#endregion
|
||||
|
||||
#region Navigation
|
||||
[ForeignKey("ExperID")]
|
||||
public Exper Exper { get; set; }
|
||||
[ForeignKey("GroupID")]
|
||||
public Group Group { get; set; }
|
||||
#endregion
|
||||
}
|
||||
}
|
31
Hushian.Domain/Entites/Group.cs
Normal file
31
Hushian.Domain/Entites/Group.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using Hushian.Domain.Abstracts;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Hushian.Domain.Entites
|
||||
{
|
||||
public class Group:BaseEntity
|
||||
{
|
||||
#region Key
|
||||
public int ID { get; set; }
|
||||
public int CompanyID { get; set; }
|
||||
#endregion
|
||||
|
||||
#region Fild
|
||||
public DateTime Cdatetime
|
||||
{ get; set; } = DateTime.Now;
|
||||
public string Name { get; set; }
|
||||
#endregion
|
||||
|
||||
#region Navigation
|
||||
[ForeignKey("CompanyID")]
|
||||
public Company Company { get; set; }
|
||||
public ICollection<ExperGroup> EG { get; set; }
|
||||
= new List<ExperGroup>();
|
||||
#endregion
|
||||
}
|
||||
}
|
28
Hushian.Domain/Entites/User.cs
Normal file
28
Hushian.Domain/Entites/User.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using Hushian.Domain.Abstracts;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Hushian.Domain.Entites
|
||||
{
|
||||
public class User:BaseEntity
|
||||
{
|
||||
#region Key
|
||||
public int ID { get; set; }
|
||||
#endregion
|
||||
|
||||
#region Fild
|
||||
public DateTime Cdatetime
|
||||
{ get; set; } = DateTime.Now;
|
||||
public string? FullName { get; set; }
|
||||
public string Mobile { get; set; }
|
||||
#endregion
|
||||
|
||||
#region Navigation
|
||||
public ICollection<Conversation> Conversations { get; set; }
|
||||
= new List<Conversation>();
|
||||
#endregion
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user