This commit is contained in:
2024-10-13 17:04:47 +08:00
commit 2183073421
96 changed files with 7949 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LMS.Repository.DTO
{
public class CollectionResponse<T>
{
public int Current { get; set; }
public int Total { get; set; }
public List<T> Collection { get; set; } = new List<T>();
}
}
+14
View File
@@ -0,0 +1,14 @@
using LMS.Repository.DTO.UserDto;
using LMS.Repository.Models.DB;
namespace LMS.Repository.DTO
{
public class MachineDetailDto : Machine
{
public UserBaseDto? CreatedUser { get; set; }
public UserBaseDto? UpdatedUser { get; set; }
public UserBaseDto? OwnUser { get; set; }
}
}
+30
View File
@@ -0,0 +1,30 @@
using static LMS.Common.Enums.MachineEnum;
namespace LMS.Repository.DTO.MachineResponse
{
public class MachineDto
{
public class MachineStatusResponse
{
/// <summary>
/// 机器状态
/// </summary>
public MachineStatus Status { get; set; }
/// <summary>
/// 到期时间
/// </summary>
public DateTime? DeactivationTime { get; set; }
/// <summary>
/// 机器码ID
/// </summary>
public string Id { get; set; }
/// <summary>
/// 机器码
/// </summary>
public string MachineId { get; set; }
}
}
}
+21
View File
@@ -0,0 +1,21 @@
using LMS.Repository.DTO.UserDto;
namespace LMS.Repository.DTO
{
public class RoleDto
{
public long Id { get; set; }
public string Name { get; set; } = string.Empty;
public UserBaseDto? CreatedUser { get; set; }
public UserBaseDto? UpdeatedUser { get; set; }
public DateTime CreatedTime { get; set; }
public DateTime UpdatedTime { get; set; }
public string Remark { get; set; } = string.Empty;
}
}
+10
View File
@@ -0,0 +1,10 @@
namespace LMS.Repository.DTO;
public class SoftwareDao
{
public string Version { get; set; }
public string Author { get; set; }
public string Description { get; set; }
}
@@ -0,0 +1,44 @@
namespace LMS.Repository.DTO.UserDto;
public class UserAgentInfoDto
{
/// <summary>
/// 用户ID
/// </summary>
public long UserId { get; set; }
/// <summary>
/// 用户名称
/// </summary>
public string UserName { get; set; }
/// <summary>
/// 用户昵称
/// </summary>
public string NickName { get; set; }
/// <summary>
/// 用户的邀请码
/// </summary>
public string AffiliateCode { get; set; }
/// <summary>
/// 用户的代理分成比例
/// </summary>
public double AgentPercent { get; set; }
/// <summary>
/// 邀请人数
/// </summary>
public int AffiliateNumber { get; set; }
/// <summary>
/// 邀请的VIP人数
/// </summary>
public int AffiliateVIPNumber { get; set; }
/// <summary>
/// 邀请获取的金额
/// </summary>
public double AffiliateMoney { get; set; }
}
+18
View File
@@ -0,0 +1,18 @@
using LMS.Repository.User;
namespace LMS.Repository.DTO.UserDto;
public class UserBaseDto
{
public long Id { get; set; }
public string NickName { get; set; } = string.Empty;
public string UserName { get; set; } = string.Empty;
public string Email { get; set; } = string.Empty;
public string PhoneNumber { get; set; } = string.Empty;
public string Avatar { get; set; } = string.Empty;
}
@@ -0,0 +1,17 @@
namespace LMS.Repository.DTO.UserDto
{
public class UserCollectionDto : UserBaseDto
{
public List<string> RoleNames { get; set; } = [];
public DateTime CreatedDate { get; set; }
public DateTime LastLoginDate { get; set; }
public long ParentId { get; set; }
public string LastLoginIp { get; set; } = string.Empty;
public string LastLoginDevice { get; set; } = string.Empty;
}
}
+40
View File
@@ -0,0 +1,40 @@
using LMS.Repository.User;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text.Json;
namespace LMS.Repository.DTO.UserDto
{
public class UserDto : UserBaseDto
{
public List<string> RoleNames { get; set; } = [];
/// <summary>
/// 允许使用的机器码数量
/// </summary>
public long AllDeviceCount { get; set; } = 1;
/// <summary>
/// 代理分成比例
/// </summary>
public double AgentPercent { get; set; } = 0.00;
/// <summary>
/// 免费修改机器码次数
/// </summary>
public long FreeCount { get; set; } = 0;
public DateTime CreatedDate { get; set; }
/// <summary>
/// 邀请码
/// </summary>
public string AffiliateCode { get; set; } = string.Empty;
public long ParentId { get; set; }
/// <summary>
/// 放一些操作信息 不能频繁的修改数据库,使用的json格式存放
/// </summary>
public UserPrivateOptions Options { get; set; } = new UserPrivateOptions();
}
}