forked from MarlabsInc/SocialGoal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bundling and model configuration added
- Loading branch information
1 parent
6c45c03
commit 73e9273
Showing
39 changed files
with
897 additions
and
427 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
source/SocialGoal.Data/Configuration/ApplicationUserConfiguration.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
18
source/SocialGoal.Data/Configuration/CommentConfiguration.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
19
source/SocialGoal.Data/Configuration/CommentUserConfiguration.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
18
source/SocialGoal.Data/Configuration/FocusConfiguration.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
20
source/SocialGoal.Data/Configuration/FollowRequestConfiguration.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
19
source/SocialGoal.Data/Configuration/FollowUserConfiguration.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
18
source/SocialGoal.Data/Configuration/GoalStatusConfiguration.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
20
source/SocialGoal.Data/Configuration/GoalUpdateConfiguration.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
21
source/SocialGoal.Data/Configuration/GroupCommentConfiguration.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
source/SocialGoal.Data/Configuration/GroupCommentUserConfguration.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
20
source/SocialGoal.Data/Configuration/GroupConfiguration.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
25
source/SocialGoal.Data/Configuration/GroupGoalConfiguration.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
source/SocialGoal.Data/Configuration/GroupInvitationConfiguration.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
20
source/SocialGoal.Data/Configuration/GroupRequestConfiguration.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
source/SocialGoal.Data/Configuration/GroupUpdateSupportConfiguration.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
source/SocialGoal.Data/Configuration/GroupUpdateUserConfiguration.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
22
source/SocialGoal.Data/Configuration/GroupUserConfiguration.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
|
||
} | ||
} | ||
} |
Oops, something went wrong.