forked from dotnetcore/WebApiClient
-
Notifications
You must be signed in to change notification settings - Fork 0
/
User.cs
40 lines (33 loc) · 862 Bytes
/
User.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using System;
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;
using WebApiClientCore.Serialization.JsonConverters;
namespace App
{
/// <summary>
/// 表示用户模型
/// </summary>
public class User
{
[Required]
[StringLength(10, MinimumLength = 1)]
public string Account { get; set; }
[Required]
[StringLength(10, MinimumLength = 1)]
public string Password { get; set; }
public string NickName { get; set; }
[JsonDateTime("yyyy年MM月dd日")]
public DateTime? BirthDay { get; set; }
public Gender Gender { get; set; }
[JsonIgnore]
public string Email { get; set; }
}
/// <summary>
/// 性别
/// </summary>
public enum Gender
{
Female = 0,
Male = 1
}
}