Skip to content

Commit

Permalink
Bundling and model configuration added
Browse files Browse the repository at this point in the history
  • Loading branch information
Sharonsudhan committed Mar 28, 2014
1 parent 6c45c03 commit 73e9273
Show file tree
Hide file tree
Showing 39 changed files with 897 additions and 427 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.Entity.ModelConfiguration;
using SocialGoal.Model.Models;

namespace SocialGoal.Data.Configuration
{
public class ApplicationUserConfiguration : EntityTypeConfiguration<ApplicationUser>
{
public ApplicationUserConfiguration()
{
Property(c => c.Email).IsRequired().HasMaxLength(150);
Property(c => c.FirstName).IsRequired().HasMaxLength(1);
Property(c => c.LastName).HasMaxLength(100);
Property(c => c.Email).HasMaxLength(250);
}

}
}
18 changes: 18 additions & 0 deletions source/SocialGoal.Data/Configuration/CommentConfiguration.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.Entity.ModelConfiguration;
using SocialGoal.Model.Models;

namespace SocialGoal.Data.Configuration
{
public class CommentConfiguration:EntityTypeConfiguration<Comment>
{
public CommentConfiguration()
{
Property(c => c.CommentText).HasMaxLength(250);
}
}
}
19 changes: 19 additions & 0 deletions source/SocialGoal.Data/Configuration/CommentUserConfiguration.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.Entity.ModelConfiguration;
using SocialGoal.Model.Models;

namespace SocialGoal.Data.Configuration
{
public class CommentUserConfiguration : EntityTypeConfiguration<CommentUser>
{
public CommentUserConfiguration()
{
Property(c => c.CommentId).IsRequired();
Property(c => c.UserId).IsRequired();
}
}
}
18 changes: 18 additions & 0 deletions source/SocialGoal.Data/Configuration/FocusConfiguration.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.Entity.ModelConfiguration;
using SocialGoal.Model.Models;
namespace SocialGoal.Data.Configuration
{
public class FocusConfiguration:EntityTypeConfiguration<Focus>
{
public FocusConfiguration()
{
Property(f => f.FocusName).HasMaxLength(50);
Property(f => f.Description).HasMaxLength(100);
}
}
}
20 changes: 20 additions & 0 deletions source/SocialGoal.Data/Configuration/FollowRequestConfiguration.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.Entity.ModelConfiguration;
using SocialGoal.Model.Models;

namespace SocialGoal.Data.Configuration
{
public class FollowRequestConfiguration: EntityTypeConfiguration<FollowRequest>
{
public FollowRequestConfiguration()
{
Property(f => f.FromUserId).IsRequired();
Property(f => f.ToUserId).IsRequired();
Property(f => f.Accepted).IsRequired();
}
}
}
19 changes: 19 additions & 0 deletions source/SocialGoal.Data/Configuration/FollowUserConfiguration.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.Entity.ModelConfiguration;
using SocialGoal.Model.Models;

namespace SocialGoal.Data.Configuration
{
public class FollowUserConfiguration: EntityTypeConfiguration<FollowUser>
{
public FollowUserConfiguration()
{
Property(f => f.Accepted).IsRequired();
Property(f => f.AddedDate).IsRequired();
}
}
}
24 changes: 24 additions & 0 deletions source/SocialGoal.Data/Configuration/GoalConfiguration.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.Entity.ModelConfiguration;
using SocialGoal.Model.Models;

namespace SocialGoal.Data.Configuration
{
public class GoalConfiguration: EntityTypeConfiguration<Goal>
{
public GoalConfiguration()
{
Property(g => g.GoalName).IsRequired().HasMaxLength(55);
Property(g => g.GoalType).IsRequired();
Property(g => g.GoalStatusId).IsRequired();
Property(g => g.StartDate).IsRequired();
Property(g => g.EndDate).IsRequired();
Property(g => g.CreatedDate).IsRequired();
Property(g => g.Desc).HasMaxLength(100);
}
}
}
18 changes: 18 additions & 0 deletions source/SocialGoal.Data/Configuration/GoalStatusConfiguration.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.Entity.ModelConfiguration;
using SocialGoal.Model.Models;

namespace SocialGoal.Data.Configuration
{
public class GoalStatusConfiguration: EntityTypeConfiguration<GoalStatus>
{
public GoalStatusConfiguration()
{
Property(g => g.GoalStatusType).HasMaxLength(50);
}
}
}
20 changes: 20 additions & 0 deletions source/SocialGoal.Data/Configuration/GoalUpdateConfiguration.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.Entity.ModelConfiguration;
using SocialGoal.Model.Models;

namespace SocialGoal.Data.Configuration
{
public class GoalUpdateConfiguration : EntityTypeConfiguration<GoalUpdate>
{
public GoalUpdateConfiguration()
{
Property(g => g.Updatemsg).HasMaxLength(50);
Property(g => g.GoalId).IsRequired();

}
}
}
21 changes: 21 additions & 0 deletions source/SocialGoal.Data/Configuration/GroupCommentConfiguration.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.Entity.ModelConfiguration;
using SocialGoal.Model.Models;


namespace SocialGoal.Data.Configuration
{
public class GroupCommentConfiguration: EntityTypeConfiguration<GroupComment>
{
public GroupCommentConfiguration()
{
Property(g => g.GroupUpdateId).IsRequired();
Property(g => g.CommentText).IsMaxLength();
Property(g => g.CommentDate).IsRequired();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.Entity.ModelConfiguration;
using SocialGoal.Model.Models;

namespace SocialGoal.Data.Configuration
{
public class GroupCommentUserConfguration:EntityTypeConfiguration<GroupCommentUser>
{
public GroupCommentUserConfguration()
{
Property(g => g.GroupCommentId).IsRequired();
Property(g => g.UserId).IsRequired();
}
}
}
20 changes: 20 additions & 0 deletions source/SocialGoal.Data/Configuration/GroupConfiguration.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.Entity.ModelConfiguration;
using SocialGoal.Model.Models;

namespace SocialGoal.Data.Configuration
{
public class GroupConfiguration: EntityTypeConfiguration<Group>
{
public GroupConfiguration()
{
Property(g => g.GroupName).HasMaxLength(50);
Property(g => g.CreatedDate).IsRequired();
Property(g => g.Description).IsMaxLength();
}
}
}
25 changes: 25 additions & 0 deletions source/SocialGoal.Data/Configuration/GroupGoalConfiguration.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.Entity.ModelConfiguration;
using SocialGoal.Model.Models;

namespace SocialGoal.Data.Configuration
{
public class GroupGoalConfiguration: EntityTypeConfiguration<GroupGoal>
{
public GroupGoalConfiguration()
{
Property(g => g.GroupId).IsRequired();
Property(g => g.GoalName).HasMaxLength(50);
Property(g => g.Description).HasMaxLength(100);
Property(g => g.StartDate).IsRequired();
Property(g => g.EndDate).IsRequired();
Property(g => g.GoalStatusId).IsRequired();
Property(g => g.GroupUserId).IsRequired();
Property(g => g.AssignedTo).IsRequired();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.Entity.ModelConfiguration;
using SocialGoal.Model.Models;

namespace SocialGoal.Data.Configuration
{
public class GroupInvitationConfiguration: EntityTypeConfiguration<GroupInvitation>
{
public GroupInvitationConfiguration()
{
Property(g => g.FromUserId).IsMaxLength();
Property(g => g.ToUserId).IsMaxLength();
Property(g => g.GroupId).IsRequired();
Property(g => g.SentDate).IsRequired();
Property(g => g.Accepted).IsRequired();
}
}
}
20 changes: 20 additions & 0 deletions source/SocialGoal.Data/Configuration/GroupRequestConfiguration.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.Entity.ModelConfiguration;
using SocialGoal.Model.Models;

namespace SocialGoal.Data.Configuration
{
public class GroupRequestConfiguration : EntityTypeConfiguration<GroupRequest>
{
public GroupRequestConfiguration()
{
Property(g => g.GroupId).IsRequired();
Property(g => g.UserId).HasMaxLength(128);
Property(g => g.Accepted).IsRequired();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.Entity.ModelConfiguration;
using SocialGoal.Model.Models;

namespace SocialGoal.Data.Configuration
{
public class GroupUpdateSupportConfiguration:EntityTypeConfiguration<GroupUpdateSupport>
{
public GroupUpdateSupportConfiguration()
{
Property(g => g.GroupUpdateId).IsRequired();
Property(g => g.GroupUserId).IsRequired();
Property(g => g.UpdateSupportedDate).IsRequired();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.Entity.ModelConfiguration;
using SocialGoal.Model.Models;

namespace SocialGoal.Data.Configuration
{
public class GroupUpdateUserConfiguration:EntityTypeConfiguration<GroupUpdateUser>
{
public GroupUpdateUserConfiguration()
{
Property(g => g.GroupUpdateUserId).IsRequired();
Property(g => g.UserId).IsRequired();
}
}
}
22 changes: 22 additions & 0 deletions source/SocialGoal.Data/Configuration/GroupUserConfiguration.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.Entity.ModelConfiguration;
using SocialGoal.Model.Models;

namespace SocialGoal.Data.Configuration
{
public class GroupUserConfiguration:EntityTypeConfiguration<GroupUser>
{
public GroupUserConfiguration()
{
Property(g => g.GroupId).IsRequired();
Property(g => g.UserId).IsRequired().IsMaxLength();
Property(g => g.Admin).IsRequired();
Property(g => g.AddedDate).IsRequired();

}
}
}
Loading

0 comments on commit 73e9273

Please sign in to comment.