Event Entity değiştirildi.
This commit is contained in:
parent
3e7468fdf2
commit
246cea49a9
22 changed files with 885 additions and 208 deletions
|
|
@ -21493,9 +21493,12 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
new EditingFormItemDto { Order = 1, DataField = "CategoryId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order = 2, DataField = "TypeId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order = 3, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 4, DataField = "Place", ColSpan = 2, EditorType2 = EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 5, DataField = "Description", ColSpan = 2, EditorType2 = EditorTypes.dxTextArea },
|
||||
new EditingFormItemDto { Order = 6, DataField = "Status", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox },
|
||||
new EditingFormItemDto { Order = 4, DataField = "Place", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 5, DataField = "OrganizerId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox },
|
||||
new EditingFormItemDto { Order = 6, DataField = "Description", ColSpan = 2, EditorType2 = EditorTypes.dxTextArea },
|
||||
new EditingFormItemDto { Order = 7, DataField = "Status", ColSpan = 1, EditorType2 = EditorTypes.dxSelectBox },
|
||||
new EditingFormItemDto { Order = 8, DataField = "ParticipantsCount", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox },
|
||||
new EditingFormItemDto { Order = 9, DataField = "Likes", ColSpan = 1, EditorType2 = EditorTypes.dxNumberBox },
|
||||
]
|
||||
}
|
||||
}),
|
||||
|
|
@ -21714,6 +21717,93 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
}),
|
||||
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true })
|
||||
},
|
||||
// OrganizerId
|
||||
new()
|
||||
{
|
||||
ListFormCode = listFormEvent.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Guid,
|
||||
FieldName = "OrganizerId",
|
||||
Width = 120,
|
||||
ListOrderNo = 7,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
LookupJson = JsonSerializer.Serialize(new LookupDto {
|
||||
DataSourceType = UiLookupDataSourceTypeEnum.Query,
|
||||
DisplayExpr = "name",
|
||||
ValueExpr = "key",
|
||||
LookupQuery = LookUpQueryValues.UserValues
|
||||
}),
|
||||
ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto
|
||||
{
|
||||
AllowReordering = true,
|
||||
}),
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Definitions.Event + ".Create",
|
||||
R = AppCodes.Definitions.Event,
|
||||
U = AppCodes.Definitions.Event + ".Update",
|
||||
E = true,
|
||||
I = true,
|
||||
Deny = false
|
||||
}),
|
||||
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true })
|
||||
},
|
||||
// ParticipantsCount
|
||||
new()
|
||||
{
|
||||
ListFormCode = listFormEvent.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Int32,
|
||||
FieldName = "ParticipantsCount",
|
||||
Width = 80,
|
||||
ListOrderNo = 8,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto
|
||||
{
|
||||
AllowReordering = true,
|
||||
}),
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Definitions.Event + ".Create",
|
||||
R = AppCodes.Definitions.Event,
|
||||
U = AppCodes.Definitions.Event + ".Update",
|
||||
E = true,
|
||||
I = true,
|
||||
Deny = false
|
||||
}),
|
||||
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true })
|
||||
},
|
||||
// ParticipantsCount
|
||||
new()
|
||||
{
|
||||
ListFormCode = listFormEvent.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Int32,
|
||||
FieldName = "Likes",
|
||||
Width = 80,
|
||||
ListOrderNo = 9,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto
|
||||
{
|
||||
AllowReordering = true,
|
||||
}),
|
||||
PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto
|
||||
{
|
||||
C = AppCodes.Definitions.Event + ".Create",
|
||||
R = AppCodes.Definitions.Event,
|
||||
U = AppCodes.Definitions.Event + ".Update",
|
||||
E = true,
|
||||
I = true,
|
||||
Deny = false
|
||||
}),
|
||||
PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto { IsPivot = true })
|
||||
},
|
||||
// Status
|
||||
new()
|
||||
{
|
||||
|
|
@ -21722,7 +21812,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
SourceDbType = DbType.String,
|
||||
FieldName = "Status",
|
||||
Width = 120,
|
||||
ListOrderNo = 7,
|
||||
ListOrderNo = 10,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
|
|
@ -21731,8 +21821,9 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
DisplayExpr = "name",
|
||||
ValueExpr = "key",
|
||||
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
||||
new () { Key="Aktif",Name="Aktif" },
|
||||
new () { Key="Pasif",Name="Pasif" },
|
||||
new () { Key="Published",Name="Published" },
|
||||
new () { Key="Draft",Name="Draft" },
|
||||
new () { Key="Cancelled",Name="Cancelled" },
|
||||
}),
|
||||
}),
|
||||
ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto
|
||||
|
|
|
|||
|
|
@ -112,6 +112,20 @@ public static class LookUpQueryValues
|
|||
$") AS \"List\" " +
|
||||
$"ORDER BY \"Name\"";
|
||||
|
||||
public static string RoleValues =
|
||||
$"SELECT " +
|
||||
$"\"Id\" AS \"Key\", " +
|
||||
$"\"Name\" AS \"Name\" " +
|
||||
$"FROM \"AbpRoles\"" +
|
||||
$"ORDER BY \"Name\"";
|
||||
|
||||
public static string UserValues =
|
||||
$"SELECT " +
|
||||
$"\"Id\" AS \"Key\", " +
|
||||
$"\"UserName\" AS \"Name\" " +
|
||||
$"FROM \"AbpUsers\"" +
|
||||
$"ORDER BY \"Name\"";
|
||||
|
||||
public static string BranchValues =
|
||||
$"SELECT \"Id\" AS \"Key\", " +
|
||||
$"\"Name\" AS \"Name\" " +
|
||||
|
|
|
|||
|
|
@ -71,6 +71,8 @@ public enum TableNameEnum
|
|||
EventCategory,
|
||||
EventType,
|
||||
Event,
|
||||
EventPhoto,
|
||||
EventComment,
|
||||
SalesRejectionReason,
|
||||
ClassCancellationReason,
|
||||
LessonPeriod,
|
||||
|
|
|
|||
|
|
@ -71,6 +71,8 @@ public static class TableNameResolver
|
|||
{ nameof(TableNameEnum.EventCategory), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) },
|
||||
{ nameof(TableNameEnum.EventType), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) },
|
||||
{ nameof(TableNameEnum.Event), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) },
|
||||
{ nameof(TableNameEnum.EventPhoto), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) },
|
||||
{ nameof(TableNameEnum.EventComment), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) },
|
||||
{ nameof(TableNameEnum.Disease), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) },
|
||||
{ nameof(TableNameEnum.Psychologist), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) },
|
||||
{ nameof(TableNameEnum.Vaccine), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) },
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Volo.Abp.Domain.Entities.Auditing;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
|
||||
|
|
@ -16,9 +17,23 @@ public class Event : FullAuditedEntity<Guid>, IMultiTenant
|
|||
public string Description { get; set; }
|
||||
public string Status { get; set; }
|
||||
|
||||
public Guid OrganizerId { get; set; }
|
||||
// public HrEmployee Organizer { get; set; }
|
||||
|
||||
public int ParticipantsCount { get; set; }
|
||||
// public ICollection<HrEmployee> Participants { get; set; } = new List<HrEmployee>();
|
||||
|
||||
// Medya ve etkileşim
|
||||
public ICollection<EventPhoto> Photos { get; set; } = [];
|
||||
public ICollection<EventComment> Comments { get; set; } = [];
|
||||
public int Likes { get; set; }
|
||||
public bool isPublished { get; set; } = false;
|
||||
|
||||
// Navigation
|
||||
public EventCategory Category { get; set; }
|
||||
public EventType Type { get; set; }
|
||||
|
||||
Guid? IMultiTenant.TenantId => TenantId;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
19
api/src/Kurs.Platform.Domain/Entities/Tenant/EventComment.cs
Normal file
19
api/src/Kurs.Platform.Domain/Entities/Tenant/EventComment.cs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
using System;
|
||||
using Volo.Abp.Domain.Entities.Auditing;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
|
||||
namespace Kurs.Platform.Entities;
|
||||
|
||||
public class EventComment : FullAuditedEntity<Guid>, IMultiTenant
|
||||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
|
||||
public Guid EventId { get; set; }
|
||||
public Guid UserId { get; set; }
|
||||
public string Comment { get; set; }
|
||||
public int Likes { get; set; }
|
||||
|
||||
public Event Event { get; set; }
|
||||
|
||||
Guid? IMultiTenant.TenantId => TenantId;
|
||||
}
|
||||
17
api/src/Kurs.Platform.Domain/Entities/Tenant/EventPhoto.cs
Normal file
17
api/src/Kurs.Platform.Domain/Entities/Tenant/EventPhoto.cs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
using System;
|
||||
using Volo.Abp.Domain.Entities.Auditing;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
|
||||
namespace Kurs.Platform.Entities;
|
||||
|
||||
public class EventPhoto : FullAuditedEntity<Guid>, IMultiTenant
|
||||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
|
||||
public Guid EventId { get; set; }
|
||||
public string Url { get; set; }
|
||||
|
||||
public Event Event { get; set; }
|
||||
|
||||
Guid? IMultiTenant.TenantId => TenantId;
|
||||
}
|
||||
|
|
@ -93,6 +93,8 @@ public class PlatformDbContext :
|
|||
public DbSet<Event> Events { get; set; }
|
||||
public DbSet<EventCategory> EventCategories { get; set; }
|
||||
public DbSet<EventType> EventTypes { get; set; }
|
||||
public DbSet<EventPhoto> EventPhotos { get; set; }
|
||||
public DbSet<EventComment> EventComments { get; set; }
|
||||
public DbSet<LessonPeriod> LessonPeriods { get; set; }
|
||||
public DbSet<Lawyer> Lawyers { get; set; }
|
||||
public DbSet<Meal> Meals { get; set; }
|
||||
|
|
@ -1089,6 +1091,7 @@ public class PlatformDbContext :
|
|||
b.Property(x => x.Place).HasMaxLength(200);
|
||||
b.Property(x => x.Description).HasMaxLength(1000);
|
||||
b.Property(x => x.Status).HasMaxLength(20);
|
||||
b.Property(x => x.isPublished).HasDefaultValue(false);
|
||||
|
||||
// EventCategory -> Event (1 - N)
|
||||
b.HasOne(x => x.Category)
|
||||
|
|
@ -1103,6 +1106,35 @@ public class PlatformDbContext :
|
|||
.OnDelete(DeleteBehavior.Restrict);
|
||||
});
|
||||
|
||||
builder.Entity<EventPhoto>(b =>
|
||||
{
|
||||
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.EventPhoto)), Prefix.DbSchema);
|
||||
b.ConfigureByConvention();
|
||||
|
||||
b.Property(x => x.Url).HasMaxLength(500);
|
||||
|
||||
// Event -> EventPhoto (1 - N)
|
||||
b.HasOne(x => x.Event)
|
||||
.WithMany(x => x.Photos)
|
||||
.HasForeignKey(x => x.EventId)
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
builder.Entity<EventComment>(b =>
|
||||
{
|
||||
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.EventComment)), Prefix.DbSchema);
|
||||
b.ConfigureByConvention();
|
||||
|
||||
b.Property(x => x.Comment).HasMaxLength(500);
|
||||
b.Property(x => x.Likes).HasDefaultValue(0);
|
||||
|
||||
// Event -> EventComment (1 - N)
|
||||
b.HasOne(x => x.Event)
|
||||
.WithMany(x => x.Comments)
|
||||
.HasForeignKey(x => x.EventId)
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
});
|
||||
|
||||
builder.Entity<SalesRejectionReason>(b =>
|
||||
{
|
||||
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.SalesRejectionReason)), Prefix.DbSchema);
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
|
|||
namespace Kurs.Platform.Migrations
|
||||
{
|
||||
[DbContext(typeof(PlatformDbContext))]
|
||||
[Migration("20251020111635_Initial")]
|
||||
[Migration("20251020201144_Initial")]
|
||||
partial class Initial
|
||||
{
|
||||
/// <inheritdoc />
|
||||
|
|
@ -3098,11 +3098,20 @@ namespace Kurs.Platform.Migrations
|
|||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("LastModifierId");
|
||||
|
||||
b.Property<int>("Likes")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("nvarchar(200)");
|
||||
|
||||
b.Property<Guid>("OrganizerId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<int>("ParticipantsCount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Place")
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("nvarchar(200)");
|
||||
|
|
@ -3118,6 +3127,11 @@ namespace Kurs.Platform.Migrations
|
|||
b.Property<Guid>("TypeId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<bool>("isPublished")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CategoryId");
|
||||
|
|
@ -3176,6 +3190,120 @@ namespace Kurs.Platform.Migrations
|
|||
b.ToTable("T_Adm_EventCategory", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.EventComment", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Comment")
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<DateTime>("CreationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("CreationTime");
|
||||
|
||||
b.Property<Guid?>("CreatorId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("CreatorId");
|
||||
|
||||
b.Property<Guid?>("DeleterId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("DeleterId");
|
||||
|
||||
b.Property<DateTime?>("DeletionTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("DeletionTime");
|
||||
|
||||
b.Property<Guid>("EventId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false)
|
||||
.HasColumnName("IsDeleted");
|
||||
|
||||
b.Property<DateTime?>("LastModificationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("LastModificationTime");
|
||||
|
||||
b.Property<Guid?>("LastModifierId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("LastModifierId");
|
||||
|
||||
b.Property<int>("Likes")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int")
|
||||
.HasDefaultValue(0);
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.Property<Guid>("UserId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("EventId");
|
||||
|
||||
b.ToTable("T_Adm_EventComment", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.EventPhoto", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("CreationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("CreationTime");
|
||||
|
||||
b.Property<Guid?>("CreatorId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("CreatorId");
|
||||
|
||||
b.Property<Guid?>("DeleterId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("DeleterId");
|
||||
|
||||
b.Property<DateTime?>("DeletionTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("DeletionTime");
|
||||
|
||||
b.Property<Guid>("EventId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false)
|
||||
.HasColumnName("IsDeleted");
|
||||
|
||||
b.Property<DateTime?>("LastModificationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("LastModificationTime");
|
||||
|
||||
b.Property<Guid?>("LastModifierId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("LastModifierId");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.Property<string>("Url")
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("EventId");
|
||||
|
||||
b.ToTable("T_Adm_EventPhoto", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.EventType", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
|
|
@ -9114,6 +9242,28 @@ namespace Kurs.Platform.Migrations
|
|||
b.Navigation("Type");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.EventComment", b =>
|
||||
{
|
||||
b.HasOne("Kurs.Platform.Entities.Event", "Event")
|
||||
.WithMany("Comments")
|
||||
.HasForeignKey("EventId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Event");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.EventPhoto", b =>
|
||||
{
|
||||
b.HasOne("Kurs.Platform.Entities.Event", "Event")
|
||||
.WithMany("Photos")
|
||||
.HasForeignKey("EventId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Event");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.Level", b =>
|
||||
{
|
||||
b.HasOne("Kurs.Platform.Entities.ClassType", "ClassType")
|
||||
|
|
@ -9511,6 +9661,13 @@ namespace Kurs.Platform.Migrations
|
|||
b.Navigation("Fields");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.Event", b =>
|
||||
{
|
||||
b.Navigation("Comments");
|
||||
|
||||
b.Navigation("Photos");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.EventCategory", b =>
|
||||
{
|
||||
b.Navigation("Events");
|
||||
|
|
@ -2844,6 +2844,10 @@ namespace Kurs.Platform.Migrations
|
|||
Place = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
|
||||
Description = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
|
||||
Status = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
|
||||
OrganizerId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
ParticipantsCount = table.Column<int>(type: "int", nullable: false),
|
||||
Likes = table.Column<int>(type: "int", nullable: false),
|
||||
isPublished = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
|
|
@ -3496,6 +3500,62 @@ namespace Kurs.Platform.Migrations
|
|||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "T_Adm_EventComment",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
EventId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
Comment = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
|
||||
Likes = table.Column<int>(type: "int", nullable: false, defaultValue: 0),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_T_Adm_EventComment", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_T_Adm_EventComment_T_Adm_Event_EventId",
|
||||
column: x => x.EventId,
|
||||
principalTable: "T_Adm_Event",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "T_Adm_EventPhoto",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
EventId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
Url = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_T_Adm_EventPhoto", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_T_Adm_EventPhoto_T_Adm_Event_EventId",
|
||||
column: x => x.EventId,
|
||||
principalTable: "T_Adm_Event",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "T_Crd_QuestionOption",
|
||||
columns: table => new
|
||||
|
|
@ -4068,6 +4128,16 @@ namespace Kurs.Platform.Migrations
|
|||
table: "T_Adm_Event",
|
||||
column: "TypeId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_Adm_EventComment_EventId",
|
||||
table: "T_Adm_EventComment",
|
||||
column: "EventId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_Adm_EventPhoto_EventId",
|
||||
table: "T_Adm_EventPhoto",
|
||||
column: "EventId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_Adm_OrderItem_OrderId",
|
||||
table: "T_Adm_OrderItem",
|
||||
|
|
@ -4361,7 +4431,10 @@ namespace Kurs.Platform.Migrations
|
|||
name: "T_Adm_EducationStatus");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "T_Adm_Event");
|
||||
name: "T_Adm_EventComment");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "T_Adm_EventPhoto");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "T_Adm_InstallmentOption");
|
||||
|
|
@ -4535,10 +4608,7 @@ namespace Kurs.Platform.Migrations
|
|||
name: "T_Adm_BlogCategory");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "T_Adm_EventCategory");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "T_Adm_EventType");
|
||||
name: "T_Adm_Event");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "T_Adm_Order");
|
||||
|
|
@ -4582,6 +4652,12 @@ namespace Kurs.Platform.Migrations
|
|||
migrationBuilder.DropTable(
|
||||
name: "P_Sas_ListForm");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "T_Adm_EventCategory");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "T_Adm_EventType");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "T_Crd_QuestionPool");
|
||||
|
||||
|
|
@ -3095,11 +3095,20 @@ namespace Kurs.Platform.Migrations
|
|||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("LastModifierId");
|
||||
|
||||
b.Property<int>("Likes")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("nvarchar(200)");
|
||||
|
||||
b.Property<Guid>("OrganizerId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<int>("ParticipantsCount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Place")
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("nvarchar(200)");
|
||||
|
|
@ -3115,6 +3124,11 @@ namespace Kurs.Platform.Migrations
|
|||
b.Property<Guid>("TypeId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<bool>("isPublished")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false);
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CategoryId");
|
||||
|
|
@ -3173,6 +3187,120 @@ namespace Kurs.Platform.Migrations
|
|||
b.ToTable("T_Adm_EventCategory", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.EventComment", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Comment")
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<DateTime>("CreationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("CreationTime");
|
||||
|
||||
b.Property<Guid?>("CreatorId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("CreatorId");
|
||||
|
||||
b.Property<Guid?>("DeleterId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("DeleterId");
|
||||
|
||||
b.Property<DateTime?>("DeletionTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("DeletionTime");
|
||||
|
||||
b.Property<Guid>("EventId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false)
|
||||
.HasColumnName("IsDeleted");
|
||||
|
||||
b.Property<DateTime?>("LastModificationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("LastModificationTime");
|
||||
|
||||
b.Property<Guid?>("LastModifierId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("LastModifierId");
|
||||
|
||||
b.Property<int>("Likes")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int")
|
||||
.HasDefaultValue(0);
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.Property<Guid>("UserId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("EventId");
|
||||
|
||||
b.ToTable("T_Adm_EventComment", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.EventPhoto", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("CreationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("CreationTime");
|
||||
|
||||
b.Property<Guid?>("CreatorId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("CreatorId");
|
||||
|
||||
b.Property<Guid?>("DeleterId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("DeleterId");
|
||||
|
||||
b.Property<DateTime?>("DeletionTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("DeletionTime");
|
||||
|
||||
b.Property<Guid>("EventId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false)
|
||||
.HasColumnName("IsDeleted");
|
||||
|
||||
b.Property<DateTime?>("LastModificationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("LastModificationTime");
|
||||
|
||||
b.Property<Guid?>("LastModifierId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("LastModifierId");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.Property<string>("Url")
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("EventId");
|
||||
|
||||
b.ToTable("T_Adm_EventPhoto", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.EventType", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
|
|
@ -9111,6 +9239,28 @@ namespace Kurs.Platform.Migrations
|
|||
b.Navigation("Type");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.EventComment", b =>
|
||||
{
|
||||
b.HasOne("Kurs.Platform.Entities.Event", "Event")
|
||||
.WithMany("Comments")
|
||||
.HasForeignKey("EventId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Event");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.EventPhoto", b =>
|
||||
{
|
||||
b.HasOne("Kurs.Platform.Entities.Event", "Event")
|
||||
.WithMany("Photos")
|
||||
.HasForeignKey("EventId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Event");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.Level", b =>
|
||||
{
|
||||
b.HasOne("Kurs.Platform.Entities.ClassType", "ClassType")
|
||||
|
|
@ -9508,6 +9658,13 @@ namespace Kurs.Platform.Migrations
|
|||
b.Navigation("Fields");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.Event", b =>
|
||||
{
|
||||
b.Navigation("Comments");
|
||||
|
||||
b.Navigation("Photos");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.EventCategory", b =>
|
||||
{
|
||||
b.Navigation("Events");
|
||||
|
|
|
|||
|
|
@ -1338,13 +1338,154 @@
|
|||
],
|
||||
"EventTypes": [
|
||||
{
|
||||
"Name": "Gezi"
|
||||
"Name": "Futbol Turnuvası"
|
||||
},
|
||||
{
|
||||
"Name": "Sinema"
|
||||
"Name": "Basketbol Maçı"
|
||||
},
|
||||
{
|
||||
"Name": "Tiyatro"
|
||||
"Name": "Koşu Etkinliği"
|
||||
},
|
||||
{
|
||||
"Name": "Tenis Turnuvası"
|
||||
},
|
||||
{
|
||||
"Name": "Yüzme Yarışı"
|
||||
},
|
||||
{
|
||||
"Name": "Bisiklet Turu"
|
||||
},
|
||||
{
|
||||
"Name": "Doğa Yürüyüşü"
|
||||
},
|
||||
{
|
||||
"Name": "Yoga Seansı"
|
||||
},
|
||||
{
|
||||
"Name": "Voleybol Turnuvası"
|
||||
},
|
||||
{
|
||||
"Name": "Kayak Gezisi"
|
||||
},
|
||||
{
|
||||
"Name": "Resim Sergisi"
|
||||
},
|
||||
{
|
||||
"Name": "Tiyatro Gösterisi"
|
||||
},
|
||||
{
|
||||
"Name": "Sinema Gecesi"
|
||||
},
|
||||
{
|
||||
"Name": "Heykel Atölyesi"
|
||||
},
|
||||
{
|
||||
"Name": "Fotoğraf Sergisi"
|
||||
},
|
||||
{
|
||||
"Name": "Ebru Atölyesi"
|
||||
},
|
||||
{
|
||||
"Name": "Kısa Film Yarışması"
|
||||
},
|
||||
{
|
||||
"Name": "Karikatür Sergisi"
|
||||
},
|
||||
{
|
||||
"Name": "Grafik Tasarım Workshopu"
|
||||
},
|
||||
{
|
||||
"Name": "Kültürel Sanat Günü"
|
||||
},
|
||||
{
|
||||
"Name": "Şehir Gezisi"
|
||||
},
|
||||
{
|
||||
"Name": "Tarihi Miras Turu"
|
||||
},
|
||||
{
|
||||
"Name": "Müze Ziyareti"
|
||||
},
|
||||
{
|
||||
"Name": "Kültürel Tanıtım Günü"
|
||||
},
|
||||
{
|
||||
"Name": "Yöresel Lezzetler Etkinliği"
|
||||
},
|
||||
{
|
||||
"Name": "Farklı Kültürlerle Tanışma"
|
||||
},
|
||||
{
|
||||
"Name": "Festival Katılımı"
|
||||
},
|
||||
{
|
||||
"Name": "Köy Gezisi"
|
||||
},
|
||||
{
|
||||
"Name": "Anıt ve Ören Yeri Ziyareti"
|
||||
},
|
||||
{
|
||||
"Name": "Uluslararası Kültür Buluşması"
|
||||
},
|
||||
{
|
||||
"Name": "Konser"
|
||||
},
|
||||
{
|
||||
"Name": "Koro Gösterisi"
|
||||
},
|
||||
{
|
||||
"Name": "Enstrüman Atölyesi"
|
||||
},
|
||||
{
|
||||
"Name": "DJ Gecesi"
|
||||
},
|
||||
{
|
||||
"Name": "Karaoke Yarışması"
|
||||
},
|
||||
{
|
||||
"Name": "Müzik Festivali"
|
||||
},
|
||||
{
|
||||
"Name": "Caz Akşamı"
|
||||
},
|
||||
{
|
||||
"Name": "Halk Müziği Gecesi"
|
||||
},
|
||||
{
|
||||
"Name": "Rock Konseri"
|
||||
},
|
||||
{
|
||||
"Name": "Müzik Dinleti Gecesi"
|
||||
},
|
||||
{
|
||||
"Name": "Teknik Eğitim Semineri"
|
||||
},
|
||||
{
|
||||
"Name": "Kariyer Gelişim Workshopu"
|
||||
},
|
||||
{
|
||||
"Name": "Liderlik Eğitimi"
|
||||
},
|
||||
{
|
||||
"Name": "İş Güvenliği Eğitimi"
|
||||
},
|
||||
{
|
||||
"Name": "İletişim Becerileri Atölyesi"
|
||||
},
|
||||
{
|
||||
"Name": "Yazılım Geliştirme Kampı"
|
||||
},
|
||||
{
|
||||
"Name": "Sunum Teknikleri Eğitimi"
|
||||
},
|
||||
{
|
||||
"Name": "Yapay Zeka Semineri"
|
||||
},
|
||||
{
|
||||
"Name": "Proje Yönetimi Eğitimi"
|
||||
},
|
||||
{
|
||||
"Name": "Yabancı Dil Workshopu"
|
||||
}
|
||||
],
|
||||
"EventCategories": [
|
||||
|
|
@ -1354,14 +1495,55 @@
|
|||
{
|
||||
"Name": "Sanat"
|
||||
},
|
||||
{
|
||||
"Name": "Kültür"
|
||||
},
|
||||
{
|
||||
"Name": "Müzik"
|
||||
},
|
||||
{
|
||||
"Name": "Eğitim"
|
||||
}
|
||||
],
|
||||
"Events": [
|
||||
{
|
||||
"CategoryName": "Spor",
|
||||
"TypeName": "Futbol Turnuvası",
|
||||
"Name": "Yaz Futbol Turnuvası 2025",
|
||||
"Place": "Şirket Kampüsü Spor Alanı",
|
||||
"Description": "Tüm departmanların katılımıyla düzenlenen geleneksel yaz futbol turnuvası.",
|
||||
"Status": "Published",
|
||||
"ParticipantsCount": 64,
|
||||
"OrganizerUserName": "system@sozsoft.com",
|
||||
"Likes": 120,
|
||||
"Photos": [],
|
||||
"Comments": []
|
||||
},
|
||||
{
|
||||
"Name": "Kültür"
|
||||
"CategoryName": "Kültür",
|
||||
"TypeName": "Kültürel Sanat Günü",
|
||||
"Name": "Kültür Gezisi: Kapadokya",
|
||||
"Place": "Kapadokya, Nevşehir",
|
||||
"Description": "Çalışanlarımıza özel, rehber eşliğinde 2 günlük kültürel gezi.",
|
||||
"Status": "Published",
|
||||
"ParticipantsCount": 25,
|
||||
"OrganizerUserName": "system@sozsoft.com",
|
||||
"Likes": 45,
|
||||
"Photos": [],
|
||||
"Comments": []
|
||||
},
|
||||
{
|
||||
"CategoryName": "Müzik",
|
||||
"TypeName": "Caz Akşamı",
|
||||
"Name": "Müzik Dinletisi: Jazz Akşamı",
|
||||
"Place": "Şirket Konferans Salonu",
|
||||
"Description": "Caz müziğinin en güzel örneklerinin canlı performanslarla sunulacağı özel akşam.",
|
||||
"Status": "Published",
|
||||
"ParticipantsCount": 40,
|
||||
"OrganizerUserName": "system@sozsoft.com",
|
||||
"Likes": 85,
|
||||
"Photos": [],
|
||||
"Comments": []
|
||||
}
|
||||
],
|
||||
"MeetingMethods": [
|
||||
|
|
|
|||
|
|
@ -12,11 +12,14 @@ using Volo.Abp.Domain.Repositories;
|
|||
using Microsoft.EntityFrameworkCore;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using Volo.Abp.Identity;
|
||||
using Volo.Abp.Users;
|
||||
|
||||
namespace Kurs.Platform.Data.Seeds;
|
||||
|
||||
public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
||||
{
|
||||
private readonly IRepository<IdentityUser, Guid> _repositoryUser;
|
||||
private readonly IRepository<GlobalSearch, int> _globalSearch;
|
||||
private readonly IRepository<CustomEndpoint, Guid> _customEndpointRepository;
|
||||
private readonly IRepository<CustomComponent, Guid> _customComponentRepository;
|
||||
|
|
@ -59,6 +62,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
|||
private readonly IRepository<Question, Guid> _questionRepository;
|
||||
|
||||
public TenantDataSeeder(
|
||||
IRepository<IdentityUser, Guid> repositoryUser,
|
||||
IRepository<GlobalSearch, int> globalSearch,
|
||||
IRepository<Sector, Guid> sectorRepository,
|
||||
IRepository<UomCategory, Guid> uomCategoryRepository,
|
||||
|
|
@ -101,6 +105,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
|||
IRepository<Question, Guid> questionRepository
|
||||
)
|
||||
{
|
||||
_repositoryUser = repositoryUser;
|
||||
_globalSearch = globalSearch;
|
||||
_sectorRepository = sectorRepository;
|
||||
_uomCategoryRepository = uomCategoryRepository;
|
||||
|
|
@ -694,6 +699,34 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
|||
}
|
||||
}
|
||||
|
||||
foreach (var item in items.Events)
|
||||
{
|
||||
var exists = await _eventRepository.AnyAsync(x => x.Name == item.Name);
|
||||
|
||||
if (!exists)
|
||||
{
|
||||
var category = await _eventCategoryRepository.FirstOrDefaultAsync(x => x.Name == item.CategoryName);
|
||||
var type = await _eventTypeRepository.FirstOrDefaultAsync(x => x.Name == item.TypeName);
|
||||
var user = await _repositoryUser.FirstOrDefaultAsync(x => x.UserName == item.OrganizerUserName);
|
||||
|
||||
if (category != null && type != null)
|
||||
{
|
||||
await _eventRepository.InsertAsync(new Event
|
||||
{
|
||||
CategoryId = category.Id,
|
||||
TypeId = type.Id,
|
||||
Name = item.Name,
|
||||
Place = item.Place,
|
||||
Description = item.Description,
|
||||
OrganizerId = user.Id,
|
||||
Status = item.Status,
|
||||
ParticipantsCount = item.ParticipantsCount,
|
||||
Likes = item.Likes
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var item in items.Sources)
|
||||
{
|
||||
var exists = await _sourceRepository.AnyAsync(x => x.Name == item.Name);
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ public class TenantSeederDto
|
|||
public List<ClassCancellationReasonSeedDto> ClassCancellationReasons { get; set; }
|
||||
public List<EventTypeSeedDto> EventTypes { get; set; }
|
||||
public List<EventCategorySeedDto> EventCategories { get; set; }
|
||||
public List<EventSeedDto> Events { get; set; }
|
||||
public List<SourceSeedDto> Sources { get; set; }
|
||||
public List<InterestingSeedDto> Interesting { get; set; }
|
||||
public List<ProgramSeedDto> Programs { get; set; }
|
||||
|
|
@ -321,12 +322,15 @@ public class EventCategorySeedDto
|
|||
|
||||
public class EventSeedDto
|
||||
{
|
||||
public Guid CategoryId { get; set; }
|
||||
public Guid TypeId { get; set; }
|
||||
public string CategoryName { get; set; }
|
||||
public string TypeName { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Place { get; set; }
|
||||
public string Description { get; set; }
|
||||
public string Status { get; set; }
|
||||
public string OrganizerUserName { get; set; }
|
||||
public int ParticipantsCount { get; set; }
|
||||
public int Likes { get; set; }
|
||||
}
|
||||
|
||||
public class SourceSeedDto
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ export const mockEmployees: HrEmployee[] = [
|
|||
personalPhone: "+90 532 555 0101",
|
||||
avatar: "https://i.pravatar.cc/150?img=12",
|
||||
nationalId: "12345678901",
|
||||
birthDate: new Date("1988-02-14"),
|
||||
birthDate: new Date("1988-10-20"),
|
||||
gender: GenderEnum.Male,
|
||||
maritalStatus: MaritalStatusEnum.Married,
|
||||
address: {
|
||||
|
|
|
|||
|
|
@ -7,9 +7,6 @@ import {
|
|||
Certificate,
|
||||
ExpenseRequest,
|
||||
Task,
|
||||
Birthday,
|
||||
WorkAnniversary,
|
||||
QuickLink,
|
||||
Training,
|
||||
Reservation,
|
||||
MealMenu,
|
||||
|
|
@ -127,7 +124,7 @@ export const mockEvents: CalendarEvent[] = [
|
|||
title: 'Hackathon 2025',
|
||||
description: '24 saatlik yazılım geliştirme maratonu. İnovasyon, teknoloji ve takım çalışması!',
|
||||
type: 'training',
|
||||
date: new Date('2025-09-10'),
|
||||
date: new Date('2025-20-22'),
|
||||
location: 'Ofis - Ana Salon',
|
||||
organizer: mockEmployees[0],
|
||||
participants: 28,
|
||||
|
|
@ -160,7 +157,7 @@ export const mockEvents: CalendarEvent[] = [
|
|||
title: 'Kurumsal Futbol Turnuvası',
|
||||
description: 'Departmanlar arası futbol turnuvasında ter döktük, gol attık ve kazandık! 🏆',
|
||||
type: 'sport',
|
||||
date: new Date('2025-06-20'),
|
||||
date: new Date('2025-10-25'),
|
||||
location: 'Spor Kompleksi Halı Saha',
|
||||
organizer: mockEmployees[2],
|
||||
participants: 32,
|
||||
|
|
@ -341,7 +338,7 @@ export const mockTasks: Task[] = [
|
|||
comments: 1,
|
||||
},
|
||||
]
|
||||
|
||||
2
|
||||
export const mockDocuments: Document[] = [
|
||||
{
|
||||
id: 'doc1',
|
||||
|
|
@ -390,104 +387,6 @@ export const mockDocuments: Document[] = [
|
|||
},
|
||||
]
|
||||
|
||||
export const mockBirthdays: Birthday[] = [
|
||||
{
|
||||
employee: mockEmployees[0],
|
||||
date: new Date('1990-10-20'), // Bugün
|
||||
age: 35,
|
||||
},
|
||||
{
|
||||
employee: mockEmployees[1],
|
||||
date: new Date('1992-10-21'), // Bu hafta içinde
|
||||
age: 33,
|
||||
},
|
||||
{
|
||||
employee: mockEmployees[2],
|
||||
date: new Date('1988-10-23'), // Bu hafta içinde
|
||||
age: 37,
|
||||
},
|
||||
{
|
||||
employee: mockEmployees[3],
|
||||
date: new Date('1995-10-28'), // Bu ay içinde
|
||||
age: 30,
|
||||
},
|
||||
]
|
||||
|
||||
export const mockAnniversaries: WorkAnniversary[] = [
|
||||
{
|
||||
employee: mockEmployees[2],
|
||||
hireDate: new Date('2019-10-10'), // Bu ay (Ekim)
|
||||
years: 6,
|
||||
},
|
||||
{
|
||||
employee: mockEmployees[4],
|
||||
hireDate: new Date('2020-10-15'), // Bu ay (Ekim)
|
||||
years: 5,
|
||||
},
|
||||
{
|
||||
employee: mockEmployees[0],
|
||||
hireDate: new Date('2021-10-20'), // Bu ay (Ekim)
|
||||
years: 4,
|
||||
},
|
||||
]
|
||||
|
||||
export const mockQuickLinks: QuickLink[] = [
|
||||
{
|
||||
id: 'ql1',
|
||||
name: 'İzin Talebi',
|
||||
description: 'Yıllık izin talebinde bulun',
|
||||
icon: '🏖️',
|
||||
url: '/intranet/hr/leave',
|
||||
color: '#3b82f6',
|
||||
category: 'İnsan Kaynakları',
|
||||
},
|
||||
{
|
||||
id: 'ql2',
|
||||
name: 'Görevlerim',
|
||||
description: 'Atanan görevleri görüntüle',
|
||||
icon: '✅',
|
||||
url: '/intranet/tasks',
|
||||
color: '#10b981',
|
||||
category: 'Proje Yönetimi',
|
||||
},
|
||||
{
|
||||
id: 'ql3',
|
||||
name: 'Dokümanlar',
|
||||
description: 'Şirket dokümanlarına eriş',
|
||||
icon: '📁',
|
||||
url: '/intranet/documents',
|
||||
color: '#f59e0b',
|
||||
category: 'Bilgi Yönetimi',
|
||||
},
|
||||
{
|
||||
id: 'ql4',
|
||||
name: 'Etkinlikler',
|
||||
description: 'Yaklaşan etkinlikler',
|
||||
icon: '📅',
|
||||
url: '/intranet/events',
|
||||
color: '#8b5cf6',
|
||||
category: 'Takvim',
|
||||
},
|
||||
{
|
||||
id: 'ql5',
|
||||
name: 'IT Destek',
|
||||
description: 'Teknik destek talebi oluştur',
|
||||
icon: '🛠️',
|
||||
url: '/intranet/it-support',
|
||||
color: '#ef4444',
|
||||
category: 'IT',
|
||||
},
|
||||
{
|
||||
id: 'ql6',
|
||||
name: 'Mesai Girişi',
|
||||
description: 'Mesai saatlerini kaydet',
|
||||
icon: '⏰',
|
||||
url: '/intranet/hr/timesheet',
|
||||
color: '#06b6d4',
|
||||
category: 'İnsan Kaynakları',
|
||||
},
|
||||
]
|
||||
|
||||
export const mockTrainings: Training[] = [
|
||||
{
|
||||
id: 'tr1',
|
||||
|
|
@ -635,7 +534,7 @@ export const mockReservations: Reservation[] = [
|
|||
export const mockMealMenus: MealMenu[] = [
|
||||
{
|
||||
id: 'menu1',
|
||||
date: new Date('2024-10-21'),
|
||||
date: new Date('2025-10-20'),
|
||||
dayOfWeek: 'Pazartesi',
|
||||
meals: [
|
||||
{
|
||||
|
|
@ -647,7 +546,7 @@ export const mockMealMenus: MealMenu[] = [
|
|||
},
|
||||
{
|
||||
id: 'menu2',
|
||||
date: new Date('2024-10-22'),
|
||||
date: new Date('2025-10-21'),
|
||||
dayOfWeek: 'Salı',
|
||||
meals: [
|
||||
{
|
||||
|
|
@ -659,7 +558,7 @@ export const mockMealMenus: MealMenu[] = [
|
|||
},
|
||||
{
|
||||
id: 'menu3',
|
||||
date: new Date('2024-10-23'),
|
||||
date: new Date('2025-10-22'),
|
||||
dayOfWeek: 'Çarşamba',
|
||||
meals: [
|
||||
{
|
||||
|
|
@ -671,7 +570,7 @@ export const mockMealMenus: MealMenu[] = [
|
|||
},
|
||||
{
|
||||
id: 'menu4',
|
||||
date: new Date('2024-10-24'),
|
||||
date: new Date('2025-10-23'),
|
||||
dayOfWeek: 'Perşembe',
|
||||
meals: [
|
||||
{
|
||||
|
|
@ -683,7 +582,7 @@ export const mockMealMenus: MealMenu[] = [
|
|||
},
|
||||
{
|
||||
id: 'menu5',
|
||||
date: new Date('2024-10-25'),
|
||||
date: new Date('2025-10-24'),
|
||||
dayOfWeek: 'Cuma',
|
||||
meals: [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -17,15 +17,6 @@ export interface Announcement {
|
|||
imageUrl?: string
|
||||
}
|
||||
|
||||
// Etkinlik Yorumu
|
||||
export interface EventComment {
|
||||
id: string
|
||||
author: HrEmployee
|
||||
content: string
|
||||
creationTime: Date
|
||||
likes: number
|
||||
}
|
||||
|
||||
// Etkinlik
|
||||
export interface CalendarEvent {
|
||||
id: string
|
||||
|
|
@ -42,6 +33,15 @@ export interface CalendarEvent {
|
|||
isPublished: boolean
|
||||
}
|
||||
|
||||
// Etkinlik Yorumu
|
||||
export interface EventComment {
|
||||
id: string
|
||||
author: HrEmployee
|
||||
content: string
|
||||
creationTime: Date
|
||||
likes: number
|
||||
}
|
||||
|
||||
// Harcama
|
||||
export interface ExpenseRequest {
|
||||
id: string
|
||||
|
|
@ -94,31 +94,6 @@ export interface Document {
|
|||
tags: string[]
|
||||
}
|
||||
|
||||
// Doğum günü
|
||||
export interface Birthday {
|
||||
employee: HrEmployee
|
||||
date: Date
|
||||
age?: number
|
||||
}
|
||||
|
||||
// İş yıldönümü
|
||||
export interface WorkAnniversary {
|
||||
employee: HrEmployee
|
||||
hireDate: Date
|
||||
years: number
|
||||
}
|
||||
|
||||
// Hızlı Erişim
|
||||
export interface QuickLink {
|
||||
id: string
|
||||
name: string
|
||||
description: string
|
||||
icon: string
|
||||
url: string
|
||||
color: string
|
||||
category: string
|
||||
}
|
||||
|
||||
// Eğitim
|
||||
export interface Training {
|
||||
id: string
|
||||
|
|
@ -218,28 +193,7 @@ export interface Visitor {
|
|||
photo?: string
|
||||
}
|
||||
|
||||
export interface MediaItem {
|
||||
id: string
|
||||
type: 'image' | 'video'
|
||||
url: string
|
||||
file?: File
|
||||
}
|
||||
|
||||
export interface LightboxMedia {
|
||||
type: 'image' | 'video'
|
||||
url?: string
|
||||
urls?: string[]
|
||||
}
|
||||
|
||||
export interface Location {
|
||||
id: string
|
||||
name: string
|
||||
address: string
|
||||
lat: number
|
||||
lng: number
|
||||
placeId?: string
|
||||
}
|
||||
|
||||
// Sosyal Duvar
|
||||
export interface SocialPost {
|
||||
id: string
|
||||
author: {
|
||||
|
|
@ -295,3 +249,25 @@ export interface SocialPost {
|
|||
}>
|
||||
isOwnPost: boolean
|
||||
}
|
||||
|
||||
export interface MediaItem {
|
||||
id: string
|
||||
type: 'image' | 'video'
|
||||
url: string
|
||||
file?: File
|
||||
}
|
||||
|
||||
export interface LightboxMedia {
|
||||
type: 'image' | 'video'
|
||||
url?: string
|
||||
urls?: string[]
|
||||
}
|
||||
|
||||
export interface Location {
|
||||
id: string
|
||||
name: string
|
||||
address: string
|
||||
lat: number
|
||||
lng: number
|
||||
placeId?: string
|
||||
}
|
||||
|
|
@ -6,13 +6,12 @@ import relativeTime from 'dayjs/plugin/relativeTime'
|
|||
import isBetween from 'dayjs/plugin/isBetween'
|
||||
|
||||
// Widgets
|
||||
import TodayEvents from './widgets/TodayEvents'
|
||||
import TodayBirthdays from './widgets/TodayBirthdays'
|
||||
import UpcomingEvents from './widgets/UpcomingEvents'
|
||||
import RecentDocuments from './widgets/RecentDocuments'
|
||||
import ImportantAnnouncements from './widgets/ImportantAnnouncements'
|
||||
import PriorityTasks from './widgets/PriorityTasks'
|
||||
import WeeklyMenu from './widgets/WeeklyMenu'
|
||||
import MealWeeklyMenu from './widgets/MealWeeklyMenu'
|
||||
import ShuttleSchedule from './widgets/ShuttleSchedule'
|
||||
import LeaveManagement from './widgets/LeaveManagement'
|
||||
import OvertimeManagement from './widgets/OvertimeManagement'
|
||||
|
|
@ -83,11 +82,10 @@ const IntranetDashboard: React.FC = () => {
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-1 lg:grid-cols-10 gap-4">
|
||||
<div className="lg:col-span-2 space-y-6">
|
||||
<TodayEvents />
|
||||
<TodayBirthdays />
|
||||
<div className="grid grid-cols-1 lg:grid-cols-11 gap-4">
|
||||
<div className="lg:col-span-3 space-y-6">
|
||||
<UpcomingEvents />
|
||||
<TodayBirthdays />
|
||||
<RecentDocuments />
|
||||
<UpcomingTrainings />
|
||||
<ActiveReservations onNewReservation={() => setShowReservationModal(true)} />
|
||||
|
|
@ -101,7 +99,7 @@ const IntranetDashboard: React.FC = () => {
|
|||
<div className="lg:col-span-3 space-y-6">
|
||||
<ImportantAnnouncements onAnnouncementClick={setSelectedAnnouncement} />
|
||||
<PriorityTasks />
|
||||
<WeeklyMenu />
|
||||
<MealWeeklyMenu />
|
||||
<ShuttleSchedule />
|
||||
<LeaveManagement onNewLeave={() => setShowLeaveModal(true)} />
|
||||
<OvertimeManagement onNewOvertime={() => setShowOvertimeModal(true)} />
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
import React from 'react'
|
||||
import { FaClipboardCheck } from 'react-icons/fa'
|
||||
import dayjs from 'dayjs'
|
||||
import { mockSurveys, Survey } from '../../../mocks/mockIntranet'
|
||||
import { mockSurveys } from '../../../mocks/mockIntranet'
|
||||
import { Survey } from '@/types/intranet'
|
||||
|
||||
interface ActiveSurveysProps {
|
||||
onTakeSurvey: (survey: Survey) => void
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
import React from 'react'
|
||||
import { FaBell, FaEye } from 'react-icons/fa'
|
||||
import dayjs from 'dayjs'
|
||||
import { mockAnnouncements, Announcement } from '../../../mocks/mockIntranet'
|
||||
import { mockAnnouncements } from '../../../mocks/mockIntranet'
|
||||
import { Announcement } from '@/types/intranet'
|
||||
|
||||
interface ImportantAnnouncementsProps {
|
||||
onAnnouncementClick: (announcement: Announcement) => void
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ import { mockMealMenus } from '../../../mocks/mockIntranet'
|
|||
|
||||
dayjs.extend(isBetween)
|
||||
|
||||
const WeeklyMenu: React.FC = () => {
|
||||
const weekMenus = mockMealMenus.filter((menu) => {
|
||||
const MealWeeklyMenu: React.FC = () => {
|
||||
const mealWeekMenus = mockMealMenus.filter((menu) => {
|
||||
const menuDate = dayjs(menu.date)
|
||||
const today = dayjs()
|
||||
const weekStart = today.startOf('week')
|
||||
|
|
@ -26,7 +26,7 @@ const WeeklyMenu: React.FC = () => {
|
|||
</div>
|
||||
</div>
|
||||
<div className="divide-y divide-gray-200 dark:divide-gray-700">
|
||||
{weekMenus.map((menu) => {
|
||||
{mealWeekMenus.map((menu) => {
|
||||
const isToday = dayjs(menu.date).isSame(dayjs(), 'day')
|
||||
return (
|
||||
<div
|
||||
|
|
@ -70,4 +70,4 @@ const WeeklyMenu: React.FC = () => {
|
|||
)
|
||||
}
|
||||
|
||||
export default WeeklyMenu
|
||||
export default MealWeeklyMenu
|
||||
|
|
@ -1,12 +1,13 @@
|
|||
import React from 'react'
|
||||
import dayjs from 'dayjs'
|
||||
import { mockBirthdays } from '../../../mocks/mockIntranet'
|
||||
import { mockEmployees } from '@/mocks/mockEmployees'
|
||||
|
||||
const TodayBirthdays: React.FC = () => {
|
||||
const todayBirthdays = mockBirthdays.filter((b) => {
|
||||
const birthDate = dayjs(b.date)
|
||||
const today = dayjs()
|
||||
return birthDate.month() === today.month() && birthDate.date() === today.date()
|
||||
const todayBirthdays = mockEmployees.filter((b) => {
|
||||
return (
|
||||
dayjs(b.birthDate).month() === today.month() && dayjs(b.birthDate).date() === today.date()
|
||||
)
|
||||
})
|
||||
|
||||
return (
|
||||
|
|
@ -24,19 +25,19 @@ const TodayBirthdays: React.FC = () => {
|
|||
className="flex items-center gap-3 p-3 bg-white/50 dark:bg-gray-800/50 rounded-lg"
|
||||
>
|
||||
<img
|
||||
src={birthday.employee.avatar}
|
||||
alt={birthday.employee.fullName}
|
||||
src={birthday.avatar}
|
||||
alt={birthday.fullName}
|
||||
className="w-12 h-12 rounded-full border-2 border-pink-300 dark:border-pink-700"
|
||||
/>
|
||||
<div className="flex-1">
|
||||
<p className="text-sm font-semibold text-gray-900 dark:text-white">
|
||||
{birthday.employee.fullName}
|
||||
{birthday.fullName}
|
||||
</p>
|
||||
<p className="text-xs text-gray-600 dark:text-gray-400">
|
||||
{birthday.age} yaşında 🎉
|
||||
{today.diff(dayjs(birthday.birthDate), 'year')} yaşında 🎉
|
||||
</p>
|
||||
<p className="text-xs text-gray-500 dark:text-gray-500 mt-1">
|
||||
{birthday.employee.department?.name || 'Genel'}
|
||||
{birthday.department?.name || 'Genel'}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue