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>
20 lines
628 B
C#
20 lines
628 B
C#
using SqlSugar;
|
|
|
|
namespace WmsLite.Api.Models;
|
|
|
|
[SugarTable("sys_user")]
|
|
public class SysUser : BaseEntity
|
|
{
|
|
[SugarColumn(ColumnName = "username", Length = 64, IsNullable = false)]
|
|
public string Username { get; set; } = string.Empty;
|
|
|
|
[SugarColumn(ColumnName = "password_hash", Length = 256, IsNullable = false)]
|
|
public string PasswordHash { get; set; } = string.Empty;
|
|
|
|
[SugarColumn(ColumnName = "display_name", Length = 128, IsNullable = true)]
|
|
public string? DisplayName { get; set; }
|
|
|
|
[SugarColumn(ColumnName = "is_enabled", IsNullable = false)]
|
|
public bool IsEnabled { get; set; } = true;
|
|
}
|