using System.ComponentModel.DataAnnotations; namespace CampusErrand.Models; /// /// 用户表 /// public class User { [Key] public int Id { get; set; } /// 微信 OpenID [MaxLength(128)] public string OpenId { get; set; } = string.Empty; /// 手机号 [MaxLength(20)] public string Phone { get; set; } = string.Empty; /// 昵称 [MaxLength(64)] public string Nickname { get; set; } = string.Empty; /// 头像 [MaxLength(512)] public string AvatarUrl { get; set; } = string.Empty; /// 角色 public UserRole Role { get; set; } = UserRole.User; /// 跑腿评分,默认 80 public int RunnerScore { get; set; } = 80; /// 是否被封禁 public bool IsBanned { get; set; } /// 创建时间 public DateTime CreatedAt { get; set; } = DateTime.UtcNow; }