2019-01-11 23:20:28 +08:00
using System ;
2018-10-19 23:09:52 +08:00
using System.Collections.Generic ;
2016-11-18 15:37:48 +08:00
namespace Bootstrap.DataAccess
{
2019-01-11 23:20:28 +08:00
/// <summary>
///
/// </summary>
2016-11-18 15:37:48 +08:00
public class Task
{
/// <summary>
/// 获取/设置 任务ID
/// </summary>
2018-10-30 13:07:29 +08:00
public string Id { get ; set ; }
2019-01-11 23:20:28 +08:00
2016-11-18 15:37:48 +08:00
/// <summary>
/// 获取/设置 任务名称
/// </summary>
public string TaskName { get ; set ; }
2019-01-11 23:20:28 +08:00
2016-11-18 15:37:48 +08:00
/// <summary>
/// 获取/设置 分配人
/// </summary>
public string AssignName { get ; set ; }
2019-01-11 23:20:28 +08:00
2016-11-18 15:37:48 +08:00
/// <summary>
/// 获得/设置 分配人昵称
/// </summary>
public string AssignDisplayName { get ; set ; }
2019-01-11 23:20:28 +08:00
2016-11-18 15:37:48 +08:00
/// <summary>
/// 获取/设置 完成任务人
/// </summary>
public string UserName { get ; set ; }
2019-01-11 23:20:28 +08:00
2016-11-18 15:37:48 +08:00
/// <summary>
/// 获取/设置 任务所需时间(天)
/// </summary>
public int TaskTime { get ; set ; }
2019-01-11 23:20:28 +08:00
2016-11-18 15:37:48 +08:00
/// <summary>
/// 获取/设置 任务进度
/// </summary>
public double TaskProgress { get ; set ; }
2019-01-11 23:20:28 +08:00
2016-11-18 15:37:48 +08:00
/// <summary>
/// 获取/设置 分配时间
/// </summary>
public DateTime AssignTime { get ; set ; }
2019-01-11 23:20:28 +08:00
2018-10-19 23:09:52 +08:00
/// <summary>
/// 查询所有任务
/// </summary>
/// <returns></returns>
2019-01-14 12:33:09 +08:00
public virtual IEnumerable < Task > Retrieves ( ) = > DbManager . Create ( ) . SkipTake < Task > ( 0 , 1000 , "select t.*, u.DisplayName AssignDisplayName from Tasks t inner join Users u on t.UserName = u.UserName order by AssignTime desc" ) ;
2016-11-18 15:37:48 +08:00
}
}