添加dto模式的demo测试

This commit is contained in:
chenchun
2023-01-01 23:51:05 +08:00
parent b9384afd5d
commit 5d7d115910
55 changed files with 582 additions and 98 deletions

View File

@@ -0,0 +1,39 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Framework.DTOModel.Base.Vo
{
public class ArticleVo
{
public long Id { get; set; }
public string Title { get; set; }
public string Content { get; set; }
public long? UserId { get; set; }
public long? CreateUser { get; set; }
public DateTime? CreateTime { get; set; }
public long? ModifyUser { get; set; }
public DateTime? ModifyTime { get; set; }
public bool? IsDeleted { get; set; }
public long? TenantId { get; set; }
public int? OrderNum { get; set; }
public string Remark { get; set; }
public List<string> Images { get; set; }
public int? AgreeNum { get; set; }
public UserVo User { get; set; }
}
}

View File

@@ -0,0 +1,61 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Framework.DTOModel.Base.Vo
{
public class CommentVo
{
public long Id { get; set; }
/// <summary>
/// 评论内容
///</summary>
public string Content { get; set; }
/// <summary>
/// 点赞数
///</summary>
public int? AgreeNum { get; set; }
/// <summary>
/// 创建时间
///</summary>
public DateTime? CreateTime { get; set; }
/// <summary>
/// 是否删除
///</summary>
public bool? IsDeleted { get; set; }
/// <summary>
/// 租户Id
///</summary>
public long? TenantId { get; set; }
/// <summary>
/// 排序字段
///</summary>
public int? OrderNum { get; set; }
/// <summary>
/// 描述
///</summary>
public string Remark { get; set; }
/// <summary>
/// 子评论数
///</summary>
public int? CommentNum { get; set; }
/// <summary>
/// 被回复的用户信息
///</summary>
public UserVo UserInfo { get; set; }
/// <summary>
/// 创建评论的用户信息
///</summary>
public UserVo CreateUserInfo { get; set; }
}
}

View File

@@ -0,0 +1,37 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Yi.Framework.DTOModel.Base.Vo
{
/// <summary>
/// 前端只需要这些数据即可
/// </summary>
public class UserVo
{
public string Name { get; set; }
public int? Age { get; set; }
public string UserName { get; set; }
public string Icon { get; set; }
public string Nick { get; set; }
//public string Email { get; set; }
//public string Ip { get; set; }
//public string Address { get; set; }
//public string Phone { get; set; }
public string Introduction { get; set; }
public int? Sex { get; set; }
}
}