using Lottomat.Application.Code;
using System;
using Lottomat.Util;
using Lottomat.Utils.Date;
namespace Lottomat.Application.Entity.AuthorizeManage
{
///
/// 版 本 1.0
/// Copyright (c) 2016-2017
/// 创建人:赵轶
/// 日 期:2015.11.27
/// 描 述:授权数据范围
///
public class AuthorizeDataEntity : BaseEntity
{
#region 实体成员
///
/// 授权数据主键
///
public string AuthorizeDataId { get; set; }
///
/// 授权类型:1-仅限本人2-仅限本人及下属3-所在部门4-所在机构5-按明细设置
///
public int? AuthorizeType { get; set; }
///
/// 对象分类:1-部门2-角色3-岗位4-职位5-工作组
///
public int Category { get; set; }
///
/// 对象主键
///
public string ObjectId { get; set; }
///
/// 项目Id
///
public string ItemId { get; set; }
///
/// 项目名称
///
public string ItemName { get; set; }
///
/// 资源主键
///
public string ResourceId { get; set; }
///
/// 只读
///
public int IsRead { get; set; }
///
/// 约束表达式
///
public string AuthorizeConstraint { get; set; }
///
/// 排序码
///
public int? SortCode { get; set; }
///
/// 创建时间
///
public DateTime CreateDate { get; set; }
///
/// 创建用户主键
///
public string CreateUserId { get; set; }
///
/// 创建用户
///
public string CreateUserName { get; set; }
#endregion
#region 扩展操作
///
/// 新增调用
///
public override void Create()
{
this.AuthorizeDataId = CommonHelper.GetGuid().ToString();
this.CreateDate = DateTimeHelper.Now;
this.CreateUserId = OperatorProvider.Provider.Current().UserId;
this.CreateUserName = OperatorProvider.Provider.Current().UserName;
}
///
/// 编辑调用
///
///
public override void Modify(string keyValue)
{
this.AuthorizeDataId = keyValue;
}
#endregion
}
}