summaryrefslogtreecommitdiff
path: root/Server/User.cs
blob: 87384d2ddd6712561b47401bbc56677f2d78e34a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
using Microsoft.EntityFrameworkCore;

namespace HyperBooru;

[Index(nameof(Username))]
public class User : HBObject {
    public string Username     { get; set; }
    public string PasswordHash { get; set; }

    public static explicit operator ApiModels.User(User user) =>
        new() {
            UserId   = user.Guid,
            Username = user.Username
        };
}