using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; using MTWorkHR.Core.Entities; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace MTWorkHR.Infrastructure.Configurations { public class PermissionConfiguration : IEntityTypeConfiguration { public void Configure(EntityTypeBuilder builder) { builder.HasData ( #region Project new Permission() { Id = 1, Name = "Project", Desc = "Project", Show = true, CategoryName = "User" }, new Permission() { Id = 2, Name = "Project.Create", Desc = "Project.Create", CategoryName = "User" }, new Permission() { Id = 3, Name = "Project.Update", Desc = "Project.Update", CategoryName = "User" }, new Permission() { Id = 4, Name = "Project.Delete", Desc = "Project.Delete", CategoryName = "User" }, #endregion #region Meeting new Permission() { Id = 5, Name = "Meeting", Desc = "Meeting", Show = true, CategoryName = "User" }, new Permission() { Id = 6, Name = "Meeting.Create", Desc = "Meeting.Create", CategoryName = "User" }, new Permission() { Id = 7, Name = "Meeting.Update", Desc = "Meeting.Update", CategoryName = "User" }, new Permission() { Id = 8, Name = "Meeting.Delete", Desc = "Meeting.Delete", CategoryName = "User" }, #endregion #region Team new Permission() { Id = 9, Name = "Team", Desc = "Team", Show = true, CategoryName = "User" }, new Permission() { Id = 10, Name = "Team.Create", Desc = "Team.Create", CategoryName = "User" }, new Permission() { Id = 11, Name = "Team.Update", Desc = "Team.Update", CategoryName = "User" }, new Permission() { Id = 12, Name = "Team.Delete", Desc = "Team.Delete", CategoryName = "User" }, #endregion #region UserTask new Permission() { Id = 13, Name = "UserTask", Desc = "UserTask", Show = true, CategoryName = "Sales" }, new Permission() { Id = 14, Name = "UserTask.Create", Desc = "UserTask.Create", CategoryName = "Sales" }, new Permission() { Id = 15, Name = "UserTask.Update", Desc = "UserTask.Update", CategoryName = "Sales" }, new Permission() { Id = 16, Name = "UserTask.Delete", Desc = "UserTask.Delete", CategoryName = "User" }, #endregion #region Company new Permission() { Id = 17, Name = "Company", Desc = "Company", Show = true, CategoryName = "User" }, new Permission() { Id = 18, Name = "Company.Create", Desc = "Company.Create", CategoryName = "User" }, new Permission() { Id = 19, Name = "Company.Update", Desc = "Company.Update", CategoryName = "User" }, new Permission() { Id = 20, Name = "Company.Delete", Desc = "Company.Delete", CategoryName = "User" }, new Permission() { Id = 21, Name = "Company.Suspend", Desc = "Company.Suspend", CategoryName = "User" }, #endregion #region User new Permission() { Id = 22, Name = "User", Desc = "User", Show = true, CategoryName = "Adminstration" }, new Permission() { Id = 23, Name = "User.Create", Desc = "User.Create", CategoryName = "Adminstration" }, new Permission() { Id = 24, Name = "User.Update", Desc = "User.Update", CategoryName = "Adminstration" }, new Permission() { Id = 25, Name = "User.Delete", Desc = "User.Delete", CategoryName = "Adminstration" }, new Permission() { Id = 26, Name = "User.Suspend", Desc = "User.Suspend", CategoryName = "Adminstration" }, #endregion #region Role new Permission() { Id = 27, Name = "Role", Desc = "Role", Show = true, CategoryName = "Adminstration" }, new Permission() { Id = 28, Name = "Role.Create", Desc = "Role.Create", CategoryName = "Adminstration" }, new Permission() { Id = 29, Name = "Role.Update", Desc = "Role.Update", CategoryName = "Adminstration" }, new Permission() { Id = 30, Name = "Role.Delete", Desc = "Role.Delete", CategoryName = "Adminstration" }, #endregion #region Attendance new Permission() { Id = 31, Name = "Attendance", Desc = "Attendance", Show = true, CategoryName = "Adminstration" }, new Permission() { Id = 32, Name = "Attendance.Create", Desc = "Attendance.Create", CategoryName = "Adminstration" }, new Permission() { Id = 33, Name = "Attendance.Update", Desc = "Attendance.Update", CategoryName = "Adminstration" }, new Permission() { Id = 34, Name = "Attendance.Delete", Desc = "Attendance.Delete", CategoryName = "Adminstration" }, #endregion #region Contract new Permission() { Id = 35, Name = "Contract", Desc = "Contract", Show = true, CategoryName = "Adminstration" }, new Permission() { Id = 36, Name = "Contract.Create", Desc = "Contract.Create", CategoryName = "Adminstration" }, new Permission() { Id = 37, Name = "Contract.Update", Desc = "Contract.Update", CategoryName = "Adminstration" }, new Permission() { Id = 38, Name = "Contract.Delete", Desc = "Contract.Delete", CategoryName = "Adminstration" }, #endregion #region OrderAllocation new Permission() { Id = 39, Name = "OrderAllocation", Desc = "OrderAllocation", Show = true, CategoryName = "Adminstration" }, new Permission() { Id = 40, Name = "OrderAllocation.Create", Desc = "OrderAllocation.Create", CategoryName = "Adminstration" }, new Permission() { Id = 41, Name = "OrderAllocation.Update", Desc = "OrderAllocation.Update", CategoryName = "Adminstration" }, new Permission() { Id = 42, Name = "OrderAllocation.Delete", Desc = "OrderAllocation.Delete", CategoryName = "Adminstration" }, #endregion #region OrderRequest new Permission() { Id = 43, Name = "OrderRequest", Desc = "OrderRequest", Show = true, CategoryName = "Adminstration" }, new Permission() { Id = 44, Name = "OrderRequest.Create", Desc = "OrderRequest.Create", CategoryName = "Adminstration" }, new Permission() { Id = 45, Name = "OrderRequest.Update", Desc = "OrderRequest.Update", CategoryName = "Adminstration" }, new Permission() { Id = 46, Name = "OrderRequest.Delete", Desc = "OrderRequest.Delete", CategoryName = "Adminstration" } #endregion , new Permission() { Id = 47, Name = "User.ResetPassword", Desc = "User.ResetPassword", CategoryName = "Adminstration" } ); } } }