diff options
| author | transtrike <transtrike@gmail.com> | 2021-03-28 19:21:49 +0300 |
|---|---|---|
| committer | transtrike <transtrike@gmail.com> | 2021-03-28 19:21:49 +0300 |
| commit | 8282f6c3f89ee65be155d453ddd705892b07628e (patch) | |
| tree | 822ce9d4043e2560234b21da568f685272cf722a /src/Data/DevHive.Data.Models | |
| parent | a789a23c3c8ddde8188f2da40402a1803f838f89 (diff) | |
| download | DevHive-8282f6c3f89ee65be155d453ddd705892b07628e.tar DevHive-8282f6c3f89ee65be155d453ddd705892b07628e.tar.gz DevHive-8282f6c3f89ee65be155d453ddd705892b07628e.zip | |
ProfilePic saved in User fixed
Diffstat (limited to 'src/Data/DevHive.Data.Models')
| -rw-r--r-- | src/Data/DevHive.Data.Models/ProfilePicture.cs | 5 | ||||
| -rw-r--r-- | src/Data/DevHive.Data.Models/User.cs | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/Data/DevHive.Data.Models/ProfilePicture.cs b/src/Data/DevHive.Data.Models/ProfilePicture.cs index 5877861..e8166d7 100644 --- a/src/Data/DevHive.Data.Models/ProfilePicture.cs +++ b/src/Data/DevHive.Data.Models/ProfilePicture.cs @@ -6,8 +6,13 @@ namespace DevHive.Data.Models [Table("ProfilePictures")] public class ProfilePicture { + public const string DefaultURL = "/assets/icons/tabler-icon-user.svg"; + public Guid Id { get; set; } + public Guid UserId { get; set; } + public User User { get; set; } + public string PictureURL { get; set; } } } diff --git a/src/Data/DevHive.Data.Models/User.cs b/src/Data/DevHive.Data.Models/User.cs index f6cd3b9..d3789ec 100644 --- a/src/Data/DevHive.Data.Models/User.cs +++ b/src/Data/DevHive.Data.Models/User.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations.Schema; -using DevHive.Data.Models.Relational; using Microsoft.AspNetCore.Identity; namespace DevHive.Data.Models @@ -13,7 +12,7 @@ namespace DevHive.Data.Models public string LastName { get; set; } - public ProfilePicture ProfilePicture { get; set; } = new(); + public ProfilePicture ProfilePicture { get; set; } = new() { PictureURL = ProfilePicture.DefaultURL }; public HashSet<Language> Languages { get; set; } = new(); |
