fengling-auth-service/src/ViewModels/RegisterViewModel.cs
movingsam 9a7948e634 refactor: reorganize project structure to src/ with slnx solution
- Move all source code to src/ directory
- Add Fengling.AuthService.slnx solution file
- Update Dockerfile to reference src/ paths
- Update CI/CD workflow for new structure
- Optimize .dockerignore for cleaner builds
2026-02-28 18:31:52 +08:00

30 lines
1.2 KiB
C#

using System.ComponentModel.DataAnnotations;
namespace Fengling.AuthService.ViewModels;
public class RegisterViewModel
{
[Required(ErrorMessage = "租户编号不能为空")]
[StringLength(10,MinimumLength = 4,ErrorMessage = "租户编号长度必须在4·10个字符之间")]
public string TenantCode { get; set; }
[Required(ErrorMessage = "用户名不能为空")]
[StringLength(50, MinimumLength = 3, ErrorMessage = "用户名长度必须在3-50个字符之间")]
public string Username { get; set; } = default!;
[Required(ErrorMessage = "邮箱不能为空")]
[EmailAddress(ErrorMessage = "请输入有效的邮箱地址")]
public string Email { get; set; }= default!;
[Required(ErrorMessage = "密码不能为空")]
[StringLength(100, MinimumLength = 6, ErrorMessage = "密码长度必须在6-100个字符之间")]
[DataType(DataType.Password)]
public string Password { get; set; }= default!;
[Required(ErrorMessage = "确认密码不能为空")]
[DataType(DataType.Password)]
[Compare("Password", ErrorMessage = "两次输入的密码不一致")]
public string ConfirmPassword { get; set; }= default!;
public string ReturnUrl { get; set; }= default!;
}