-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Expand file tree
/
Copy pathUser.cs
More file actions
56 lines (38 loc) · 1.63 KB
/
User.cs
File metadata and controls
56 lines (38 loc) · 1.63 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
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Microsoft.AspNetCore.Identity;
using SimplCommerce.Infrastructure.Models;
namespace SimplCommerce.Module.Core.Models
{
public class User : IdentityUser<long>, IEntityWithTypedId<long>, IExtendableObject
{
public User()
{
CreatedOn = DateTimeOffset.UtcNow;
LatestUpdatedOn = DateTimeOffset.UtcNow;
}
public const string SettingsDataKey = "Settings";
public Guid UserGuid { get; set; }
[Required(ErrorMessage = "The {0} field is required.")]
[StringLength(450)]
public string FullName { get; set; }
public long? VendorId { get; set; }
public bool IsDeleted { get; set; }
public DateTimeOffset CreatedOn { get; set; }
public DateTimeOffset LatestUpdatedOn { get; set; }
public IList<UserAddress> UserAddresses { get; set; } = new List<UserAddress>();
public UserAddress DefaultShippingAddress { get; set; }
public long? DefaultShippingAddressId { get; set; }
public UserAddress DefaultBillingAddress { get; set; }
public long? DefaultBillingAddressId { get; set; }
[StringLength(450)]
public string RefreshTokenHash { get; set; }
public IList<UserRole> Roles { get; set; } = new List<UserRole>();
public IList<CustomerGroupUser> CustomerGroups { get; set; } = new List<CustomerGroupUser>();
[StringLength(450)]
public string Culture { get; set; }
/// <inheritdoc />
public string ExtensionData { get; set; }
}
}