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 = 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 = 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 = 3, DataField = "Name", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
|
||||||
new EditingFormItemDto { Order = 4, DataField = "Place", ColSpan = 2, EditorType2 = EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order = 4, DataField = "Place", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxTextBox },
|
||||||
new EditingFormItemDto { Order = 5, DataField = "Description", ColSpan = 2, EditorType2 = EditorTypes.dxTextArea },
|
new EditingFormItemDto { Order = 5, DataField = "OrganizerId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox },
|
||||||
new EditingFormItemDto { Order = 6, DataField = "Status", ColSpan = 1, 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 })
|
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
|
// Status
|
||||||
new()
|
new()
|
||||||
{
|
{
|
||||||
|
|
@ -21722,7 +21812,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
||||||
SourceDbType = DbType.String,
|
SourceDbType = DbType.String,
|
||||||
FieldName = "Status",
|
FieldName = "Status",
|
||||||
Width = 120,
|
Width = 120,
|
||||||
ListOrderNo = 7,
|
ListOrderNo = 10,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
IsDeleted = false,
|
IsDeleted = false,
|
||||||
|
|
@ -21731,8 +21821,9 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
||||||
DisplayExpr = "name",
|
DisplayExpr = "name",
|
||||||
ValueExpr = "key",
|
ValueExpr = "key",
|
||||||
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
||||||
new () { Key="Aktif",Name="Aktif" },
|
new () { Key="Published",Name="Published" },
|
||||||
new () { Key="Pasif",Name="Pasif" },
|
new () { Key="Draft",Name="Draft" },
|
||||||
|
new () { Key="Cancelled",Name="Cancelled" },
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto
|
ColumnCustomizationJson = JsonSerializer.Serialize(new ColumnCustomizationDto
|
||||||
|
|
|
||||||
|
|
@ -112,6 +112,20 @@ public static class LookUpQueryValues
|
||||||
$") AS \"List\" " +
|
$") AS \"List\" " +
|
||||||
$"ORDER BY \"Name\"";
|
$"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 =
|
public static string BranchValues =
|
||||||
$"SELECT \"Id\" AS \"Key\", " +
|
$"SELECT \"Id\" AS \"Key\", " +
|
||||||
$"\"Name\" AS \"Name\" " +
|
$"\"Name\" AS \"Name\" " +
|
||||||
|
|
@ -143,7 +157,7 @@ public static class LookUpQueryValues
|
||||||
$"FROM \"{FullNameTable(TableNameEnum.SkillType)}\" " +
|
$"FROM \"{FullNameTable(TableNameEnum.SkillType)}\" " +
|
||||||
$"WHERE \"IsDeleted\" = 'false' " +
|
$"WHERE \"IsDeleted\" = 'false' " +
|
||||||
$"ORDER BY \"Name\";";
|
$"ORDER BY \"Name\";";
|
||||||
|
|
||||||
public static string ClassTypeValues =
|
public static string ClassTypeValues =
|
||||||
$"SELECT " +
|
$"SELECT " +
|
||||||
$"\"Id\" AS \"Key\", " +
|
$"\"Id\" AS \"Key\", " +
|
||||||
|
|
|
||||||
|
|
@ -71,6 +71,8 @@ public enum TableNameEnum
|
||||||
EventCategory,
|
EventCategory,
|
||||||
EventType,
|
EventType,
|
||||||
Event,
|
Event,
|
||||||
|
EventPhoto,
|
||||||
|
EventComment,
|
||||||
SalesRejectionReason,
|
SalesRejectionReason,
|
||||||
ClassCancellationReason,
|
ClassCancellationReason,
|
||||||
LessonPeriod,
|
LessonPeriod,
|
||||||
|
|
|
||||||
|
|
@ -71,6 +71,8 @@ public static class TableNameResolver
|
||||||
{ nameof(TableNameEnum.EventCategory), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) },
|
{ nameof(TableNameEnum.EventCategory), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) },
|
||||||
{ nameof(TableNameEnum.EventType), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) },
|
{ nameof(TableNameEnum.EventType), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) },
|
||||||
{ nameof(TableNameEnum.Event), (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.Disease), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) },
|
||||||
{ nameof(TableNameEnum.Psychologist), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) },
|
{ nameof(TableNameEnum.Psychologist), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) },
|
||||||
{ nameof(TableNameEnum.Vaccine), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) },
|
{ nameof(TableNameEnum.Vaccine), (PlatformConsts.TablePrefix.TenantByName, MenuPrefix.Administration) },
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using Volo.Abp.Domain.Entities.Auditing;
|
using Volo.Abp.Domain.Entities.Auditing;
|
||||||
using Volo.Abp.MultiTenancy;
|
using Volo.Abp.MultiTenancy;
|
||||||
|
|
||||||
|
|
@ -16,9 +17,23 @@ public class Event : FullAuditedEntity<Guid>, IMultiTenant
|
||||||
public string Description { get; set; }
|
public string Description { get; set; }
|
||||||
public string Status { 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
|
// Navigation
|
||||||
public EventCategory Category { get; set; }
|
public EventCategory Category { get; set; }
|
||||||
public EventType Type { get; set; }
|
public EventType Type { get; set; }
|
||||||
|
|
||||||
Guid? IMultiTenant.TenantId => TenantId;
|
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<Event> Events { get; set; }
|
||||||
public DbSet<EventCategory> EventCategories { get; set; }
|
public DbSet<EventCategory> EventCategories { get; set; }
|
||||||
public DbSet<EventType> EventTypes { 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<LessonPeriod> LessonPeriods { get; set; }
|
||||||
public DbSet<Lawyer> Lawyers { get; set; }
|
public DbSet<Lawyer> Lawyers { get; set; }
|
||||||
public DbSet<Meal> Meals { 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.Place).HasMaxLength(200);
|
||||||
b.Property(x => x.Description).HasMaxLength(1000);
|
b.Property(x => x.Description).HasMaxLength(1000);
|
||||||
b.Property(x => x.Status).HasMaxLength(20);
|
b.Property(x => x.Status).HasMaxLength(20);
|
||||||
|
b.Property(x => x.isPublished).HasDefaultValue(false);
|
||||||
|
|
||||||
// EventCategory -> Event (1 - N)
|
// EventCategory -> Event (1 - N)
|
||||||
b.HasOne(x => x.Category)
|
b.HasOne(x => x.Category)
|
||||||
|
|
@ -1103,6 +1106,35 @@ public class PlatformDbContext :
|
||||||
.OnDelete(DeleteBehavior.Restrict);
|
.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 =>
|
builder.Entity<SalesRejectionReason>(b =>
|
||||||
{
|
{
|
||||||
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.SalesRejectionReason)), Prefix.DbSchema);
|
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.SalesRejectionReason)), Prefix.DbSchema);
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
|
||||||
namespace Kurs.Platform.Migrations
|
namespace Kurs.Platform.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(PlatformDbContext))]
|
[DbContext(typeof(PlatformDbContext))]
|
||||||
[Migration("20251020111635_Initial")]
|
[Migration("20251020201144_Initial")]
|
||||||
partial class Initial
|
partial class Initial
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
|
|
@ -3098,11 +3098,20 @@ namespace Kurs.Platform.Migrations
|
||||||
.HasColumnType("uniqueidentifier")
|
.HasColumnType("uniqueidentifier")
|
||||||
.HasColumnName("LastModifierId");
|
.HasColumnName("LastModifierId");
|
||||||
|
|
||||||
|
b.Property<int>("Likes")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<string>("Name")
|
b.Property<string>("Name")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasMaxLength(200)
|
.HasMaxLength(200)
|
||||||
.HasColumnType("nvarchar(200)");
|
.HasColumnType("nvarchar(200)");
|
||||||
|
|
||||||
|
b.Property<Guid>("OrganizerId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<int>("ParticipantsCount")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<string>("Place")
|
b.Property<string>("Place")
|
||||||
.HasMaxLength(200)
|
.HasMaxLength(200)
|
||||||
.HasColumnType("nvarchar(200)");
|
.HasColumnType("nvarchar(200)");
|
||||||
|
|
@ -3118,6 +3127,11 @@ namespace Kurs.Platform.Migrations
|
||||||
b.Property<Guid>("TypeId")
|
b.Property<Guid>("TypeId")
|
||||||
.HasColumnType("uniqueidentifier");
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<bool>("isPublished")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bit")
|
||||||
|
.HasDefaultValue(false);
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
b.HasIndex("CategoryId");
|
b.HasIndex("CategoryId");
|
||||||
|
|
@ -3176,6 +3190,120 @@ namespace Kurs.Platform.Migrations
|
||||||
b.ToTable("T_Adm_EventCategory", (string)null);
|
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 =>
|
modelBuilder.Entity("Kurs.Platform.Entities.EventType", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("Id")
|
b.Property<Guid>("Id")
|
||||||
|
|
@ -9114,6 +9242,28 @@ namespace Kurs.Platform.Migrations
|
||||||
b.Navigation("Type");
|
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 =>
|
modelBuilder.Entity("Kurs.Platform.Entities.Level", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("Kurs.Platform.Entities.ClassType", "ClassType")
|
b.HasOne("Kurs.Platform.Entities.ClassType", "ClassType")
|
||||||
|
|
@ -9511,6 +9661,13 @@ namespace Kurs.Platform.Migrations
|
||||||
b.Navigation("Fields");
|
b.Navigation("Fields");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Kurs.Platform.Entities.Event", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("Comments");
|
||||||
|
|
||||||
|
b.Navigation("Photos");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Kurs.Platform.Entities.EventCategory", b =>
|
modelBuilder.Entity("Kurs.Platform.Entities.EventCategory", b =>
|
||||||
{
|
{
|
||||||
b.Navigation("Events");
|
b.Navigation("Events");
|
||||||
|
|
@ -2844,6 +2844,10 @@ namespace Kurs.Platform.Migrations
|
||||||
Place = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
|
Place = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
|
||||||
Description = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
|
Description = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
|
||||||
Status = table.Column<string>(type: "nvarchar(20)", maxLength: 20, 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),
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||||
|
|
@ -3496,6 +3500,62 @@ namespace Kurs.Platform.Migrations
|
||||||
onDelete: ReferentialAction.Cascade);
|
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(
|
migrationBuilder.CreateTable(
|
||||||
name: "T_Crd_QuestionOption",
|
name: "T_Crd_QuestionOption",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
|
|
@ -4068,6 +4128,16 @@ namespace Kurs.Platform.Migrations
|
||||||
table: "T_Adm_Event",
|
table: "T_Adm_Event",
|
||||||
column: "TypeId");
|
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(
|
migrationBuilder.CreateIndex(
|
||||||
name: "IX_T_Adm_OrderItem_OrderId",
|
name: "IX_T_Adm_OrderItem_OrderId",
|
||||||
table: "T_Adm_OrderItem",
|
table: "T_Adm_OrderItem",
|
||||||
|
|
@ -4361,7 +4431,10 @@ namespace Kurs.Platform.Migrations
|
||||||
name: "T_Adm_EducationStatus");
|
name: "T_Adm_EducationStatus");
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "T_Adm_Event");
|
name: "T_Adm_EventComment");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "T_Adm_EventPhoto");
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "T_Adm_InstallmentOption");
|
name: "T_Adm_InstallmentOption");
|
||||||
|
|
@ -4535,10 +4608,7 @@ namespace Kurs.Platform.Migrations
|
||||||
name: "T_Adm_BlogCategory");
|
name: "T_Adm_BlogCategory");
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "T_Adm_EventCategory");
|
name: "T_Adm_Event");
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "T_Adm_EventType");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "T_Adm_Order");
|
name: "T_Adm_Order");
|
||||||
|
|
@ -4582,6 +4652,12 @@ namespace Kurs.Platform.Migrations
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "P_Sas_ListForm");
|
name: "P_Sas_ListForm");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "T_Adm_EventCategory");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "T_Adm_EventType");
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "T_Crd_QuestionPool");
|
name: "T_Crd_QuestionPool");
|
||||||
|
|
||||||
|
|
@ -3095,11 +3095,20 @@ namespace Kurs.Platform.Migrations
|
||||||
.HasColumnType("uniqueidentifier")
|
.HasColumnType("uniqueidentifier")
|
||||||
.HasColumnName("LastModifierId");
|
.HasColumnName("LastModifierId");
|
||||||
|
|
||||||
|
b.Property<int>("Likes")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<string>("Name")
|
b.Property<string>("Name")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasMaxLength(200)
|
.HasMaxLength(200)
|
||||||
.HasColumnType("nvarchar(200)");
|
.HasColumnType("nvarchar(200)");
|
||||||
|
|
||||||
|
b.Property<Guid>("OrganizerId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<int>("ParticipantsCount")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<string>("Place")
|
b.Property<string>("Place")
|
||||||
.HasMaxLength(200)
|
.HasMaxLength(200)
|
||||||
.HasColumnType("nvarchar(200)");
|
.HasColumnType("nvarchar(200)");
|
||||||
|
|
@ -3115,6 +3124,11 @@ namespace Kurs.Platform.Migrations
|
||||||
b.Property<Guid>("TypeId")
|
b.Property<Guid>("TypeId")
|
||||||
.HasColumnType("uniqueidentifier");
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<bool>("isPublished")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("bit")
|
||||||
|
.HasDefaultValue(false);
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
b.HasIndex("CategoryId");
|
b.HasIndex("CategoryId");
|
||||||
|
|
@ -3173,6 +3187,120 @@ namespace Kurs.Platform.Migrations
|
||||||
b.ToTable("T_Adm_EventCategory", (string)null);
|
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 =>
|
modelBuilder.Entity("Kurs.Platform.Entities.EventType", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("Id")
|
b.Property<Guid>("Id")
|
||||||
|
|
@ -9111,6 +9239,28 @@ namespace Kurs.Platform.Migrations
|
||||||
b.Navigation("Type");
|
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 =>
|
modelBuilder.Entity("Kurs.Platform.Entities.Level", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("Kurs.Platform.Entities.ClassType", "ClassType")
|
b.HasOne("Kurs.Platform.Entities.ClassType", "ClassType")
|
||||||
|
|
@ -9508,6 +9658,13 @@ namespace Kurs.Platform.Migrations
|
||||||
b.Navigation("Fields");
|
b.Navigation("Fields");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("Kurs.Platform.Entities.Event", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("Comments");
|
||||||
|
|
||||||
|
b.Navigation("Photos");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Kurs.Platform.Entities.EventCategory", b =>
|
modelBuilder.Entity("Kurs.Platform.Entities.EventCategory", b =>
|
||||||
{
|
{
|
||||||
b.Navigation("Events");
|
b.Navigation("Events");
|
||||||
|
|
|
||||||
|
|
@ -1338,13 +1338,154 @@
|
||||||
],
|
],
|
||||||
"EventTypes": [
|
"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": [
|
"EventCategories": [
|
||||||
|
|
@ -1354,14 +1495,55 @@
|
||||||
{
|
{
|
||||||
"Name": "Sanat"
|
"Name": "Sanat"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"Name": "Kültür"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"Name": "Müzik"
|
"Name": "Müzik"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Name": "Eğitim"
|
"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": [
|
"MeetingMethods": [
|
||||||
|
|
|
||||||
|
|
@ -12,11 +12,14 @@ using Volo.Abp.Domain.Repositories;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using Volo.Abp.Identity;
|
||||||
|
using Volo.Abp.Users;
|
||||||
|
|
||||||
namespace Kurs.Platform.Data.Seeds;
|
namespace Kurs.Platform.Data.Seeds;
|
||||||
|
|
||||||
public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
{
|
{
|
||||||
|
private readonly IRepository<IdentityUser, Guid> _repositoryUser;
|
||||||
private readonly IRepository<GlobalSearch, int> _globalSearch;
|
private readonly IRepository<GlobalSearch, int> _globalSearch;
|
||||||
private readonly IRepository<CustomEndpoint, Guid> _customEndpointRepository;
|
private readonly IRepository<CustomEndpoint, Guid> _customEndpointRepository;
|
||||||
private readonly IRepository<CustomComponent, Guid> _customComponentRepository;
|
private readonly IRepository<CustomComponent, Guid> _customComponentRepository;
|
||||||
|
|
@ -59,6 +62,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
private readonly IRepository<Question, Guid> _questionRepository;
|
private readonly IRepository<Question, Guid> _questionRepository;
|
||||||
|
|
||||||
public TenantDataSeeder(
|
public TenantDataSeeder(
|
||||||
|
IRepository<IdentityUser, Guid> repositoryUser,
|
||||||
IRepository<GlobalSearch, int> globalSearch,
|
IRepository<GlobalSearch, int> globalSearch,
|
||||||
IRepository<Sector, Guid> sectorRepository,
|
IRepository<Sector, Guid> sectorRepository,
|
||||||
IRepository<UomCategory, Guid> uomCategoryRepository,
|
IRepository<UomCategory, Guid> uomCategoryRepository,
|
||||||
|
|
@ -101,6 +105,7 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
IRepository<Question, Guid> questionRepository
|
IRepository<Question, Guid> questionRepository
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
_repositoryUser = repositoryUser;
|
||||||
_globalSearch = globalSearch;
|
_globalSearch = globalSearch;
|
||||||
_sectorRepository = sectorRepository;
|
_sectorRepository = sectorRepository;
|
||||||
_uomCategoryRepository = uomCategoryRepository;
|
_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)
|
foreach (var item in items.Sources)
|
||||||
{
|
{
|
||||||
var exists = await _sourceRepository.AnyAsync(x => x.Name == item.Name);
|
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<ClassCancellationReasonSeedDto> ClassCancellationReasons { get; set; }
|
||||||
public List<EventTypeSeedDto> EventTypes { get; set; }
|
public List<EventTypeSeedDto> EventTypes { get; set; }
|
||||||
public List<EventCategorySeedDto> EventCategories { get; set; }
|
public List<EventCategorySeedDto> EventCategories { get; set; }
|
||||||
|
public List<EventSeedDto> Events { get; set; }
|
||||||
public List<SourceSeedDto> Sources { get; set; }
|
public List<SourceSeedDto> Sources { get; set; }
|
||||||
public List<InterestingSeedDto> Interesting { get; set; }
|
public List<InterestingSeedDto> Interesting { get; set; }
|
||||||
public List<ProgramSeedDto> Programs { get; set; }
|
public List<ProgramSeedDto> Programs { get; set; }
|
||||||
|
|
@ -321,12 +322,15 @@ public class EventCategorySeedDto
|
||||||
|
|
||||||
public class EventSeedDto
|
public class EventSeedDto
|
||||||
{
|
{
|
||||||
public Guid CategoryId { get; set; }
|
public string CategoryName { get; set; }
|
||||||
public Guid TypeId { get; set; }
|
public string TypeName { get; set; }
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public string Place { get; set; }
|
public string Place { get; set; }
|
||||||
public string Description { get; set; }
|
public string Description { get; set; }
|
||||||
public string Status { 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
|
public class SourceSeedDto
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ export const mockEmployees: HrEmployee[] = [
|
||||||
personalPhone: "+90 532 555 0101",
|
personalPhone: "+90 532 555 0101",
|
||||||
avatar: "https://i.pravatar.cc/150?img=12",
|
avatar: "https://i.pravatar.cc/150?img=12",
|
||||||
nationalId: "12345678901",
|
nationalId: "12345678901",
|
||||||
birthDate: new Date("1988-02-14"),
|
birthDate: new Date("1988-10-20"),
|
||||||
gender: GenderEnum.Male,
|
gender: GenderEnum.Male,
|
||||||
maritalStatus: MaritalStatusEnum.Married,
|
maritalStatus: MaritalStatusEnum.Married,
|
||||||
address: {
|
address: {
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,6 @@ import {
|
||||||
Certificate,
|
Certificate,
|
||||||
ExpenseRequest,
|
ExpenseRequest,
|
||||||
Task,
|
Task,
|
||||||
Birthday,
|
|
||||||
WorkAnniversary,
|
|
||||||
QuickLink,
|
|
||||||
Training,
|
Training,
|
||||||
Reservation,
|
Reservation,
|
||||||
MealMenu,
|
MealMenu,
|
||||||
|
|
@ -127,7 +124,7 @@ export const mockEvents: CalendarEvent[] = [
|
||||||
title: 'Hackathon 2025',
|
title: 'Hackathon 2025',
|
||||||
description: '24 saatlik yazılım geliştirme maratonu. İnovasyon, teknoloji ve takım çalışması!',
|
description: '24 saatlik yazılım geliştirme maratonu. İnovasyon, teknoloji ve takım çalışması!',
|
||||||
type: 'training',
|
type: 'training',
|
||||||
date: new Date('2025-09-10'),
|
date: new Date('2025-20-22'),
|
||||||
location: 'Ofis - Ana Salon',
|
location: 'Ofis - Ana Salon',
|
||||||
organizer: mockEmployees[0],
|
organizer: mockEmployees[0],
|
||||||
participants: 28,
|
participants: 28,
|
||||||
|
|
@ -160,7 +157,7 @@ export const mockEvents: CalendarEvent[] = [
|
||||||
title: 'Kurumsal Futbol Turnuvası',
|
title: 'Kurumsal Futbol Turnuvası',
|
||||||
description: 'Departmanlar arası futbol turnuvasında ter döktük, gol attık ve kazandık! 🏆',
|
description: 'Departmanlar arası futbol turnuvasında ter döktük, gol attık ve kazandık! 🏆',
|
||||||
type: 'sport',
|
type: 'sport',
|
||||||
date: new Date('2025-06-20'),
|
date: new Date('2025-10-25'),
|
||||||
location: 'Spor Kompleksi Halı Saha',
|
location: 'Spor Kompleksi Halı Saha',
|
||||||
organizer: mockEmployees[2],
|
organizer: mockEmployees[2],
|
||||||
participants: 32,
|
participants: 32,
|
||||||
|
|
@ -341,7 +338,7 @@ export const mockTasks: Task[] = [
|
||||||
comments: 1,
|
comments: 1,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
2
|
||||||
export const mockDocuments: Document[] = [
|
export const mockDocuments: Document[] = [
|
||||||
{
|
{
|
||||||
id: 'doc1',
|
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[] = [
|
export const mockTrainings: Training[] = [
|
||||||
{
|
{
|
||||||
id: 'tr1',
|
id: 'tr1',
|
||||||
|
|
@ -635,7 +534,7 @@ export const mockReservations: Reservation[] = [
|
||||||
export const mockMealMenus: MealMenu[] = [
|
export const mockMealMenus: MealMenu[] = [
|
||||||
{
|
{
|
||||||
id: 'menu1',
|
id: 'menu1',
|
||||||
date: new Date('2024-10-21'),
|
date: new Date('2025-10-20'),
|
||||||
dayOfWeek: 'Pazartesi',
|
dayOfWeek: 'Pazartesi',
|
||||||
meals: [
|
meals: [
|
||||||
{
|
{
|
||||||
|
|
@ -647,7 +546,7 @@ export const mockMealMenus: MealMenu[] = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'menu2',
|
id: 'menu2',
|
||||||
date: new Date('2024-10-22'),
|
date: new Date('2025-10-21'),
|
||||||
dayOfWeek: 'Salı',
|
dayOfWeek: 'Salı',
|
||||||
meals: [
|
meals: [
|
||||||
{
|
{
|
||||||
|
|
@ -659,7 +558,7 @@ export const mockMealMenus: MealMenu[] = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'menu3',
|
id: 'menu3',
|
||||||
date: new Date('2024-10-23'),
|
date: new Date('2025-10-22'),
|
||||||
dayOfWeek: 'Çarşamba',
|
dayOfWeek: 'Çarşamba',
|
||||||
meals: [
|
meals: [
|
||||||
{
|
{
|
||||||
|
|
@ -671,7 +570,7 @@ export const mockMealMenus: MealMenu[] = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'menu4',
|
id: 'menu4',
|
||||||
date: new Date('2024-10-24'),
|
date: new Date('2025-10-23'),
|
||||||
dayOfWeek: 'Perşembe',
|
dayOfWeek: 'Perşembe',
|
||||||
meals: [
|
meals: [
|
||||||
{
|
{
|
||||||
|
|
@ -683,7 +582,7 @@ export const mockMealMenus: MealMenu[] = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'menu5',
|
id: 'menu5',
|
||||||
date: new Date('2024-10-25'),
|
date: new Date('2025-10-24'),
|
||||||
dayOfWeek: 'Cuma',
|
dayOfWeek: 'Cuma',
|
||||||
meals: [
|
meals: [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -17,15 +17,6 @@ export interface Announcement {
|
||||||
imageUrl?: string
|
imageUrl?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
// Etkinlik Yorumu
|
|
||||||
export interface EventComment {
|
|
||||||
id: string
|
|
||||||
author: HrEmployee
|
|
||||||
content: string
|
|
||||||
creationTime: Date
|
|
||||||
likes: number
|
|
||||||
}
|
|
||||||
|
|
||||||
// Etkinlik
|
// Etkinlik
|
||||||
export interface CalendarEvent {
|
export interface CalendarEvent {
|
||||||
id: string
|
id: string
|
||||||
|
|
@ -42,6 +33,15 @@ export interface CalendarEvent {
|
||||||
isPublished: boolean
|
isPublished: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Etkinlik Yorumu
|
||||||
|
export interface EventComment {
|
||||||
|
id: string
|
||||||
|
author: HrEmployee
|
||||||
|
content: string
|
||||||
|
creationTime: Date
|
||||||
|
likes: number
|
||||||
|
}
|
||||||
|
|
||||||
// Harcama
|
// Harcama
|
||||||
export interface ExpenseRequest {
|
export interface ExpenseRequest {
|
||||||
id: string
|
id: string
|
||||||
|
|
@ -94,31 +94,6 @@ export interface Document {
|
||||||
tags: string[]
|
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
|
// Eğitim
|
||||||
export interface Training {
|
export interface Training {
|
||||||
id: string
|
id: string
|
||||||
|
|
@ -218,28 +193,7 @@ export interface Visitor {
|
||||||
photo?: string
|
photo?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MediaItem {
|
// Sosyal Duvar
|
||||||
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
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface SocialPost {
|
export interface SocialPost {
|
||||||
id: string
|
id: string
|
||||||
author: {
|
author: {
|
||||||
|
|
@ -295,3 +249,25 @@ export interface SocialPost {
|
||||||
}>
|
}>
|
||||||
isOwnPost: boolean
|
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'
|
import isBetween from 'dayjs/plugin/isBetween'
|
||||||
|
|
||||||
// Widgets
|
// Widgets
|
||||||
import TodayEvents from './widgets/TodayEvents'
|
|
||||||
import TodayBirthdays from './widgets/TodayBirthdays'
|
import TodayBirthdays from './widgets/TodayBirthdays'
|
||||||
import UpcomingEvents from './widgets/UpcomingEvents'
|
import UpcomingEvents from './widgets/UpcomingEvents'
|
||||||
import RecentDocuments from './widgets/RecentDocuments'
|
import RecentDocuments from './widgets/RecentDocuments'
|
||||||
import ImportantAnnouncements from './widgets/ImportantAnnouncements'
|
import ImportantAnnouncements from './widgets/ImportantAnnouncements'
|
||||||
import PriorityTasks from './widgets/PriorityTasks'
|
import PriorityTasks from './widgets/PriorityTasks'
|
||||||
import WeeklyMenu from './widgets/WeeklyMenu'
|
import MealWeeklyMenu from './widgets/MealWeeklyMenu'
|
||||||
import ShuttleSchedule from './widgets/ShuttleSchedule'
|
import ShuttleSchedule from './widgets/ShuttleSchedule'
|
||||||
import LeaveManagement from './widgets/LeaveManagement'
|
import LeaveManagement from './widgets/LeaveManagement'
|
||||||
import OvertimeManagement from './widgets/OvertimeManagement'
|
import OvertimeManagement from './widgets/OvertimeManagement'
|
||||||
|
|
@ -83,11 +82,10 @@ const IntranetDashboard: React.FC = () => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="grid grid-cols-1 lg:grid-cols-10 gap-4">
|
<div className="grid grid-cols-1 lg:grid-cols-11 gap-4">
|
||||||
<div className="lg:col-span-2 space-y-6">
|
<div className="lg:col-span-3 space-y-6">
|
||||||
<TodayEvents />
|
|
||||||
<TodayBirthdays />
|
|
||||||
<UpcomingEvents />
|
<UpcomingEvents />
|
||||||
|
<TodayBirthdays />
|
||||||
<RecentDocuments />
|
<RecentDocuments />
|
||||||
<UpcomingTrainings />
|
<UpcomingTrainings />
|
||||||
<ActiveReservations onNewReservation={() => setShowReservationModal(true)} />
|
<ActiveReservations onNewReservation={() => setShowReservationModal(true)} />
|
||||||
|
|
@ -101,7 +99,7 @@ const IntranetDashboard: React.FC = () => {
|
||||||
<div className="lg:col-span-3 space-y-6">
|
<div className="lg:col-span-3 space-y-6">
|
||||||
<ImportantAnnouncements onAnnouncementClick={setSelectedAnnouncement} />
|
<ImportantAnnouncements onAnnouncementClick={setSelectedAnnouncement} />
|
||||||
<PriorityTasks />
|
<PriorityTasks />
|
||||||
<WeeklyMenu />
|
<MealWeeklyMenu />
|
||||||
<ShuttleSchedule />
|
<ShuttleSchedule />
|
||||||
<LeaveManagement onNewLeave={() => setShowLeaveModal(true)} />
|
<LeaveManagement onNewLeave={() => setShowLeaveModal(true)} />
|
||||||
<OvertimeManagement onNewOvertime={() => setShowOvertimeModal(true)} />
|
<OvertimeManagement onNewOvertime={() => setShowOvertimeModal(true)} />
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import { FaClipboardCheck } from 'react-icons/fa'
|
import { FaClipboardCheck } from 'react-icons/fa'
|
||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs'
|
||||||
import { mockSurveys, Survey } from '../../../mocks/mockIntranet'
|
import { mockSurveys } from '../../../mocks/mockIntranet'
|
||||||
|
import { Survey } from '@/types/intranet'
|
||||||
|
|
||||||
interface ActiveSurveysProps {
|
interface ActiveSurveysProps {
|
||||||
onTakeSurvey: (survey: Survey) => void
|
onTakeSurvey: (survey: Survey) => void
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import { FaBell, FaEye } from 'react-icons/fa'
|
import { FaBell, FaEye } from 'react-icons/fa'
|
||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs'
|
||||||
import { mockAnnouncements, Announcement } from '../../../mocks/mockIntranet'
|
import { mockAnnouncements } from '../../../mocks/mockIntranet'
|
||||||
|
import { Announcement } from '@/types/intranet'
|
||||||
|
|
||||||
interface ImportantAnnouncementsProps {
|
interface ImportantAnnouncementsProps {
|
||||||
onAnnouncementClick: (announcement: Announcement) => void
|
onAnnouncementClick: (announcement: Announcement) => void
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,8 @@ import { mockMealMenus } from '../../../mocks/mockIntranet'
|
||||||
|
|
||||||
dayjs.extend(isBetween)
|
dayjs.extend(isBetween)
|
||||||
|
|
||||||
const WeeklyMenu: React.FC = () => {
|
const MealWeeklyMenu: React.FC = () => {
|
||||||
const weekMenus = mockMealMenus.filter((menu) => {
|
const mealWeekMenus = mockMealMenus.filter((menu) => {
|
||||||
const menuDate = dayjs(menu.date)
|
const menuDate = dayjs(menu.date)
|
||||||
const today = dayjs()
|
const today = dayjs()
|
||||||
const weekStart = today.startOf('week')
|
const weekStart = today.startOf('week')
|
||||||
|
|
@ -26,7 +26,7 @@ const WeeklyMenu: React.FC = () => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="divide-y divide-gray-200 dark:divide-gray-700">
|
<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')
|
const isToday = dayjs(menu.date).isSame(dayjs(), 'day')
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
|
|
@ -70,4 +70,4 @@ const WeeklyMenu: React.FC = () => {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default WeeklyMenu
|
export default MealWeeklyMenu
|
||||||
|
|
@ -1,12 +1,13 @@
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs'
|
||||||
import { mockBirthdays } from '../../../mocks/mockIntranet'
|
import { mockEmployees } from '@/mocks/mockEmployees'
|
||||||
|
|
||||||
const TodayBirthdays: React.FC = () => {
|
const TodayBirthdays: React.FC = () => {
|
||||||
const todayBirthdays = mockBirthdays.filter((b) => {
|
const today = dayjs()
|
||||||
const birthDate = dayjs(b.date)
|
const todayBirthdays = mockEmployees.filter((b) => {
|
||||||
const today = dayjs()
|
return (
|
||||||
return birthDate.month() === today.month() && birthDate.date() === today.date()
|
dayjs(b.birthDate).month() === today.month() && dayjs(b.birthDate).date() === today.date()
|
||||||
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
return (
|
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"
|
className="flex items-center gap-3 p-3 bg-white/50 dark:bg-gray-800/50 rounded-lg"
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
src={birthday.employee.avatar}
|
src={birthday.avatar}
|
||||||
alt={birthday.employee.fullName}
|
alt={birthday.fullName}
|
||||||
className="w-12 h-12 rounded-full border-2 border-pink-300 dark:border-pink-700"
|
className="w-12 h-12 rounded-full border-2 border-pink-300 dark:border-pink-700"
|
||||||
/>
|
/>
|
||||||
<div className="flex-1">
|
<div className="flex-1">
|
||||||
<p className="text-sm font-semibold text-gray-900 dark:text-white">
|
<p className="text-sm font-semibold text-gray-900 dark:text-white">
|
||||||
{birthday.employee.fullName}
|
{birthday.fullName}
|
||||||
</p>
|
</p>
|
||||||
<p className="text-xs text-gray-600 dark:text-gray-400">
|
<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>
|
||||||
<p className="text-xs text-gray-500 dark:text-gray-500 mt-1">
|
<p className="text-xs text-gray-500 dark:text-gray-500 mt-1">
|
||||||
{birthday.employee.department?.name || 'Genel'}
|
{birthday.department?.name || 'Genel'}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue