...
This commit is contained in:
17
Presentation/HushianWebApp/Data/Dtos/ADDConversationDto.cs
Normal file
17
Presentation/HushianWebApp/Data/Dtos/ADDConversationDto.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using Hushian.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Hushian.Application.Dtos
|
||||
{
|
||||
public class ADDConversationDto
|
||||
{
|
||||
public string Question { get; set; }
|
||||
public int? GroupID { get; set; }
|
||||
public int? CompanyID { get; set; }
|
||||
public string? ExperID { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,21 @@
|
||||
using Hushian.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Hushian.Application.Dtos
|
||||
{
|
||||
public class ADDConversationItemDto
|
||||
{
|
||||
public int ConversationID { get; set; }
|
||||
//public string? ExperID { 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; }
|
||||
}
|
||||
|
||||
}
|
16
Presentation/HushianWebApp/Data/Dtos/ADDGroupDto.cs
Normal file
16
Presentation/HushianWebApp/Data/Dtos/ADDGroupDto.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Hushian.Application.Dtos
|
||||
{
|
||||
public class ADDGroupDto
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public byte[]? img { get; set; }
|
||||
public string? Info { get; set; }
|
||||
public bool Available { get; set; } = true;
|
||||
}
|
||||
}
|
11
Presentation/HushianWebApp/Data/Dtos/BaseDto.cs
Normal file
11
Presentation/HushianWebApp/Data/Dtos/BaseDto.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Common.Dtos
|
||||
{
|
||||
public class BaseDto
|
||||
{
|
||||
public int Id { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Hushian.Application.Dtos.Company
|
||||
{
|
||||
public class AddCompanyDto
|
||||
{
|
||||
public string Fullname { get; set; }
|
||||
public string Info { get; set; }
|
||||
// public string? UserIDManager { get; set; }
|
||||
public string? Phone { get; set; }
|
||||
public string? WebSite { get; set; }
|
||||
}
|
||||
}
|
21
Presentation/HushianWebApp/Data/Dtos/Company/CompanyDto.cs
Normal file
21
Presentation/HushianWebApp/Data/Dtos/Company/CompanyDto.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Hushian.Application.Dtos.Company
|
||||
{
|
||||
public class CompanyDto
|
||||
{
|
||||
public int ID { get; set; }
|
||||
public string Fullname { get; set; }
|
||||
public string Info { get; set; }
|
||||
public byte[]? img { get; set; }
|
||||
public string? Phone { get; set; }
|
||||
public string? WebSite { get; set; }
|
||||
public string? Email { get; set; }
|
||||
public bool Available { get; set; }
|
||||
public bool allowBot { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Hushian.Application.Dtos.Company
|
||||
{
|
||||
public class ContentInfoDto
|
||||
{
|
||||
public int ID { get; set; }
|
||||
public string Content { get; set; }
|
||||
}
|
||||
}
|
28
Presentation/HushianWebApp/Data/Dtos/ConversationDto.cs
Normal file
28
Presentation/HushianWebApp/Data/Dtos/ConversationDto.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using Hushian.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Hushian.Application.Dtos
|
||||
{
|
||||
public class 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 string UserID { get; set; }
|
||||
//
|
||||
public string? UserFullName { get; set; }
|
||||
public string? ExperID { get; set; }
|
||||
//
|
||||
public string? ExperFullName { get; set; }
|
||||
public string Cdate { get; set; }
|
||||
public string Ctime { get; set; }
|
||||
public int NoReadCount { get; set; } = 0;
|
||||
}
|
||||
}
|
23
Presentation/HushianWebApp/Data/Dtos/ConversationItemDto.cs
Normal file
23
Presentation/HushianWebApp/Data/Dtos/ConversationItemDto.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using Hushian.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Hushian.Application.Dtos
|
||||
{
|
||||
public class ConversationItemDto
|
||||
{
|
||||
public int ID { get; set; }
|
||||
public int ConversationID { get; set; }
|
||||
public string? 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; }
|
||||
}
|
||||
}
|
18
Presentation/HushianWebApp/Data/Dtos/GroupDto.cs
Normal file
18
Presentation/HushianWebApp/Data/Dtos/GroupDto.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Hushian.Application.Dtos
|
||||
{
|
||||
public class 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; }
|
||||
|
||||
}
|
||||
}
|
14
Presentation/HushianWebApp/Data/Dtos/IdName.cs
Normal file
14
Presentation/HushianWebApp/Data/Dtos/IdName.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Common.Dtos
|
||||
{
|
||||
public class IdName<T>
|
||||
{
|
||||
public T ID { get; set; }
|
||||
public string Title { get; set; }
|
||||
}
|
||||
}
|
22
Presentation/HushianWebApp/Data/Dtos/Identity/RoleDto.cs
Normal file
22
Presentation/HushianWebApp/Data/Dtos/Identity/RoleDto.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Common.Dtos.Identity
|
||||
{
|
||||
public class RoleDto
|
||||
{
|
||||
public RoleDto(string id, string name, string normalizedName)
|
||||
{
|
||||
Id = id;
|
||||
Name = name;
|
||||
NormalizedName = normalizedName;
|
||||
}
|
||||
|
||||
public string Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string NormalizedName { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,18 @@
|
||||
using Common.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Common.Dtos.Identity
|
||||
{
|
||||
public class VerificationDto
|
||||
{
|
||||
public string UserId { get; set; }
|
||||
public VerificationCodeType Type { get; set; }
|
||||
public string Code { get; set; }
|
||||
public string ToMobile { get; set; }
|
||||
public string? Token { get; set; }
|
||||
}
|
||||
}
|
22
Presentation/HushianWebApp/Data/Dtos/PagingDto.cs
Normal file
22
Presentation/HushianWebApp/Data/Dtos/PagingDto.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Common.Dtos
|
||||
{
|
||||
public class PagingDto<T>
|
||||
{
|
||||
public PagingDto(int RowCount, int pageCount, List<T> list)
|
||||
{
|
||||
this.RowCount = RowCount;
|
||||
this.list = list;
|
||||
PageCount = pageCount;
|
||||
|
||||
}
|
||||
public int RowCount { get; set; }
|
||||
public int PageCount { get; set; }
|
||||
public List<T> list { get; set; }
|
||||
}
|
||||
}
|
16
Presentation/HushianWebApp/Data/Dtos/RegistrationDto.cs
Normal file
16
Presentation/HushianWebApp/Data/Dtos/RegistrationDto.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using Hushian.Application.Dtos.Company;
|
||||
using Common.Dtos.User;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Hushian.Application.Dtos
|
||||
{
|
||||
public class RegistrationDto
|
||||
{
|
||||
public AddUserDto User { get; set; }
|
||||
public AddCompanyDto Company { get; set; }
|
||||
}
|
||||
}
|
21
Presentation/HushianWebApp/Data/Dtos/User/AddUserDto.cs
Normal file
21
Presentation/HushianWebApp/Data/Dtos/User/AddUserDto.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using Common.Enums.Identity;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Common.Dtos.User
|
||||
{
|
||||
public class AddUserDto
|
||||
{
|
||||
public string Id { get; set; } = Guid.NewGuid().ToString();
|
||||
public string UserName { get; set; }
|
||||
public string? DefultRoleID { get; set; }
|
||||
public string PassWord { get; set; }
|
||||
public string FullName { get; set; }
|
||||
public string? Email { get; set; }
|
||||
public string PhoneNumber { get; set; }
|
||||
public byte[]? img { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Common.Dtos.User
|
||||
{
|
||||
public class ChangeIsActieUserDto
|
||||
{
|
||||
public string UserName { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Common.Dtos.User
|
||||
{
|
||||
public class ChangePasswordDto
|
||||
{
|
||||
public string UserName { get; set; }
|
||||
public string NewPassword { get; set; }
|
||||
|
||||
}
|
||||
}
|
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Common.Dtos.User
|
||||
{
|
||||
public class ChangePasswordFromUserDto
|
||||
{
|
||||
public string UserName { get; set; }
|
||||
public string OldPassword { get; set; }
|
||||
public string NewPassword { get; set; }
|
||||
|
||||
}
|
||||
}
|
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Common.Dtos.User
|
||||
{
|
||||
public class ChangeRoleUserDto
|
||||
{
|
||||
public string UserName { get; set; }
|
||||
public string RoleID { get; set; }
|
||||
|
||||
}
|
||||
}
|
@@ -0,0 +1,17 @@
|
||||
using Common.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Common.Dtos.User
|
||||
{
|
||||
public class ConfirmedCodeDto
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string code { get; set; }
|
||||
public VerificationCodeType codeType { get; set; }
|
||||
public string? value { get; set; }
|
||||
}
|
||||
}
|
17
Presentation/HushianWebApp/Data/Dtos/User/EditUserDto.cs
Normal file
17
Presentation/HushianWebApp/Data/Dtos/User/EditUserDto.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Common.Dtos.User
|
||||
{
|
||||
public class EditUserDto
|
||||
{
|
||||
public string UserName { get; set; }
|
||||
public string FullName { get; set; }
|
||||
public string? Email { get; set; }
|
||||
public string? PhoneNumber { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Common.Dtos.User
|
||||
{
|
||||
public class EditUserFromUserDto
|
||||
{
|
||||
//key
|
||||
public string UserName { get; set; }
|
||||
public string? FullName { get; set; }
|
||||
public string? Email { get; set; }
|
||||
public byte[]? img { get; set; }
|
||||
}
|
||||
}
|
18
Presentation/HushianWebApp/Data/Dtos/User/ReadUserDto.cs
Normal file
18
Presentation/HushianWebApp/Data/Dtos/User/ReadUserDto.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Common.Dtos.User
|
||||
{
|
||||
public class ReadUserDto
|
||||
{
|
||||
public string UserName { get; set; }
|
||||
public string Role { get; set; } = "";
|
||||
public string FullName { get; set; }
|
||||
public string? Email { get; set; }
|
||||
public string? PhoneNumber { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
}
|
||||
}
|
14
Presentation/HushianWebApp/Data/Dtos/UserDto.cs
Normal file
14
Presentation/HushianWebApp/Data/Dtos/UserDto.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
|
||||
namespace Hushian.Application.Dtos
|
||||
{
|
||||
public class HushianUserDto
|
||||
{
|
||||
public string UserID { get; set; }
|
||||
public string UserName { get; set; }
|
||||
public string FullName { get; set; }
|
||||
public byte[]? img { get; set; }
|
||||
public bool Available { get; set; } = true;
|
||||
public string? Email { get; set; }
|
||||
public string PhoneNumber { get; set; }
|
||||
}
|
||||
}
|
15
Presentation/HushianWebApp/Data/Dtos/condinationDto.cs
Normal file
15
Presentation/HushianWebApp/Data/Dtos/condinationDto.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Common.Dtos
|
||||
{
|
||||
public class condination
|
||||
{
|
||||
public string PropName { get; set; }
|
||||
public string Operation { get; set; }
|
||||
public object? Value { get; set; }
|
||||
}
|
||||
}
|
13
Presentation/HushianWebApp/Data/Enums/ConversationStatus.cs
Normal file
13
Presentation/HushianWebApp/Data/Enums/ConversationStatus.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Hushian.Enums
|
||||
{
|
||||
public enum ConversationStatus
|
||||
{
|
||||
InProgress, Finished
|
||||
}
|
||||
}
|
13
Presentation/HushianWebApp/Data/Enums/ConversationType.cs
Normal file
13
Presentation/HushianWebApp/Data/Enums/ConversationType.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Hushian.Enums
|
||||
{
|
||||
public enum ConversationType
|
||||
{
|
||||
EU=1, UE=2
|
||||
}
|
||||
}
|
13
Presentation/HushianWebApp/Data/Enums/Identity/Cors.cs
Normal file
13
Presentation/HushianWebApp/Data/Enums/Identity/Cors.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Common.Enums.Identity
|
||||
{
|
||||
public enum Cors
|
||||
{
|
||||
MMRBNJD, Moadiran, Hushian
|
||||
}
|
||||
}
|
@@ -0,0 +1,10 @@
|
||||
namespace Common.Enums
|
||||
{
|
||||
public enum VerificationCodeType
|
||||
{
|
||||
PhoneNumberConfirmed,
|
||||
ForgetPassword,
|
||||
ChangeMobile,
|
||||
Login
|
||||
}
|
||||
}
|
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Common.Models.Identity
|
||||
{
|
||||
public class AuthRequest
|
||||
{
|
||||
public AuthRequest(string username, string password)
|
||||
{
|
||||
Username = username;
|
||||
Password = password;
|
||||
}
|
||||
|
||||
public string Username { get; set; }
|
||||
public string Password { get; set; }
|
||||
}
|
||||
public class AuthRequestFromMobile
|
||||
{
|
||||
public string Mobile { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Common.Models.Identity
|
||||
{
|
||||
public class AuthResponse
|
||||
{
|
||||
public string Id { get; set; }
|
||||
public string UserName { get; set; }
|
||||
public string Fullname { get; set; }
|
||||
public List <string>? Roles { get; set; }
|
||||
public string Token { get; set; }
|
||||
public byte[]? img { get; set; }
|
||||
}
|
||||
}
|
14
Presentation/HushianWebApp/Data/Models/ResponseBase.cs
Normal file
14
Presentation/HushianWebApp/Data/Models/ResponseBase.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Common.Models
|
||||
{
|
||||
public class ResponseBase<T>
|
||||
{
|
||||
public T? Value { get; set; }
|
||||
public bool Success { get; set; }=false;
|
||||
public List<string> Errors { get; set; }=new List<string>();
|
||||
|
||||
}
|
||||
}
|
8
Presentation/HushianWebApp/Data/Models/WindowSize.cs
Normal file
8
Presentation/HushianWebApp/Data/Models/WindowSize.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace HushianWebApp.Data.Models
|
||||
{
|
||||
public class WindowSize
|
||||
{
|
||||
public int Width { get; set; }
|
||||
public int Height { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Common.Models.ai.openAi
|
||||
{
|
||||
public class RequestModel
|
||||
{
|
||||
public string model { get; set; }
|
||||
public string question { get; set; }
|
||||
public string Context { get; set; }
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user