Add project files.
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
namespace APISocietyToolBox.Models
|
||||
{
|
||||
public class UserDto
|
||||
{
|
||||
public string Username { get; set; } = string.Empty;
|
||||
public string Password { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
|
||||
namespace APISocietyToolBox.Models
|
||||
{
|
||||
public class UserModel
|
||||
{
|
||||
public Int64? UserID { get; set; } = null;
|
||||
public string UserName { get; set; } = string.Empty;
|
||||
public string LoginName { get; set; } = string.Empty;
|
||||
public string LoginPassword { get; set; } = string.Empty;
|
||||
public string PasswordSalt { get; set; } = string.Empty;
|
||||
public string UserRole { get; set; } = string.Empty;
|
||||
public Int64? UserRoleID { get; set; }
|
||||
public Int64? PropertyID { get; set; }
|
||||
public string? RefreshToken { get; set; } = string.Empty;
|
||||
public DateTime? TokenCreated { get; set; }
|
||||
public DateTime? TokenExpires { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class UserTokenRefreshModel
|
||||
{
|
||||
public Int64 UserID { get; set; }
|
||||
public int UserRoleID { get; set; }
|
||||
public string? UserName { get; set; } = string.Empty;
|
||||
public string? UserRole { get; set; } = string.Empty;
|
||||
public string? RefreshToken { get; set; } = string.Empty;
|
||||
|
||||
}
|
||||
public class UserTokenModel
|
||||
{
|
||||
public int? Status { get; set; }
|
||||
public string StatusMessage { get; set; } = string.Empty;
|
||||
public string? UserName { get; set; } = string.Empty;
|
||||
public string? UserRole { get; set; } = string.Empty;
|
||||
public Int64? UserRoleID { get; set; } = null;
|
||||
public Int64? UserID { get; set; } = null;
|
||||
public int PropertyID { get; set; }
|
||||
public string? RefreshToken { get; set; } = string.Empty;
|
||||
public DateTime? TokenCreated { get; set; }
|
||||
public DateTime? TokenExpires { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class LoginResponseModel
|
||||
{
|
||||
public int? Status { get; set; }
|
||||
public string StatusMessage { get; set; } = string.Empty;
|
||||
[Key]
|
||||
public Int64 UserID { get; set; }
|
||||
public Int64 UserRoleID { get; set; }
|
||||
public string UserRole { get; set; } = string.Empty;
|
||||
public string UserName { get; set; } = string.Empty;
|
||||
public string LoginPassword { get; set; } = string.Empty;
|
||||
public string PasswordSalt { get; set; } = string.Empty;
|
||||
public Int64 PropertyID { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class UserResponseModel
|
||||
{
|
||||
[Key]
|
||||
public Int64 UserID { get; set; }
|
||||
public string UserName { get; set; } = string.Empty;
|
||||
public int Status { get; set; }
|
||||
public string StatusMessage { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
|
||||
public class UserRequestModel
|
||||
{
|
||||
public string UserName { get; set; } = string.Empty;
|
||||
public string LoginName { get; set; } = string.Empty;
|
||||
public string LoginPassword { get; set; } = string.Empty;
|
||||
public string UserRole { get; set; } = string.Empty;
|
||||
public int UserRoleID { get; set; }
|
||||
public int PropertyID { get; set; }
|
||||
public string? RefreshToken { get; set; } = string.Empty;
|
||||
public DateTime? TokenCreated { get; set; }
|
||||
public DateTime? TokenExpires { get; set; }
|
||||
}
|
||||
|
||||
public class UserTokens
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public Int64 UserTokenID { get; set; }
|
||||
public Int64? UserID { get; set; }
|
||||
public Int64? UserRoleID { get; set; }
|
||||
public Int64? PropertyID { get; set; }
|
||||
public string? RefreshToken { get; set; }
|
||||
public DateTime? TokenExpires { get; set; }
|
||||
public DateTime? TokenCreated { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class RefreshToken
|
||||
{
|
||||
public string Token { get; set; } = string.Empty;
|
||||
public DateTime Created { get; set; } = DateTime.Now;
|
||||
public DateTime Expires { get; set; }
|
||||
public int UserID { get; set; }
|
||||
public string UserName { get; set; } = string.Empty;
|
||||
public int PropertyID { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user