using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace HB.DB.Common
{
/// <summary>
/// 用户公告信息表
/// </summary>
[Table("usernotify")]
public class UserNotify
{
/// <summary>
/// 主键
/// </summary>
[Key]
public int Id { get; set; }
/// <summary>
/// 用户Id
/// </summary>
public int UserId { get; set; }
/// <summary>
/// 公告Id(关联SystemNotify的主键)
/// </summary>
public int NotifyId { get; set; }
/// <summary>
/// 读取状态(标记用户是否已经读取该记录)
/// </summary>
public bool ReadStatus { get; set; }
/// <summary>
/// 请求时间
/// </summary>
public DateTime? RequestTime { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime CreateTime { get; set; }
}
}
http://stackoverflow.com/questions/6660132/entity-framework-code-first-setting-database-field-decription