Exemplo n.º 1
0
        public override TableSchema GetTableSchema()
        {
            if (null == _TableSchema)
            {
                TableSchema schema = new TableSchema();
                schema.SchemaName = @"Comment";
                schema.AddColumn(Columns.CommentId, typeof(Int64), 0, 0, 0, true, true, false, null);
                schema.AddColumn(Columns.Name, typeof(string), DataType.Char, 255, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.Rate, typeof(double), 0, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.Content, typeof(string), DataType.Char, 255, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.AppUserId, typeof(Int64), 0, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.SupplierId, typeof(Int64), 0, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.BidId, typeof(Int64), 0, 0, 0, false, false, true, null);
                schema.AddColumn(Columns.Status, typeof(CommentStatus), 0, 0, 0, false, false, false, CommentStatus.Wait);
                schema.AddColumn(Columns.CreateDate, typeof(DateTime), 0, 0, 0, false, false, false, DateTime.MinValue);
                schema.AddColumn(Columns.ApproveDate, typeof(DateTime), 0, 0, 0, false, false, true, null);

                _TableSchema = schema;

                schema.AddIndex("ix_Comment_CommentId", TableSchema.ClusterMode.None, TableSchema.IndexMode.None, TableSchema.IndexType.None, Columns.CommentId);
                schema.AddIndex("ix_Comment_CreateDate", TableSchema.ClusterMode.None, TableSchema.IndexMode.None, TableSchema.IndexType.None, Columns.CreateDate, SortDirection.ASC);

                schema.AddForeignKey("fk_Comment_SupplierId", Comment.Columns.SupplierId, AppSupplier.TableSchema.SchemaName, AppSupplier.Columns.SupplierId, TableSchema.ForeignKeyReference.None, TableSchema.ForeignKeyReference.None);
                schema.AddForeignKey("fk_Comment_AppUserId", Comment.Columns.AppUserId, AppUser.TableSchema.SchemaName, AppUser.Columns.AppUserId, TableSchema.ForeignKeyReference.None, TableSchema.ForeignKeyReference.None);
            }

            return(_TableSchema);
        }
Exemplo n.º 2
0
        public override TableSchema GetTableSchema()
        {
            if (null == _TableSchema)
            {
                TableSchema schema = new TableSchema();
                schema.SchemaName = @"Product";
                schema.AddColumn(Columns.ProductId, typeof(Int64), 0, 0, 0, true, true, false, null);
                schema.AddColumn(Columns.ProductNum, typeof(Int64), 0, 0, 0, false, false, true, null);
                schema.AddColumn(Columns.ProductName, typeof(string), DataType.Char, 128, 0, 0, false, false, false, string.Empty);
                schema.AddColumn(Columns.ProductCode, typeof(string), DataType.Char, 255, 0, 0, false, false, false, string.Empty);
                schema.AddColumn(Columns.ProductImage, typeof(string), DataType.Char, 255, 0, 0, false, false, false, string.Empty);
                schema.AddColumn(Columns.Amount, typeof(string), DataType.Char, 128, 0, 0, false, false, false, string.Empty);
                schema.AddColumn(Columns.Description, typeof(string), DataType.Char, 255, 0, 0, false, false, false, string.Empty);
                schema.AddColumn(Columns.SendSupplier, typeof(bool), 0, 0, 0, false, false, false, false);
                schema.AddColumn(Columns.RecomendedPrice, typeof(decimal), 0, 0, 0, false, false, false, 0);
                schema.AddColumn(Columns.CategoryId, typeof(Int64), 0, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.SubCategoryId, typeof(Int64), 0, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.IsDeleted, typeof(bool), 0, 0, 0, false, false, false, false);
                schema.AddColumn(Columns.CreateDate, typeof(DateTime), 0, 0, 0, false, false, false, DateTime.UtcNow);
                schema.AddColumn(Columns.ProductRate, typeof(Int64), 0, 0, 0, false, false, false, null);

                _TableSchema = schema;

                schema.AddIndex("ik_ProductId", TableSchema.ClusterMode.None, TableSchema.IndexMode.None, TableSchema.IndexType.None, Columns.ProductId);
                schema.AddIndex("ix_Product_Date", TableSchema.ClusterMode.None, TableSchema.IndexMode.None, TableSchema.IndexType.None, Columns.CreateDate, SortDirection.ASC);

                schema.AddForeignKey("fk_CategoryId", Product.Columns.CategoryId, Category.TableSchema.SchemaName, Category.Columns.CategoryId, TableSchema.ForeignKeyReference.Cascade, TableSchema.ForeignKeyReference.Cascade);
                schema.AddForeignKey("fk_SubCategoryId", Product.Columns.SubCategoryId, SubCategory.TableSchema.SchemaName, SubCategory.Columns.SubCategoryId, TableSchema.ForeignKeyReference.Cascade, TableSchema.ForeignKeyReference.Cascade);
            }

            return(_TableSchema);
        }
Exemplo n.º 3
0
        public override TableSchema GetTableSchema()
        {
            if (null == _TableSchema)
            {
                TableSchema schema = new TableSchema();
                schema.SchemaName = @"pricedeviation";
                schema.AddColumn(Columns.ProductId, typeof(Int64), 0, 0, 0, false, true, false, null);
                schema.AddColumn(Columns.SupplierId, typeof(Int64), 0, 0, 0, false, true, false, null);
                schema.AddColumn(Columns.ProductName, typeof(string), DataType.Char, 64, 0, 0, false, false, false, string.Empty);
                schema.AddColumn(Columns.SupplierName, typeof(string), DataType.Char, 128, 0, 0, false, false, false, string.Empty);
                schema.AddColumn(Columns.RecommendedPrice, typeof(decimal), 0, 64, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.ActualPrice, typeof(decimal), 0, 64, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.DeviationPercentage, typeof(int), 0, 64, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.TimeOfApproval, typeof(DateTime), 0, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.IsApproved, typeof(bool), 0, 0, 0, false, false, false, null);

                schema.AddIndex("pk_SupplierProduct_SupplierIdProductId", TableSchema.ClusterMode.None, TableSchema.IndexMode.PrimaryKey, TableSchema.IndexType.None, Columns.SupplierId, Columns.ProductId);
                schema.AddIndex("ix_SupplierProduct_SupplierId", TableSchema.ClusterMode.None, TableSchema.IndexMode.None, TableSchema.IndexType.None, Columns.SupplierId);
                schema.AddIndex("ix_SupplierProduct_ProductId", TableSchema.ClusterMode.None, TableSchema.IndexMode.None, TableSchema.IndexType.None, Columns.ProductId);

                schema.AddForeignKey("fk_SupplierProduct_AppSupplier", SupplierProduct.Columns.SupplierId, AppSupplier.TableSchema.SchemaName, AppSupplier.Columns.SupplierId, TableSchema.ForeignKeyReference.Cascade, TableSchema.ForeignKeyReference.Cascade);
                schema.AddForeignKey("fk_SupplierProduct_ProductId", SupplierProduct.Columns.ProductId, Product.TableSchema.SchemaName, Product.Columns.ProductId, TableSchema.ForeignKeyReference.Cascade, TableSchema.ForeignKeyReference.Cascade);

                _TableSchema = schema;
            }

            return(_TableSchema);
        }
Exemplo n.º 4
0
        public override TableSchema GetTableSchema()
        {
            if (null == _TableSchema)
            {
                TableSchema schema = new TableSchema();
                schema.SchemaName = @"ProductYad2";
                schema.AddColumn(Columns.ProductId, typeof(Int64), 0, 0, 0, true, true, false, null);
                schema.AddColumn(Columns.ProductName, typeof(string), DataType.Char, 128, 0, 0, false, false, false, string.Empty);
                schema.AddColumn(Columns.ProductImage, typeof(string), DataType.Char, 255, 0, 0, false, false, false, string.Empty);
                schema.AddColumn(Columns.Price, typeof(decimal), 0, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.ContactName, typeof(string), DataType.Char, 128, 0, 0, false, false, false, string.Empty);
                schema.AddColumn(Columns.Details, typeof(string), DataType.Text, 0, 0, 0, false, false, false, string.Empty);
                schema.AddColumn(Columns.Status, typeof(StatusType), 0, 0, 0, false, false, false, StatusType.Wait);
                schema.AddColumn(Columns.StatusRemarks, typeof(string), DataType.Char, 128, 0, 0, false, false, false, string.Empty);
                schema.AddColumn(Columns.PriceId, typeof(Int64), 0, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.Phone, typeof(string), DataType.Char, 128, 0, 0, false, false, false, string.Empty);
                schema.AddColumn(Columns.AppUserId, typeof(Int64), 0, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.CityId, typeof(Int64), 0, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.UpdateDate, typeof(DateTime), 0, 0, 0, false, false, false, DateTime.MinValue);
                schema.AddColumn(Columns.CreateDate, typeof(DateTime), 0, 0, 0, false, false, false, DateTime.MinValue);

                _TableSchema = schema;

                schema.AddIndex("ik_ProductYad2_ProductId", TableSchema.ClusterMode.None, TableSchema.IndexMode.None, TableSchema.IndexType.None, Columns.ProductId);
                schema.AddIndex("ik_ProductYad2_CityId", TableSchema.ClusterMode.None, TableSchema.IndexMode.None, TableSchema.IndexType.None, Columns.CityId);
                schema.AddIndex("ik_ProductYad2_PriceId", TableSchema.ClusterMode.None, TableSchema.IndexMode.None, TableSchema.IndexType.None, Columns.PriceId);
                schema.AddIndex("ix_Product_UpdateDate", TableSchema.ClusterMode.None, TableSchema.IndexMode.None, TableSchema.IndexType.None, Columns.UpdateDate, SortDirection.DESC);

                schema.AddForeignKey("fk_PriceId", ProductYad2.Columns.PriceId, PriceFilter.TableSchema.SchemaName, PriceFilter.Columns.PriceId, TableSchema.ForeignKeyReference.Cascade, TableSchema.ForeignKeyReference.Cascade);
                schema.AddForeignKey("fk_ProductYad2_AppUserId", ProductYad2.Columns.AppUserId, AppUser.TableSchema.SchemaName, AppUser.Columns.AppUserId, TableSchema.ForeignKeyReference.Cascade, TableSchema.ForeignKeyReference.Cascade);
                schema.AddForeignKey("fk_ProductYad2_CityId", ProductYad2.Columns.CityId, City.TableSchema.SchemaName, City.Columns.CityId, TableSchema.ForeignKeyReference.Cascade, TableSchema.ForeignKeyReference.Cascade);
            }

            return(_TableSchema);
        }
Exemplo n.º 5
0
        public override TableSchema GetTableSchema()
        {
            if (null == _TableSchema)
            {
                TableSchema schema = new TableSchema();
                schema.SchemaName = @"SupplierProduct";
                schema.AddColumn(Columns.SupplierId, typeof(Int64), 0, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.ProductId, typeof(Int64), 0, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.Price, typeof(decimal), 0, 0, 0, false, false, false, 0);
                schema.AddColumn(Columns.Gift, typeof(string), DataType.Char, 100, 0, 0, false, false, false, string.Empty);
                schema.AddColumn(Columns.CreateDate, typeof(DateTime), 0, 0, 0, false, false, false, DateTime.MinValue);

                _TableSchema = schema;

                schema.AddIndex("pk_SupplierProduct_SupplierIdProductId", TableSchema.ClusterMode.None, TableSchema.IndexMode.PrimaryKey, TableSchema.IndexType.None, Columns.SupplierId, Columns.ProductId);
                schema.AddIndex("ix_SupplierProduct_SupplierId", TableSchema.ClusterMode.None, TableSchema.IndexMode.None, TableSchema.IndexType.None, Columns.SupplierId);
                schema.AddIndex("ix_SupplierProduct_ProductId", TableSchema.ClusterMode.None, TableSchema.IndexMode.None, TableSchema.IndexType.None, Columns.ProductId);
                schema.AddIndex("ix_SupplierProduct_CreateDate", TableSchema.ClusterMode.None, TableSchema.IndexMode.None, TableSchema.IndexType.None, Columns.CreateDate, SortDirection.ASC);

                schema.AddForeignKey("fk_SupplierProduct_AppSupplier", SupplierProduct.Columns.SupplierId, AppSupplier.TableSchema.SchemaName, AppSupplier.Columns.SupplierId, TableSchema.ForeignKeyReference.Cascade, TableSchema.ForeignKeyReference.Cascade);
                schema.AddForeignKey("fk_SupplierProduct_ProductId", SupplierProduct.Columns.ProductId, Product.TableSchema.SchemaName, Product.Columns.ProductId, TableSchema.ForeignKeyReference.Cascade, TableSchema.ForeignKeyReference.Cascade);
            }

            return(_TableSchema);
        }
Exemplo n.º 6
0
        public override TableSchema GetTableSchema()
        {
            if (null == _TableSchema)
            {
                TableSchema schema = new TableSchema();
                schema.SchemaName = @"bidmessage";
                schema.AddColumn(Columns.BidId, typeof(Int64), 0, 0, 0, false, true, false, null);
                schema.AddColumn(Columns.SupplierId, typeof(Int64), 0, 0, 0, false, true, false, null);
                schema.AddColumn(Columns.IsActive, typeof(bool), 0, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.ExpirationTime, typeof(DateTime), 0, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.MessageId, typeof(Int64), 0, 0, 0, false, true, false, null);
                schema.AddColumn(Columns.Stage, typeof(string), DataType.Char, 64, 0, 0, false, false, false, string.Empty);
                schema.AddColumn(Columns.SendingTime, typeof(DateTime), 0, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.OriginalSupplierId, typeof(Int64), 0, 0, 0, false, false, false, null);


                schema.AddIndex("pk_MessageId", TableSchema.ClusterMode.None, TableSchema.IndexMode.PrimaryKey, TableSchema.IndexType.None, Columns.SupplierId, Columns.MessageId);
                schema.AddIndex("ix_BidMessage_IsActive", TableSchema.ClusterMode.None, TableSchema.IndexMode.None, TableSchema.IndexType.None, Columns.IsActive);
                schema.AddIndex("ix_BidMessage_ExpirationTime", TableSchema.ClusterMode.None, TableSchema.IndexMode.None, TableSchema.IndexType.None, Columns.ExpirationTime);
                schema.AddIndex("ix_BidMessage_SupplierId", TableSchema.ClusterMode.None, TableSchema.IndexMode.None, TableSchema.IndexType.None, Columns.SupplierId);

                schema.AddForeignKey("fk_Supplier_Message", Columns.SupplierId, AppSupplier.TableSchema.SchemaName, AppSupplier.Columns.SupplierId, TableSchema.ForeignKeyReference.Cascade, TableSchema.ForeignKeyReference.Cascade);
                schema.AddForeignKey("fk_Bid_Message", Columns.MessageId, Bid.TableSchema.SchemaName, Bid.Columns.BidId, TableSchema.ForeignKeyReference.Cascade, TableSchema.ForeignKeyReference.Cascade);

                _TableSchema = schema;
            }

            return(_TableSchema);
        }
Exemplo n.º 7
0
        public override TableSchema GetTableSchema()
        {
            if (null == _TableSchema)
            {
                TableSchema schema = new TableSchema();
                schema.SchemaName = @"Offer";
                schema.AddColumn(Columns.OfferId, typeof(Int64), 0, 0, 0, true, true, false, null);
                schema.AddColumn(Columns.SupplierId, typeof(Int64), 0, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.BidId, typeof(Int64), 0, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.Gift, typeof(string), DataType.Char, 255, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.Price, typeof(decimal), 0, 0, 0, false, false, false, 0);
                schema.AddColumn(Columns.CreateDate, typeof(DateTime), 0, 0, 0, false, false, false, DateTime.MinValue);

                _TableSchema = schema;

                schema.AddIndex("ix_Offer_OfferId", TableSchema.ClusterMode.None, TableSchema.IndexMode.None, TableSchema.IndexType.None, Columns.OfferId);
                schema.AddIndex("ix_Offer_BidId", TableSchema.ClusterMode.None, TableSchema.IndexMode.None, TableSchema.IndexType.None, Columns.BidId);
                schema.AddIndex("ix_Offer_SupplierId", TableSchema.ClusterMode.None, TableSchema.IndexMode.None, TableSchema.IndexType.None, Columns.SupplierId);

                schema.AddForeignKey("fk_Offer_BidId", Offer.Columns.BidId, Bid.TableSchema.SchemaName, Bid.Columns.BidId, TableSchema.ForeignKeyReference.Cascade, TableSchema.ForeignKeyReference.Cascade);
                schema.AddForeignKey("fk_Offer_SupplierId", Offer.Columns.SupplierId, AppSupplier.TableSchema.SchemaName, AppSupplier.Columns.SupplierId, TableSchema.ForeignKeyReference.Cascade, TableSchema.ForeignKeyReference.Cascade);
            }

            return(_TableSchema);
        }
Exemplo n.º 8
0
        public override TableSchema GetTableSchema()
        {
            if (null == _TableSchema)
            {
                TableSchema schema = new TableSchema();
                schema.SchemaName = @"UserAuthToken";
                schema.AddColumn(Columns.UserAuthTokenId, typeof(Int64), 0, 0, 0, true, true, false, null);
                schema.AddColumn(Columns.UserId, typeof(Int32), 0, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.Secret, typeof(Guid), 0, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.Key, typeof(string), DataType.Char, 128, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.CreatedOn, typeof(DateTime), 0, 0, 0, false, false, false, DateTime.MinValue);
                schema.AddColumn(Columns.Expiry, typeof(DateTime), 0, 0, 0, false, false, false, DateTime.MinValue);

                _TableSchema = schema;

                schema.AddIndex("ix_UserAuthToken_SecretKey", TableSchema.ClusterMode.None, TableSchema.IndexMode.Unique, TableSchema.IndexType.None, Columns.Secret, Columns.Key);
                schema.AddIndex("ix_UserAuthToken_UserId", TableSchema.ClusterMode.None, TableSchema.IndexMode.None, TableSchema.IndexType.None, Columns.UserId);
                schema.AddIndex("ix_UserAuthToken_Expiry", TableSchema.ClusterMode.None, TableSchema.IndexMode.None, TableSchema.IndexType.None, Columns.Expiry, SortDirection.ASC);
                schema.AddIndex("ix_UserAuthToken_CreatedOn", TableSchema.ClusterMode.None, TableSchema.IndexMode.None, TableSchema.IndexType.None, Columns.CreatedOn, SortDirection.ASC);

                schema.AddForeignKey("fk_UserAuthToken_UserId", UserAuthToken.Columns.UserId, User.TableSchema.SchemaName, User.Columns.UserId, TableSchema.ForeignKeyReference.Cascade, TableSchema.ForeignKeyReference.Cascade);
            }

            return(_TableSchema);
        }
Exemplo n.º 9
0
        public override TableSchema GetTableSchema()
        {
            if (null == _TableSchema)
            {
                TableSchema schema = new TableSchema();
                schema.SchemaName = @"AppSupplier";
                schema.AddColumn(Columns.SupplierId, typeof(Int64), 0, 0, 0, true, true, false, null);
                schema.AddColumn(Columns.Email, typeof(string), DataType.Char, 64, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.UniqueIdString, typeof(string), DataType.Char, 64, 0, 0, false, false, true, null);
                schema.AddColumn(Columns.LastLogin, typeof(DateTime), 0, 0, 0, false, false, false, DateTime.MinValue);
                schema.AddColumn(Columns.IsLocked, typeof(bool), 0, 0, 0, false, false, false, false);
                schema.AddColumn(Columns.IsVerified, typeof(bool), 0, 0, 0, false, false, false, true);
                schema.AddColumn(Columns.BadLoginTries, typeof(int), 0, 0, 0, false, false, false, 0);
                schema.AddColumn(Columns.Password, typeof(string), DataType.Char, 128, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.PasswordSalt, typeof(string), DataType.Char, 64, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.PasswordRecoveryKey, typeof(string), DataType.Char, 128, 0, 0, false, false, false, string.Empty);
                schema.AddColumn(Columns.PasswordRecoveryDate, typeof(DateTime), 0, 0, 0, false, false, false, DateTime.MinValue);
                schema.AddColumn(Columns.LangCode, typeof(string), DataType.Char, 16, 0, 0, false, false, false, string.Empty);
                schema.AddColumn(Columns.MastercardCode, typeof(string), DataType.Char, 16, 0, 0, false, false, false, "0");
                schema.AddColumn(Columns.UnreadNotificationCount, typeof(Int32), 0, 0, 0, false, false, false, 0);
                schema.AddColumn(Columns.ProfileImage, typeof(string), DataType.Char, 255, 0, 0, false, false, false, string.Empty);
                schema.AddColumn(Columns.ContactName, typeof(string), DataType.Char, 64, 0, 0, false, false, false, string.Empty);
                schema.AddColumn(Columns.BusinessName, typeof(string), DataType.Char, 64, 0, 0, false, false, false, string.Empty);
                schema.AddColumn(Columns.HouseNum, typeof(string), DataType.Char, 16, 0, 0, false, false, false, string.Empty);
                schema.AddColumn(Columns.Street, typeof(string), DataType.Char, 16, 0, 0, false, false, false, string.Empty);
                schema.AddColumn(Columns.CityId, typeof(Int64), 0, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.ContactPhone, typeof(string), DataType.Char, 64, 0, 0, false, false, false, string.Empty);
                schema.AddColumn(Columns.Phone, typeof(string), DataType.Char, 64, 0, 0, false, false, false, string.Empty);
                schema.AddColumn(Columns.AddressLocation, typeof(Geometry.Point), DataType.Point, 0, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.IsService, typeof(bool), 0, 0, 0, false, false, false, false);
                schema.AddColumn(Columns.IsProduct, typeof(bool), 0, 0, 0, false, false, false, false);
                schema.AddColumn(Columns.IsPremium, typeof(bool), 0, 0, 0, false, false, false, false);
                schema.AddColumn(Columns.Precent, typeof(int), 0, 0, 0, false, false, false, 0);
                schema.AddColumn(Columns.SumPerMonth, typeof(int), 0, 0, 0, false, false, false, 0);
                schema.AddColumn(Columns.MaxWinningsNum, typeof(int), 0, 0, 0, false, false, false, 0);
                schema.AddColumn(Columns.Status, typeof(bool), 0, 0, 0, false, false, false, true);
                schema.AddColumn(Columns.StatusJoinBid, typeof(bool), 0, 0, 0, false, false, false, false);
                schema.AddColumn(Columns.AllowChangeStatusJoinBid, typeof(bool), 0, 0, 0, false, false, false, false);
                schema.AddColumn(Columns.IsDeleted, typeof(bool), 0, 0, 0, false, false, false, false);
                schema.AddColumn(Columns.IsAdv, typeof(bool), 0, 0, 0, false, false, false, false);
                schema.AddColumn(Columns.CreateDate, typeof(DateTime), 0, 0, 0, false, false, false, DateTime.MinValue);
                schema.AddColumn(Columns.Description, typeof(string), DataType.Char, 1024, 0, 0, false, false, false, string.Empty);
                schema.AddColumn(Columns.Discount, typeof(string), DataType.Char, 255, 0, 0, false, false, false, string.Empty);
                schema.AddColumn(Columns.ApprovedTermsDate, typeof(DateTime?), 0, 0, 0, false, false, false, null);

                _TableSchema = schema;

                schema.AddIndex("ix_AppSupplier_UniqueIdString", TableSchema.ClusterMode.None, TableSchema.IndexMode.Unique, TableSchema.IndexType.None, Columns.UniqueIdString);
                schema.AddIndex("ix_AppSupplier_SupplierId", TableSchema.ClusterMode.None, TableSchema.IndexMode.None, TableSchema.IndexType.None, Columns.SupplierId);
                schema.AddIndex("ix_AppSupplier_CityId", TableSchema.ClusterMode.None, TableSchema.IndexMode.None, TableSchema.IndexType.None, Columns.CityId);

                schema.AddForeignKey("fk_AppSupplier_CityId", AppSupplier.Columns.CityId, City.TableSchema.SchemaName, City.Columns.CityId, TableSchema.ForeignKeyReference.None, TableSchema.ForeignKeyReference.None);
            }

            return(_TableSchema);
        }
Exemplo n.º 10
0
        public override TableSchema GetTableSchema()
        {
            if (null == _TableSchema)
            {
                TableSchema schema = new TableSchema();
                schema.SchemaName = @"tbl_Order";
                schema.AddColumn(Columns.OrderId, typeof(Int64), 0, 0, 0, true, true, false, null);
                schema.AddColumn(Columns.SpecialInstructions, typeof(string), DataType.Char, 255, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.AppUserId, typeof(Int64), 0, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.DonationId, typeof(Int64), 0, 0, 0, false, false, true, null);
                schema.AddColumn(Columns.BidId, typeof(Int64), 0, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.CampaignId, typeof(Int64), 0, 0, 0, false, false, true, null);
                schema.AddColumn(Columns.IsSendRecived, typeof(bool), 0, 0, 0, false, false, false, false);
                schema.AddColumn(Columns.IsSendRateSupplier, typeof(bool), 0, 0, 0, false, false, false, false);
                schema.AddColumn(Columns.Last4Digits, typeof(string), DataType.Char, 4, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.ExpiryDate, typeof(string), DataType.Char, 4, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.SupplierRemarks, typeof(string), DataType.Char, 255, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.Transaction, typeof(string), DataType.Char, 255, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.TransactionErrorMessage, typeof(string), DataType.Char, 255, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.TransactionResponseCode, typeof(string), DataType.Char, 128, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.TransactionStatus, typeof(OrderStatus), 0, 0, 0, false, false, false, OrderStatus.NotPayed);
                schema.AddColumn(Columns.PaySupplierStatus, typeof(PaymentStatus), 0, 0, 0, false, false, false, PaymentStatus.NotPayed);
                schema.AddColumn(Columns.UserPaySupplierStatus, typeof(UserPaymentStatus), 0, 0, 0, false, false, false, UserPaymentStatus.NotPayed);
                schema.AddColumn(Columns.SuppliedDate, typeof(DateTime), 0, 0, 0, false, false, true, null);
                schema.AddColumn(Columns.ReceivedDate, typeof(DateTime), 0, 0, 0, false, false, true, null);
                schema.AddColumn(Columns.TotalPrice, typeof(decimal), 0, 0, 0, false, false, false, 0);
                schema.AddColumn(Columns.PriceAfterDiscount, typeof(decimal), 0, 0, 0, false, false, false, 0);
                schema.AddColumn(Columns.PrecentDiscount, typeof(decimal), 0, 0, 0, false, false, false, 0);
                schema.AddColumn(Columns.Remarks, typeof(string), DataType.Char, 255, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.CreateDate, typeof(DateTime), 0, 0, 0, false, false, false, DateTime.MinValue);
                schema.AddColumn(Columns.SupplierId, typeof(Int64), 0, 0, 0, false, false, true, null);
                schema.AddColumn(Columns.Gifts, typeof(string), DataType.Char, 255, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.AuthNumber, typeof(string), DataType.VarChar, 20, 0, 0, false, false, true, null);
                schema.AddColumn(Columns.NumOfPayments, typeof(int), 0, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.Source, typeof(int), 0, 0, 0, false, false, false, 0);

                _TableSchema = schema;

                schema.AddIndex("ix_Order_OrderId", TableSchema.ClusterMode.None, TableSchema.IndexMode.None, TableSchema.IndexType.None, Columns.OrderId);
                schema.AddIndex("ix_Order_AppUserId", TableSchema.ClusterMode.None, TableSchema.IndexMode.None, TableSchema.IndexType.None, Columns.AppUserId);
                schema.AddIndex("ix_Order_BidId", TableSchema.ClusterMode.None, TableSchema.IndexMode.None, TableSchema.IndexType.None, Columns.BidId);

                schema.AddForeignKey("fk_Order_BidId", Order.Columns.BidId, Bid.TableSchema.SchemaName, Bid.Columns.BidId, TableSchema.ForeignKeyReference.Cascade, TableSchema.ForeignKeyReference.Cascade);
                schema.AddForeignKey("fk_Order_SupplierId", Order.Columns.SupplierId, AppSupplier.TableSchema.SchemaName, AppSupplier.Columns.SupplierId, TableSchema.ForeignKeyReference.None, TableSchema.ForeignKeyReference.None);
                schema.AddForeignKey("fk_Order_AppUserId", Order.Columns.AppUserId, AppUser.TableSchema.SchemaName, AppUser.Columns.AppUserId, TableSchema.ForeignKeyReference.Cascade, TableSchema.ForeignKeyReference.Cascade);
                schema.AddForeignKey("fk_Order_CampaignId", Order.Columns.CampaignId, Campaign.TableSchema.SchemaName, Campaign.Columns.CampaignId, TableSchema.ForeignKeyReference.None, TableSchema.ForeignKeyReference.None);
            }

            return(_TableSchema);
        }
Exemplo n.º 11
0
        public override TableSchema GetTableSchema()
        {
            if (null == _TableSchema)
            {
                TableSchema schema = new TableSchema();
                schema.SchemaName = @"Campaign";
                schema.AddColumn(Columns.CampaignId, typeof(Int64), 0, 0, 0, true, true, false, null);
                schema.AddColumn(Columns.IsDiscount, typeof(bool), 0, 0, 0, false, false, false, false);
                schema.AddColumn(Columns.PrecentDiscount, typeof(Int32), 0, 0, 0, false, false, false, 0);
                schema.AddColumn(Columns.IsGift, typeof(bool), 0, 0, 0, false, false, false, false);
                schema.AddColumn(Columns.CampaignName, typeof(string), DataType.Char, 255, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.Remarks, typeof(string), DataType.Char, 255, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.StartDate, typeof(DateTime), 0, 0, 0, false, false, false, DateTime.MinValue);
                schema.AddColumn(Columns.EndDate, typeof(DateTime), 0, 0, 0, false, false, false, DateTime.MinValue);
                schema.AddColumn(Columns.DestinationCount, typeof(Int32), 0, 0, 0, false, false, false, 0);
                schema.AddColumn(Columns.DestinationSum, typeof(decimal), 0, 0, 0, false, false, false, 0);
                schema.AddColumn(Columns.ImplemationCount, typeof(Int32), 0, 0, 0, false, false, false, 0);

                _TableSchema = schema;

                schema.AddIndex("ix_Campaign_CampaignId", TableSchema.ClusterMode.None, TableSchema.IndexMode.None, TableSchema.IndexType.None, Columns.CampaignId);
            }

            return(_TableSchema);
        }
Exemplo n.º 12
0
        public override TableSchema GetTableSchema()
        {
            if (null == _TableSchema)
            {
                TableSchema schema = new TableSchema();
                schema.SchemaName = @"AppUser";
                schema.AddColumn(Columns.AppUserId, typeof(Int64), 0, 0, 0, true, true, false, null);
                schema.AddColumn(Columns.Email, typeof(string), 64, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.UniqueIdString, typeof(string), 64, 0, 0, false, false, true, null);
                schema.AddColumn(Columns.LastLogin, typeof(DateTime), 0, 0, 0, false, false, false, DateTime.MinValue);
                schema.AddColumn(Columns.CreateDate, typeof(DateTime), 0, 0, 0, false, false, false, DateTime.MinValue);
                schema.AddColumn(Columns.IsLocked, typeof(bool), 0, 0, 0, false, false, false, false);
                schema.AddColumn(Columns.IsVerified, typeof(bool), 0, 0, 0, false, false, false, true);
                schema.AddColumn(Columns.BadLoginTries, typeof(int), 0, 0, 0, false, false, false, 0);
                schema.AddColumn(Columns.FacebookId, typeof(Int64), 0, 0, 0, false, false, true, null);
                schema.AddColumn(Columns.FacebookToken, typeof(string), 255, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.Password, typeof(string), 128, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.PasswordSalt, typeof(string), 64, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.PasswordRecoveryKey, typeof(string), 128, 0, 0, false, false, false, string.Empty);
                schema.AddColumn(Columns.PasswordRecoveryDate, typeof(DateTime), 0, 0, 0, false, false, false, DateTime.MinValue);
                schema.AddColumn(Columns.LangCode, typeof(string), 16, 0, 0, false, false, false, string.Empty);
                schema.AddColumn(Columns.Gender, typeof(AppUserGender), 0, 0, 0, false, false, false, AppUserGender.Unknown);
                schema.AddColumn(Columns.UnreadNotificationCount, typeof(Int32), 0, 0, 0, false, false, false, 0);
                schema.AddColumn(Columns.ProfileImage, typeof(string), 255, 0, 0, false, false, false, string.Empty);
                schema.AddColumn(Columns.FirstName, typeof(string), 64, 0, 0, false, false, false, string.Empty);
                schema.AddColumn(Columns.LastName, typeof(string), 64, 0, 0, false, false, false, string.Empty);
                schema.AddColumn(Columns.HouseNum, typeof(string), 16, 0, 0, false, false, false, string.Empty);
                schema.AddColumn(Columns.Street, typeof(string), 16, 0, 0, false, false, false, string.Empty);
                schema.AddColumn(Columns.CityId, typeof(Int64), 0, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.ApartmentNumber, typeof(string), 64, 0, 0, false, false, false, string.Empty);
                schema.AddColumn(Columns.Phone, typeof(string), 64, 0, 0, false, false, false, string.Empty);
                schema.AddColumn(Columns.Floor, typeof(string), 64, 0, 0, false, false, false, string.Empty);
                schema.AddColumn(Columns.AddressLocation, typeof(Geometry.Point), DataType.Point, 0, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.IsAdv, typeof(bool), 0, 0, 0, false, false, false, false);
                schema.AddColumn(Columns.IsDeleted, typeof(bool), 0, 0, 0, false, false, false, false);
                schema.AddColumn(Columns.OrderDisplay, typeof(int), 0, 0, 0, false, false, false, 0);

                _TableSchema = schema;

                schema.AddIndex("ix_AppUser_UniqueIdString", TableSchema.ClusterMode.None, TableSchema.IndexMode.Unique, TableSchema.IndexType.None, Columns.UniqueIdString);
                schema.AddIndex("ix_AppUser_FacebookId", TableSchema.ClusterMode.None, TableSchema.IndexMode.Unique, TableSchema.IndexType.None, Columns.FacebookId);
                schema.AddIndex("ix_AppUser_AddressLocation", TableSchema.ClusterMode.None, TableSchema.IndexMode.Spatial, TableSchema.IndexType.None, Columns.AddressLocation);
            }

            return(_TableSchema);
        }
Exemplo n.º 13
0
        public override TableSchema GetTableSchema()
        {
            if (null == _TableSchema)
            {
                TableSchema schema = new TableSchema();
                schema.SchemaName = @"tbl_Message";
                schema.AddColumn(Columns.MessageId, typeof(Int64), 0, 0, 0, true, true, false, null);
                schema.AddColumn(Columns.Description, typeof(string), DataType.Char, 1000, 0, 0, false, false, false, string.Empty);
                schema.AddColumn(Columns.SendingDate, typeof(DateTime), 0, 0, 0, false, false, false, DateTime.Now);

                _TableSchema = schema;

                schema.AddIndex("ik_Message_Id", TableSchema.ClusterMode.None, TableSchema.IndexMode.None, TableSchema.IndexType.None, Columns.MessageId);
                schema.AddIndex("ix_Message_Date", TableSchema.ClusterMode.None, TableSchema.IndexMode.None, TableSchema.IndexType.None, Columns.SendingDate, SortDirection.ASC);
            }

            return(_TableSchema);
        }
        public override TableSchema GetTableSchema()
        {
            if (null == _TableSchema)
            {
                TableSchema schema = new TableSchema();
                schema.SchemaName = @"AppSupplierAPNSToken";
                schema.AddColumn(Columns.SupplierId, typeof(Int64), 0, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.Token, typeof(string), DataType.Char, 64, 0, 0, false, false, false, null);

                _TableSchema = schema;

                schema.AddIndex("ix_AppSupplierAPNSToken_AppSupplierIdToken", TableSchema.ClusterMode.None, TableSchema.IndexMode.PrimaryKey, TableSchema.IndexType.None, Columns.SupplierId, Columns.Token);
                schema.AddIndex("ix_AppSupplierAPNSToken_AppSupplierId", TableSchema.ClusterMode.None, TableSchema.IndexMode.None, TableSchema.IndexType.None, Columns.SupplierId);
                schema.AddIndex("ix_AppSupplierAPNSToken_Token", TableSchema.ClusterMode.None, TableSchema.IndexMode.None, TableSchema.IndexType.None, Columns.Token);

                schema.AddForeignKey("fk_AppSupplierAPNSToken_AppSupplierId", AppSupplierAPNSToken.Columns.SupplierId, AppSupplier.TableSchema.SchemaName, AppSupplier.Columns.SupplierId, TableSchema.ForeignKeyReference.Cascade, TableSchema.ForeignKeyReference.Cascade);
            }

            return(_TableSchema);
        }
Exemplo n.º 15
0
        public override TableSchema GetTableSchema()
        {
            if (null == _TableSchema)
            {
                TableSchema schema = new TableSchema();
                schema.SchemaName = @"BidProduct";
                schema.AddColumn(Columns.BidId, typeof(Int64), 0, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.ProductId, typeof(Int64), 0, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.Amount, typeof(Int32), 0, 0, 0, false, false, false, 1);
                schema.AddColumn(Columns.Price, typeof(decimal), 0, 0, 0, false, false, false, null);

                _TableSchema = schema;

                schema.AddIndex("pk_BidProduct_BidId_ProductId", TableSchema.ClusterMode.None, TableSchema.IndexMode.None, TableSchema.IndexType.None);
                schema.AddIndex("ix_BidProduct_BidId", TableSchema.ClusterMode.None, TableSchema.IndexMode.None, TableSchema.IndexType.None, Columns.BidId);
                schema.AddIndex("ix_BidProduct_ProductId", TableSchema.ClusterMode.None, TableSchema.IndexMode.None, TableSchema.IndexType.None, Columns.ProductId);
            }

            return(_TableSchema);
        }
Exemplo n.º 16
0
        public override TableSchema GetTableSchema()
        {
            if (null == _TableSchema)
            {
                TableSchema schema = new TableSchema();
                schema.SchemaName = @"ProductAnimal";
                schema.AddColumn(Columns.ProductId, typeof(Int64), 0, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.AnimalId, typeof(Int64), 0, 0, 0, false, false, false, null);

                _TableSchema = schema;

                schema.AddIndex("pk_ProductAnimal", TableSchema.ClusterMode.None, TableSchema.IndexMode.PrimaryKey, TableSchema.IndexType.None, Columns.ProductId, Columns.AnimalId);
                schema.AddIndex("ix_ProductAnimal_ProductId", TableSchema.ClusterMode.None, TableSchema.IndexMode.None, TableSchema.IndexType.None, Columns.ProductId);
                schema.AddIndex("ix_ProductAnimal_AnimalId", TableSchema.ClusterMode.None, TableSchema.IndexMode.None, TableSchema.IndexType.None, Columns.AnimalId);

                schema.AddForeignKey("fk_ProductAnimal_ProductId", ProductAnimal.Columns.ProductId, Product.TableSchema.SchemaName, Product.Columns.ProductId, TableSchema.ForeignKeyReference.Cascade, TableSchema.ForeignKeyReference.Cascade);
                schema.AddForeignKey("fk_ProductAnimal_AnimalId", ProductAnimal.Columns.AnimalId, Animal.TableSchema.SchemaName, Animal.Columns.AnimalId, TableSchema.ForeignKeyReference.Cascade, TableSchema.ForeignKeyReference.Cascade);
            }

            return(_TableSchema);
        }
Exemplo n.º 17
0
        public override TableSchema GetTableSchema()
        {
            if (null == _TableSchema)
            {
                TableSchema schema = new TableSchema();
                schema.SchemaName = @"SupplierService";
                schema.AddColumn(Columns.ServiceId, typeof(Int64), 0, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.SupplierId, typeof(Int64), 0, 0, 0, false, false, false, null);

                _TableSchema = schema;

                schema.AddIndex("pk_SupplierService", TableSchema.ClusterMode.None, TableSchema.IndexMode.PrimaryKey, TableSchema.IndexType.None, Columns.ServiceId, Columns.SupplierId);
                schema.AddIndex("ix_SupplierService_SupplierId", TableSchema.ClusterMode.None, TableSchema.IndexMode.None, TableSchema.IndexType.None, Columns.SupplierId);
                schema.AddIndex("ix_SupplierService_ServiceId", TableSchema.ClusterMode.None, TableSchema.IndexMode.None, TableSchema.IndexType.None, Columns.ServiceId);

                schema.AddForeignKey("fk_SupplierService_ServiceId", SupplierService.Columns.ServiceId, Service.TableSchema.SchemaName, Service.Columns.ServiceId, TableSchema.ForeignKeyReference.Cascade, TableSchema.ForeignKeyReference.Cascade);
                schema.AddForeignKey("fk_SupplierService_SupplierId", SupplierService.Columns.SupplierId, AppSupplier.TableSchema.SchemaName, AppSupplier.Columns.SupplierId, TableSchema.ForeignKeyReference.Cascade, TableSchema.ForeignKeyReference.Cascade);
            }

            return(_TableSchema);
        }
Exemplo n.º 18
0
        public override TableSchema GetTableSchema()
        {
            if (null == _TableSchema)
            {
                TableSchema schema = new TableSchema();
                schema.SchemaName = @"UserPermissionMap";
                schema.AddColumn(Columns.UserId, typeof(Int32), 0, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.PermissionId, typeof(Int32), 0, 0, 0, false, false, false, null);

                _TableSchema = schema;

                schema.AddIndex("pk_UserPermissionMap_UserIdPermissionId", TableSchema.ClusterMode.None, TableSchema.IndexMode.PrimaryKey, TableSchema.IndexType.None, Columns.UserId, Columns.PermissionId);
                schema.AddIndex("ix_UserPermissionMap_UserId", TableSchema.ClusterMode.None, TableSchema.IndexMode.None, TableSchema.IndexType.None, Columns.UserId);
                schema.AddIndex("ix_UserPermissionMap_PermissionId", TableSchema.ClusterMode.None, TableSchema.IndexMode.None, TableSchema.IndexType.None, Columns.PermissionId);

                schema.AddForeignKey("fk_UserPermissionMap_UserId", UserPermissionMap.Columns.UserId, User.TableSchema.SchemaName, User.Columns.UserId, TableSchema.ForeignKeyReference.Cascade, TableSchema.ForeignKeyReference.Cascade);
                schema.AddForeignKey("fk_UserPermissionMap_PermissionId", UserPermissionMap.Columns.PermissionId, Permission.TableSchema.SchemaName, Permission.Columns.PermissionId, TableSchema.ForeignKeyReference.Cascade, TableSchema.ForeignKeyReference.Cascade);

            }

            return _TableSchema;
        }
Exemplo n.º 19
0
        public override TableSchema GetTableSchema()
        {
            if (null == _TableSchema)
            {
                TableSchema schema = new TableSchema();
                schema.SchemaName = @"SubCategoryFilter";
                schema.AddColumn(Columns.SubCategoryId, typeof(Int64), 0, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.FilterId, typeof(Int64), 0, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.CategoryId, typeof(Int64), 0, 0, 0, false, false, false, null);

                _TableSchema = schema;

                schema.AddIndex("pk_SubCategoryFilter", TableSchema.ClusterMode.None, TableSchema.IndexMode.PrimaryKey, TableSchema.IndexType.None, Columns.SubCategoryId, Columns.FilterId, Columns.CategoryId);
                schema.AddIndex("ix_SubCategoryFilter_SubCategoryId", TableSchema.ClusterMode.None, TableSchema.IndexMode.None, TableSchema.IndexType.None, Columns.SubCategoryId);
                schema.AddIndex("ix_SubCategoryFilter_FilterId", TableSchema.ClusterMode.None, TableSchema.IndexMode.None, TableSchema.IndexType.None, Columns.FilterId);
                schema.AddIndex("ix_SubCategoryFilter_CategoryId", TableSchema.ClusterMode.None, TableSchema.IndexMode.None, TableSchema.IndexType.None, Columns.CategoryId);

                schema.AddForeignKey("fk_SubCategoryFilter_SubCategoryId", SubCategoryFilter.Columns.SubCategoryId, SubCategory.TableSchema.SchemaName, SubCategory.Columns.SubCategoryId, TableSchema.ForeignKeyReference.Cascade, TableSchema.ForeignKeyReference.Cascade);
                schema.AddForeignKey("fk_SubCategoryFilter_CategoryId", SubCategoryFilter.Columns.CategoryId, Category.TableSchema.SchemaName, Category.Columns.CategoryId, TableSchema.ForeignKeyReference.Cascade, TableSchema.ForeignKeyReference.Cascade);
                schema.AddForeignKey("fk_SubCategoryFilter_FilterId", SubCategoryFilter.Columns.FilterId, Filter.TableSchema.SchemaName, Filter.Columns.FilterId, TableSchema.ForeignKeyReference.Cascade, TableSchema.ForeignKeyReference.Cascade);
            }

            return(_TableSchema);
        }
Exemplo n.º 20
0
        public override TableSchema GetTableSchema()
        {
            if (null == _TableSchema)
            {
                TableSchema schema = new TableSchema();
                schema.SchemaName = @"Permission";
                schema.AddColumn(Columns.PermissionId, typeof(Int32), 0, 0, 0, true, true, false, null);
                schema.AddColumn(Columns.Key, typeof(string), DataType.Char, 64, 0, 0, false, false, false, null);

                _TableSchema = schema;

                schema.AddIndex("ix_Permission_Key", TableSchema.ClusterMode.None, TableSchema.IndexMode.Unique, TableSchema.IndexType.None, Columns.Key);
            }

            return(_TableSchema);
        }
Exemplo n.º 21
0
        public override TableSchema GetTableSchema()
        {
            if (null == _TableSchema)
            {
                TableSchema schema = new TableSchema();
                schema.SchemaName = @"Area";
                schema.AddColumn(Columns.AreaId, typeof(Int64), 0, 0, 0, true, true, false, null);
                schema.AddColumn(Columns.AreaName, typeof(string), DataType.Char, 64, 0, 0, false, false, false, null);

                _TableSchema = schema;

                schema.AddIndex("ix_Area_AreaId", TableSchema.ClusterMode.None, TableSchema.IndexMode.None, TableSchema.IndexType.None, Columns.AreaId);
            }

            return(_TableSchema);
        }
Exemplo n.º 22
0
        public override TableSchema GetTableSchema()
        {
            if (null == _TableSchema)
            {
                TableSchema schema = new TableSchema();
                schema.SchemaName = @"PriceFilter";
                schema.AddColumn(Columns.PriceId, typeof(Int64), 0, 0, 0, true, true, false, null);
                schema.AddColumn(Columns.PriceName, typeof(string), DataType.Char, 128, 0, 0, false, false, false, null);

                _TableSchema = schema;

                schema.AddIndex("ik_PriceFilter_PriceId", TableSchema.ClusterMode.None, TableSchema.IndexMode.None, TableSchema.IndexType.None, Columns.PriceId);
            }

            return(_TableSchema);
        }
Exemplo n.º 23
0
        public override TableSchema GetTableSchema()
        {
            if (null == _TableSchema)
            {
                TableSchema schema = new TableSchema();
                schema.SchemaName = @"TempAppUser";
                schema.AddColumn(Columns.TempAppUserId, typeof(Int64), 0, 0, 0, true, true, false, null);
                schema.AddColumn(Columns.CityId, typeof(Int64), 0, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.Location, typeof(Geometry.Point), DataType.Point, 0, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.DeviceUdid, typeof(string), DataType.Char, 255, 0, 0, false, false, false, null);

                _TableSchema = schema;

                schema.AddIndex("ix_TempAppUser", TableSchema.ClusterMode.None, TableSchema.IndexMode.None, TableSchema.IndexType.None, Columns.TempAppUserId);
            }

            return(_TableSchema);
        }
Exemplo n.º 24
0
        public override TableSchema GetTableSchema()
        {
            if (null == _TableSchema)
            {
                TableSchema schema = new TableSchema();
                schema.SchemaName = @"supplierevent";
                schema.AddColumn(Columns.id, typeof(Int64), 0, 0, 0, true, true, false, null);
                schema.AddColumn(Columns.SupplierId, typeof(Int64), 0, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.UserId, typeof(Int64), 0, 0, 0, false, false, true, null);
                schema.AddColumn(Columns.EventTime, typeof(DateTime), 0, 0, 0, false, false, false, DateTime.Now);
                schema.AddColumn(Columns.EventType, typeof(string), 0, 0, 0, false, false, false, null);

                schema.AddIndex("pk_SupplierEventId", TableSchema.ClusterMode.None, TableSchema.IndexMode.PrimaryKey, TableSchema.IndexType.None, Columns.id);
                _TableSchema = schema;
            }

            return(_TableSchema);
        }
Exemplo n.º 25
0
        public override TableSchema GetTableSchema()
        {
            if (null == _TableSchema)
            {
                TableSchema schema = new TableSchema();
                schema.SchemaName = @"Donation";
                schema.AddColumn(Columns.DonationId, typeof(Int64), 0, 0, 0, true, true, false, null);
                schema.AddColumn(Columns.DonationName, typeof(string), DataType.Char, 128, 0, 0, false, false, false, string.Empty);
                schema.AddColumn(Columns.DonationPrice, typeof(decimal), 0, 0, 0, false, false, false, 0);
                schema.AddColumn(Columns.DonationItem, typeof(string), DataType.Char, 128, 0, 0, false, false, false, string.Empty);

                _TableSchema = schema;

                schema.AddIndex("ix_Donation", TableSchema.ClusterMode.None, TableSchema.IndexMode.None, TableSchema.IndexType.None, Columns.DonationId);
            }

            return(_TableSchema);
        }
Exemplo n.º 26
0
        public override TableSchema GetTableSchema()
        {
            if (null == _TableSchema)
            {
                TableSchema schema = new TableSchema();
                schema.SchemaName = @"Service";
                schema.AddColumn(Columns.ServiceId, typeof(Int64), 0, 0, 0, true, true, false, null);
                schema.AddColumn(Columns.ServiceName, typeof(string), DataType.Char, 64, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.ServiceComment, typeof(string), DataType.Char, 255, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.IsHomeService, typeof(bool), 0, 0, 0, false, false, false, null);

                _TableSchema = schema;

                schema.AddIndex("ix_Service_ServiceName", TableSchema.ClusterMode.None, TableSchema.IndexMode.Unique, TableSchema.IndexType.None, Columns.ServiceName);
            }

            return(_TableSchema);
        }
Exemplo n.º 27
0
        public override TableSchema GetTableSchema()
        {
            if (null == _TableSchema)
            {
                TableSchema schema = new TableSchema();
                schema.SchemaName = @"Category";
                schema.AddColumn(Columns.CategoryId, typeof(Int64), 0, 0, 0, true, true, false, null);
                schema.AddColumn(Columns.CategoryName, typeof(string), 64, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.CategoryImage, typeof(string), 255, 0, 0, false, false, false, string.Empty);
                schema.AddColumn(Columns.CategoryRate, typeof(Int64), 0, 0, 0, false, false, false, null);

                _TableSchema = schema;

                schema.AddIndex("ix_Category_CategoryName", TableSchema.ClusterMode.None, TableSchema.IndexMode.Unique, TableSchema.IndexType.None, Columns.CategoryName);
            }

            return(_TableSchema);
        }
Exemplo n.º 28
0
        public override TableSchema GetTableSchema()
        {
            if (null == _TableSchema)
            {
                TableSchema schema = new TableSchema();
                schema.SchemaName = @"SubFilter";
                schema.AddColumn(Columns.SubFilterId, typeof(Int64), 0, 0, 0, true, true, false, null);
                schema.AddColumn(Columns.SubFilterName, typeof(string), 64, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.FilterId, typeof(Int64), 0, 0, 0, false, false, false, null);

                _TableSchema = schema;

                schema.AddIndex("ix_SubFilter_SubFilterName", TableSchema.ClusterMode.None, TableSchema.IndexMode.None, TableSchema.IndexType.None, Columns.SubFilterName);

                schema.AddForeignKey("fk_SubFilter_FilterId", SubFilter.Columns.FilterId, Filter.TableSchema.SchemaName, Filter.Columns.FilterId, TableSchema.ForeignKeyReference.Cascade, TableSchema.ForeignKeyReference.Cascade);
            }

            return(_TableSchema);
        }
Exemplo n.º 29
0
        public override TableSchema GetTableSchema()
        {
            if (null == _TableSchema)
            {
                TableSchema schema = new TableSchema();
                schema.SchemaName = @"City";
                schema.AddColumn(Columns.CityId, typeof(Int64), 0, 0, 0, true, true, false, null);
                schema.AddColumn(Columns.CityName, typeof(string), DataType.Char, 64, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.AreaId, typeof(Int64), 0, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.PromotedAreaId, typeof(int), 0, 0, 0, false, false, false, null);

                _TableSchema = schema;

                schema.AddIndex("ix_City_CityId", TableSchema.ClusterMode.None, TableSchema.IndexMode.None, TableSchema.IndexType.None, Columns.CityId);

                schema.AddForeignKey("fk_City_AreaId", City.Columns.AreaId, Area.TableSchema.SchemaName, Area.Columns.AreaId, TableSchema.ForeignKeyReference.Cascade, TableSchema.ForeignKeyReference.Cascade);
            }

            return(_TableSchema);
        }
Exemplo n.º 30
0
        public override TableSchema GetTableSchema()
        {
            if (null == _TableSchema)
            {
                TableSchema schema = new TableSchema();
                schema.SchemaName = @"AppUserAnimal";
                schema.AddColumn(Columns.AppUserId, typeof(Int64), 0, 0, 0, false, false, false, null);
                schema.AddColumn(Columns.AnimalName, typeof(string), DataType.Char, 128, 0, 0, false, false, false, string.Empty);
                schema.AddColumn(Columns.AnimalType, typeof(string), DataType.Char, 128, 0, 0, false, false, false, string.Empty);
                schema.AddColumn(Columns.AnimagAge, typeof(string), DataType.Char, 128, 0, 0, false, false, false, string.Empty);
                schema.AddColumn(Columns.AnimalImg, typeof(string), DataType.Char, 128, 0, 0, false, false, false, string.Empty);
                schema.AddColumn(Columns.CreatedOn, typeof(DateTime), 0, 0, 0, false, false, false, DateTime.MinValue);

                _TableSchema = schema;

                schema.AddIndex("pk_AppUserAnimal_AppUserId", TableSchema.ClusterMode.None, TableSchema.IndexMode.PrimaryKey, TableSchema.IndexType.None, Columns.AppUserId);

                schema.AddForeignKey("fk_AppUserAnimal_AppUserId", AppUserAnimal.Columns.AppUserId, AppUser.TableSchema.SchemaName, AppUser.Columns.AppUserId, TableSchema.ForeignKeyReference.Cascade, TableSchema.ForeignKeyReference.Cascade);
            }

            return(_TableSchema);
        }