model and Dto

This commit is contained in:
mmrbnjd
2025-06-28 15:31:07 +03:30
parent 1f6ca5ee5f
commit c0b47129d4
38 changed files with 905 additions and 0 deletions

9
Common/Common.csproj Normal file
View File

@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Common.Dtos.Auth
{
public class AuthFromCompanySideDto
{
// username=wxper --- mobile=company
public string UserNameORMobile { get; set; }
public string PassWord { get; set; }
}
}

View File

@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Common.Dtos.Auth
{
public class AuthFromUserSideDto
{
public string? FullName { get; set; }
public string Mobile { get; set; }
}
}

View File

@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Common.Dtos.Company.CompanyContentInfo
{
public class ADD_CompanyContentInfoDto
{
public string Content { get; set; }
}
}

View File

@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Common.Dtos.Company.CompanyContentInfo
{
public class ReadANDUpdate_CompanyContentInfoDto
{
public int ID { get; set; }
public string Content { get; set; }
}
}

View File

@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Common.Dtos.Company
{
public class ReadANDUpdate_CompanyDto
{
public int ID { get; set; }
public string FullName { get; set; }
public string? FullNameManager { get; set; }
public string? WebSite { get; set; }
public string? Email { get; set; }
public byte[]? img { get; set; }
public bool Available { get; set; }
public bool allowBot { get; set; }
}
}

View File

@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Common.Dtos.Company
{
public class RegisterCompanyDto
{
public string Mobile { get; set; }
public string Password { get; set; }
public string FullName { get; set; }
}
}

View File

@@ -0,0 +1,11 @@

namespace Common.Dtos.Conversation
{
public class ADD_ConversationDto
{
public string Question { get; set; }
public int? GroupID { get; set; }
public int CompanyID { get; set; }
public int? ExperID { get; set; }
}
}

View File

@@ -0,0 +1,13 @@

namespace Common.Dtos.Conversation
{
public class ADD_ConversationItemDto
{
public int ConversationID { get; set; }
public string Text { get; set; }
public string? FileName { get; set; }
public string? FileType { get; set; }
public byte[]? FileContent { get; set; }
}
}

View File

@@ -0,0 +1,24 @@
using Common.Enums;
namespace Common.Dtos.Conversation
{
public class Read_ConversationDto
{
public int ID { get; set; }
public string Title { get; set; }
public ConversationStatus status { get; set; }
public int? GroupID { get; set; }
public string? GroupName { get; set; }
public int UserID { get; set; }
public string? UserFullName { get; set; }
public int? ExperID { get; set; }
public string? ExperFullName { get; set; }
public string Cdate { get; set; }
public string Ctime { get; set; }
public int NoReadCount { get; set; } = 0;
}
}

View File

@@ -0,0 +1,19 @@
using Common.Enums;
namespace Common.Dtos.Conversation
{
public class Read_ConversationItemDto
{
public int ID { get; set; }
public int ConversationID { get; set; }
public int? ExperID { get; set; }
public bool IsRead { get; set; } = false;
public string ExperName { get; set; }
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; }
}
}

View File

@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Common.Dtos.Exper
{
public class ADD_ExperDto
{
public string FullName { get; set; }
public string UserName { get; set; }
public string Password { get; set; }
}
}

View File

@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Common.Dtos.Exper
{
public class Update_ExperDto
{
public int ID { get; set; }
// For Update
public string FullName { get; set; }
}
}

View File

@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Common.Dtos.ExperGroup
{
public class ADD_ExperGroupDto
{
public int ExperID { get; set; }
public int GroupID { get; set; }
}
}

View File

@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Common.Dtos.ExperGroup
{
public class Read_ExperGroupDto
{
public int ExperID { get; set; }
public string ExperName { get; set; }
public int GroupID { get; set; }
public string GroupName { get; set; }
}
}

View File

@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Common.Dtos.Group
{
public class ADD_GroupDto
{
public string Name { get; set; }
public byte[]? img { get; set; }
public string? Info { get; set; }
public bool Available { get; set; } = true;
}
}

View File

@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Common.Dtos.Group
{
public class Read_GroupDto
{
public int ID { get; set; }
public string Name { get; set; }
public byte[]? img { get; set; }
public string? Info { get; set; }
public bool Available { get; set; }
}
}

View File

@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Common.Dtos
{
public class Read_UserDto
{
// CompanyUser OR Exper OR User
public int ID { get; set; }
public string? FullName { get; set; }
public string? UserName { get; set; }
public string? Mobile { get; set; }
}
}

View File

@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Common.Enums
{
public enum ConversationStatus
{
InProgress, Finished
}
}

View File

@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Common.Enums
{
public enum ConversationType
{
EU = 1, UE = 2
}
}