using System; namespace Infrastructure.Domain { [AttributeUsage(AttributeTargets.Class)] public class ScopeAttribute : Attribute { public const ScopeType PlatformAll = ScopeType.PlatformRead | ScopeType.PlatformAdd | ScopeType.PlatformEdit | ScopeType.PlatformDelete; public const ScopeType OrganAll = ScopeType.OrganRead | ScopeType.OrganAdd | ScopeType.OrganEdit | ScopeType.OrganDelete; public const ScopeType UserAll = ScopeType.UserRead | ScopeType.UserAdd | ScopeType.UserEdit | ScopeType.UserDelete; /// /// 默认为PlatformAll /// public ScopeAttribute() { this.Scope = PlatformAll; } public ScopeAttribute(ScopeType scope) { this.Scope = scope; } public ScopeType Scope { get; } } }