using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Atomx.Common.Entities
{
///
/// 用户数据
///
[Table("Users")]
public class User
{
[DatabaseGenerated(DatabaseGeneratedOption.None)]
[Key]
public long Id { get; set; }
///
/// 用户名
///
[Column(TypeName = "varchar(64)")]
public string Name { get; set; } = string.Empty;
///
/// 邮箱
///
[Column(TypeName = "varchar(64)")]
public string Email { get; set; } = string.Empty;
///
/// 手机号
///
[Column(TypeName = "varchar(64)")]
public string Mobile { get; set; } = string.Empty;
///
/// 头像
///
[Column(TypeName = "varchar(64)")]
public string Avatar { get; set; } = string.Empty;
///
/// 登录密码
///
[Column(TypeName = "varchar(32)")]
public string Password { get; set; } = string.Empty;
///
/// 注册数据创建时间
///
[Column(TypeName = "timestamptz")]
public DateTime CreateTime { get; set; } = DateTime.UtcNow;
///
/// 数据最后更新时间
///
[Column(TypeName = "timestamptz")]
public DateTime? UpdateTime { get; set; }
}
}