Skip to content

心动dto

Published: at 10:18 AM

基础概念

.net 中 dto 的传统作用

这是一个基础 USER 信息 dto

这些基础的字段较为都是大多数程序需要收集到的数据字段,可完全暴露给客户端也可暴露出仅客户端需要的那部分字段。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BlogSystem.Dto
{
    public class UserInformation
    {
        public Guid Id { get; set; }
        public string Eamil { get; set; }
        public string Password { get; set; }
        public string NickName { get; set; }
        public string ImagePath { get; set; }
        public DateTime CreateTime { get; set; }
        public string PersonalDescription { get; set; }
        public int FansCount { get; set; }
        public int FocusCount { get; set; }
        public bool IsFreeze { get; set; }
    }
}