Implement API security baseline (sys_user, JWT, audit fields, transactions, unique constraints) and Web real login with 401 handling. Document setup and development workflows in root, WmsLite.Api, and WmsLite.Web README files. Co-authored-by: Cursor <cursoragent@cursor.com>
41 lines
1007 B
C#
41 lines
1007 B
C#
namespace WmsLite.Api.Dtos.Auth;
|
|
|
|
public class LoginRequest
|
|
{
|
|
public string Username { get; set; } = string.Empty;
|
|
|
|
public string Password { get; set; } = string.Empty;
|
|
|
|
/// <summary>可选;默认 default。</summary>
|
|
public string? TenantId { get; set; }
|
|
|
|
/// <summary>可选;默认 default。</summary>
|
|
public string? OwnerCode { get; set; }
|
|
}
|
|
|
|
public class LoginResponseDto
|
|
{
|
|
public string Token { get; set; } = string.Empty;
|
|
|
|
public DateTime ExpiresAt { get; set; }
|
|
|
|
public string UserId { get; set; } = string.Empty;
|
|
|
|
public string TenantId { get; set; } = string.Empty;
|
|
|
|
public string OwnerCode { get; set; } = string.Empty;
|
|
|
|
public string DisplayName { get; set; } = string.Empty;
|
|
}
|
|
|
|
public class MeResponseDto
|
|
{
|
|
public string UserId { get; set; } = string.Empty;
|
|
|
|
public string TenantId { get; set; } = string.Empty;
|
|
|
|
public string OwnerCode { get; set; } = string.Empty;
|
|
|
|
public string DisplayName { get; set; } = string.Empty;
|
|
}
|