示例#1
0
        ////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        public ClassSchema()
        {
            Names        = new NameProvider("Class", "Classes", "c");
            GetAccess    = Access.All;
            CreateAccess = Access.All;
            DeleteAccess = Access.CreatorUserAndApp;
            IsAbstract   = false;
            CustomCreate = true;

            ////

            Name           = new DomainProperty <string>("Name", "c_na");
            Name.IsElastic = true;

            NameKey             = new DomainProperty <string>("NameKey", "c_nk");
            NameKey.ToLowerCase = true;
            NameKey.IsIndexed   = true;
            Name.ExactIndexVia  = NameKey;

            Disamb            = new DomainProperty <string>("Disamb", "c_di");
            Disamb.IsNullable = true;
            Disamb.IsElastic  = true;

            Note            = new DomainProperty <string>("Note", "c_no");
            Note.IsNullable = true;

            ////

            FabName = new ApiProperty <string>("Name");
            FabName.SetOpenAccess();
            FabName.LenMin       = 1;
            FabName.LenMax       = 128;
            FabName.ValidRegex   = ApiProperty.ValidTitleRegex;
            FabName.TraversalHas = Matching.None;

            FabDisamb = new ApiProperty <string>("Disamb");
            FabDisamb.SetOpenAccess();
            FabDisamb.IsNullable   = true;
            FabDisamb.LenMin       = 1;
            FabDisamb.LenMax       = 128;
            FabDisamb.ValidRegex   = ApiProperty.ValidTitleRegex;
            FabDisamb.TraversalHas = Matching.None;

            FabNote = new ApiProperty <string>("Note");
            FabNote.SetOpenAccess();
            FabNote.IsNullable   = true;
            FabNote.LenMin       = 1;
            FabNote.LenMax       = 256;
            FabNote.TraversalHas = Matching.None;

            ////

            FabNameMap = new PropertyMapping <string, string>(Name, FabName, CustomDir.ApiToDomain);
            FabNameMap.ApiToDomainNote = "Set Domain.NameKey = Api.Name.ToLower()";

            FabDisambMap = new PropertyMapping <string, string>(Disamb, FabDisamb);
            FabNoteMap   = new PropertyMapping <string, string>(Note, FabNote);
        }
示例#2
0
        ////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        public InstanceSchema()
        {
            Names        = new NameProvider("Instance", "Instances", "i");
            GetAccess    = Access.All;
            CreateAccess = Access.All;
            DeleteAccess = Access.CreatorUserAndApp;
            IsAbstract   = false;
            CustomCreate = true;

            ////

            Name            = new DomainProperty <string>("Name", "i_na");
            Name.IsNullable = true;
            Name.IsElastic  = true;

            Disamb            = new DomainProperty <string>("Disamb", "i_di");
            Disamb.IsNullable = true;
            Disamb.IsElastic  = true;

            Note            = new DomainProperty <string>("Note", "i_no");
            Note.IsNullable = true;

            ////

            FabName = new ApiProperty <string>("Name");
            FabName.SetOpenAccess();
            FabName.IsNullable   = true;
            FabName.LenMin       = 1;
            FabName.LenMax       = 128;
            FabName.ValidRegex   = ApiProperty.ValidTitleRegex;
            FabName.TraversalHas = Matching.None;

            FabDisamb = new ApiProperty <string>("Disamb");
            FabDisamb.SetOpenAccess();
            FabDisamb.IsNullable   = true;
            FabDisamb.LenMin       = 1;
            FabDisamb.LenMax       = 128;
            FabDisamb.ValidRegex   = ApiProperty.ValidTitleRegex;
            FabDisamb.TraversalHas = Matching.None;

            FabNote = new ApiProperty <string>("Note");
            FabNote.SetOpenAccess();
            FabNote.IsNullable   = true;
            FabNote.LenMin       = 1;
            FabNote.LenMax       = 256;
            FabNote.TraversalHas = Matching.None;

            ////

            FabNameMap   = new PropertyMapping <string, string>(Name, FabName);
            FabDisambMap = new PropertyMapping <string, string>(Disamb, FabDisamb);
            FabNoteMap   = new PropertyMapping <string, string>(Note, FabNote);
        }
示例#3
0
        ////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        public UrlSchema()
        {
            Names        = new NameProvider("Url", "Urls", "r");
            GetAccess    = Access.All;
            CreateAccess = Access.All;
            DeleteAccess = Access.CreatorUserAndApp;
            IsAbstract   = false;

            ////

            Name            = new DomainProperty <string>("Name", "r_na");
            Name.IsNullable = true;
            Name.IsElastic  = true;

            FullPath = new DomainProperty <string>("FullPath", "r_fp");
            FullPath.EnforceUnique = true;
            FullPath.ToLowerCase   = true;
            FullPath.IsIndexed     = true;

            ////

            FabName = new ApiProperty <string>("Name");
            FabName.SetOpenAccess();
            FabName.IsNullable   = true;
            FabName.LenMin       = 1;
            FabName.LenMax       = 128;
            FabName.ValidRegex   = ApiProperty.ValidTitleRegex;
            FabName.TraversalHas = Matching.None;

            FabFullPath = new ApiProperty <string>("FullPath");
            FabFullPath.SetOpenAccess();
            FabFullPath.IsUnique     = true;
            FabFullPath.ToLowerCase  = true;
            FabFullPath.LenMin       = 1;
            FabFullPath.LenMax       = 2048;
            FabFullPath.TraversalHas = Matching.None;

            ////

            FabNameMap     = new PropertyMapping <string, string>(Name, FabName);
            FabFullPathMap = new PropertyMapping <string, string>(FullPath, FabFullPath);
        }
示例#4
0
        ////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        public MemberSchema()
        {
            Names        = new NameProvider("Member", "Members", "m");
            GetAccess    = Access.All;
            CreateAccess = Access.All;
            DeleteAccess = Access.CreatorApp;
            IsAbstract   = false;
            CustomCreate = true;

            ////

            MemberType = new DomainProperty <byte>("MemberType", "m_mt");

            OauthScopeAllow            = new DomainProperty <bool>("OauthScopeAllow", "m_osa");
            OauthScopeAllow.IsNullable = true;

            OauthGrantRedirectUri             = new DomainProperty <string>("OauthGrantRedirectUri", "m_ogr");
            OauthGrantRedirectUri.IsNullable  = true;
            OauthGrantRedirectUri.ToLowerCase = true;

            OauthGrantCode            = new DomainProperty <string>("OauthGrantCode", "m_ogc");
            OauthGrantCode.IsNullable = true;
            OauthGrantCode.IsUnique   = true;
            OauthGrantCode.IsIndexed  = true;

            OauthGrantExpires            = new DomainProperty <long>("OauthGrantExpires", "m_oge");
            OauthGrantExpires.IsNullable = true;

            ////

            FabMemberType = new ApiProperty <byte>("Type");
            FabMemberType.SetOpenAccess();
            FabMemberType.FromEnum = "MemberType";

            FabOauthScopeAllow            = new ApiProperty <bool>("OauthScopeAllow");
            FabOauthScopeAllow.IsNullable = true;

            FabOauthGrantRedirectUri             = new ApiProperty <string>("OauthGrantRedirectUri");
            FabOauthGrantRedirectUri.LenMin      = 1;
            FabOauthGrantRedirectUri.LenMax      = 1024;
            FabOauthGrantRedirectUri.ToLowerCase = true;
            FabOauthGrantRedirectUri.IsNullable  = true;

            FabOauthGrantCode            = new ApiProperty <string>("OauthGrantCode");
            FabOauthGrantCode.LenMin     = 32;
            FabOauthGrantCode.LenMax     = 32;
            FabOauthGrantCode.ValidRegex = ApiProperty.ValidCodeRegex;
            FabOauthGrantCode.IsNullable = true;

            FabOauthGrantExpires            = new ApiProperty <long>("OauthGrantExpires");
            FabOauthGrantExpires.IsNullable = true;

            ////

            FabMemberTypeMap      = new PropertyMapping <byte, byte>(MemberType, FabMemberType);
            FabOauthScopeAllowMap = new PropertyMapping <bool, bool>(
                OauthScopeAllow, FabOauthScopeAllow);
            FabOauthGrantRedirectUriMap = new PropertyMapping <string, string>(
                OauthGrantRedirectUri, FabOauthGrantRedirectUri);
            FabOauthGrantCodeMap = new PropertyMapping <string, string>(
                OauthGrantCode, FabOauthGrantCode);
            FabOauthGrantExpiresMap = new PropertyMapping <long, long>(
                OauthGrantExpires, FabOauthGrantExpires);
        }