Repository navigation
Expand file tree
/
Copy pathUser.cs
More file actions
60 lines (49 loc) · 1.39 KB
/
Copy pathUser.cs
File metadata and controls
60 lines (49 loc) · 1.39 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
using EntityFrameworkCore.BootKit;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;
namespace BotSharp.Core.Accounts
{
/// <summary>
/// User profile
/// </summary>
[Table("User")]
public class User : DbRecord, IDbRecord
{
[Required]
[StringLength(64)]
public String UserName { get; set; }
[Required]
[StringLength(64)]
[DataType(DataType.EmailAddress)]
public String Email { get; set; }
[StringLength(32)]
public String FirstName { get; set; }
[StringLength(32)]
public String LastName { get; set; }
[MaxLength(256)]
public String Description { get; set; }
[Required]
[DataType(DataType.DateTime)]
public DateTime SignupDate { get; set; }
[DataType(DataType.Date)]
public DateTime? Birthday { get; set; }
[MaxLength(36)]
public String Nationality { get; set; }
[NotMapped]
public String FullName
{
get
{
return FirstName + (String.IsNullOrEmpty(LastName) ? "" : " " + LastName);
}
}
public UserAuth Authenticaiton { get; set; }
public User()
{
SignupDate = DateTime.UtcNow;
}
}
}