Activity Service düzenlemesi
This commit is contained in:
parent
f4106ab714
commit
87d155a04b
25 changed files with 1220 additions and 25 deletions
|
|
@ -0,0 +1,16 @@
|
|||
using System;
|
||||
using Volo.Abp.Application.Dtos;
|
||||
|
||||
namespace Kurs.Platform.Entities;
|
||||
|
||||
public class ActivityDto : FullAuditedEntityDto<Guid>
|
||||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
|
||||
public string Type { get; set; }
|
||||
public string Subject { get; set; }
|
||||
public string Content { get; set; }
|
||||
public string RecipientUserName { get; set; }
|
||||
|
||||
protected ActivityDto() { }
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
using System;
|
||||
using Volo.Abp.Application.Dtos;
|
||||
|
||||
namespace Kurs.Platform.Entities;
|
||||
|
||||
public class ActivityFileDto : FullAuditedEntityDto<Guid>
|
||||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
|
||||
public string EntityName { get; set; }
|
||||
public string EntityId { get; set; }
|
||||
public string FileName { get; set; }
|
||||
public long FileSize { get; set; }
|
||||
public string FileType { get; set; }
|
||||
public string FilePath { get; set; }
|
||||
|
||||
public Guid ActivityItemId { get; set; }
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
using System;
|
||||
using Volo.Abp.Application.Dtos;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
|
||||
namespace Kurs.Platform.Entities;
|
||||
|
||||
public class ActivityItemDto : FullAuditedEntityDto<Guid>, IMultiTenant
|
||||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
|
||||
public string Type { get; set; }
|
||||
public string EntityName { get; set; }
|
||||
public string EntityId { get; set; }
|
||||
public Guid? RecipientUserId { get; set; }
|
||||
public string RecipientUserName { get; set; }
|
||||
public string Subject { get; set; }
|
||||
public string Content { get; set; }
|
||||
|
||||
// Navigation properties
|
||||
public Guid ActivityId { get; set; }
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
using System;
|
||||
using Kurs.Platform.Entities;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Volo.Abp.Application.Dtos;
|
||||
using Volo.Abp.Application.Services;
|
||||
using Volo.Abp.Domain.Repositories;
|
||||
|
||||
namespace Kurs.Platform.DataSources;
|
||||
|
||||
[Authorize]
|
||||
public class ActivityAppService : CrudAppService<
|
||||
Activity,
|
||||
ActivityDto,
|
||||
Guid,
|
||||
PagedAndSortedResultRequestDto>
|
||||
{
|
||||
public ActivityAppService(
|
||||
IRepository<Activity, Guid> repo) : base(repo)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
using AutoMapper;
|
||||
using Kurs.Platform.Entities;
|
||||
|
||||
namespace Kurs.Platform.DataSources;
|
||||
|
||||
public class ActivityAutoMapperProfile : Profile
|
||||
{
|
||||
public ActivityAutoMapperProfile()
|
||||
{
|
||||
CreateMap<Activity, ActivityDto>();
|
||||
CreateMap<ActivityItem, ActivityItemDto>();
|
||||
CreateMap<ActivityFile, ActivityFileDto>();
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
using System;
|
||||
using Kurs.Platform.Entities;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Volo.Abp.Application.Dtos;
|
||||
using Volo.Abp.Application.Services;
|
||||
using Volo.Abp.Domain.Repositories;
|
||||
|
||||
namespace Kurs.Platform.DataSources;
|
||||
|
||||
[Authorize]
|
||||
public class ActivityFileAppService : CrudAppService<
|
||||
ActivityFile,
|
||||
ActivityFileDto,
|
||||
Guid,
|
||||
PagedAndSortedResultRequestDto>
|
||||
{
|
||||
public ActivityFileAppService(
|
||||
IRepository<ActivityFile, Guid> repo) : base(repo)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
using System;
|
||||
using Kurs.Platform.Entities;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Volo.Abp.Application.Dtos;
|
||||
using Volo.Abp.Application.Services;
|
||||
using Volo.Abp.Domain.Repositories;
|
||||
|
||||
namespace Kurs.Platform.DataSources;
|
||||
|
||||
[Authorize]
|
||||
public class ActivityItemAppService : CrudAppService<
|
||||
ActivityItem,
|
||||
ActivityItemDto,
|
||||
Guid,
|
||||
PagedAndSortedResultRequestDto>
|
||||
{
|
||||
public ActivityItemAppService(
|
||||
IRepository<ActivityItem, Guid> repo) : base(repo)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -3,9 +3,9 @@ using Volo.Abp.AuditLogging;
|
|||
|
||||
namespace Kurs.Platform.AuditLogs;
|
||||
|
||||
public class LogsAutoMapperProfile : Profile
|
||||
public class AuditLogAutoMapperProfile : Profile
|
||||
{
|
||||
public LogsAutoMapperProfile()
|
||||
public AuditLogAutoMapperProfile()
|
||||
{
|
||||
CreateMap<AuditLog, AuditLogDto>();
|
||||
CreateMap<AuditLogAction, AuditLogActionDto>();
|
||||
|
|
@ -54,6 +54,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.Form,
|
||||
IsSubForm = false,
|
||||
ShowActivity = true,
|
||||
LayoutJson = JsonSerializer.Serialize(new LayoutDto()
|
||||
{
|
||||
Grid = true,
|
||||
|
|
@ -351,6 +352,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.Form,
|
||||
IsSubForm = false,
|
||||
ShowActivity = true,
|
||||
LayoutJson = JsonSerializer.Serialize(new LayoutDto()
|
||||
{
|
||||
Grid = true,
|
||||
|
|
@ -537,6 +539,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.Form,
|
||||
IsSubForm = false,
|
||||
ShowActivity = true,
|
||||
LayoutJson = JsonSerializer.Serialize(new LayoutDto()
|
||||
{
|
||||
Grid = true,
|
||||
|
|
@ -712,6 +715,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.Form,
|
||||
IsSubForm = false,
|
||||
ShowActivity = true,
|
||||
LayoutJson = JsonSerializer.Serialize(new LayoutDto()
|
||||
{
|
||||
Grid = true,
|
||||
|
|
@ -1265,6 +1269,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency
|
|||
{
|
||||
ListFormType = ListFormTypeEnum.Form,
|
||||
IsSubForm = false,
|
||||
ShowActivity = true,
|
||||
LayoutJson = JsonSerializer.Serialize(new LayoutDto()
|
||||
{
|
||||
Grid = true,
|
||||
|
|
|
|||
31
api/src/Kurs.Platform.Domain/Entities/Tenant/Activity.cs
Normal file
31
api/src/Kurs.Platform.Domain/Entities/Tenant/Activity.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Volo.Abp.Domain.Entities.Auditing;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
|
||||
namespace Kurs.Platform.Entities;
|
||||
|
||||
public class Activity : FullAuditedEntity<Guid>, IMultiTenant
|
||||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
|
||||
public string Type { get; set; }
|
||||
public string Subject { get; set; }
|
||||
public string Content { get; set; }
|
||||
public Guid? RecipientUserId { get; set; }
|
||||
public string RecipientUserName { get; set; }
|
||||
|
||||
public ICollection<ActivityItem> ActivityItems { get; set; }
|
||||
|
||||
protected Activity() { }
|
||||
|
||||
public Activity(Guid id, string type, string subject, string content, string recipientUserName = null)
|
||||
: base(id)
|
||||
{
|
||||
Type = type;
|
||||
Subject = subject;
|
||||
Content = content;
|
||||
RecipientUserName = recipientUserName;
|
||||
ActivityItems = new List<ActivityItem>();
|
||||
}
|
||||
}
|
||||
43
api/src/Kurs.Platform.Domain/Entities/Tenant/ActivityFile.cs
Normal file
43
api/src/Kurs.Platform.Domain/Entities/Tenant/ActivityFile.cs
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
using System;
|
||||
using Volo.Abp.Domain.Entities.Auditing;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
|
||||
namespace Kurs.Platform.Entities;
|
||||
|
||||
public class ActivityFile : FullAuditedEntity<Guid>, IMultiTenant
|
||||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
|
||||
public string EntityName { get; set; }
|
||||
public string EntityId { get; set; }
|
||||
public string FileName { get; set; }
|
||||
public long FileSize { get; set; }
|
||||
public string FileType { get; set; }
|
||||
public string FilePath { get; set; }
|
||||
|
||||
// Navigation properties
|
||||
public Guid ActivityItemId { get; set; }
|
||||
public ActivityItem ActivityItem { get; set; }
|
||||
|
||||
protected ActivityFile() { }
|
||||
|
||||
public ActivityFile(
|
||||
Guid id,
|
||||
Guid activityItemId,
|
||||
string entityName,
|
||||
string entityId,
|
||||
string fileName,
|
||||
long fileSize,
|
||||
string fileType,
|
||||
string filePath)
|
||||
: base(id)
|
||||
{
|
||||
ActivityItemId = activityItemId;
|
||||
EntityName = entityName;
|
||||
EntityId = entityId;
|
||||
FileName = fileName;
|
||||
FileSize = fileSize;
|
||||
FileType = fileType;
|
||||
FilePath = filePath;
|
||||
}
|
||||
}
|
||||
50
api/src/Kurs.Platform.Domain/Entities/Tenant/ActivityItem.cs
Normal file
50
api/src/Kurs.Platform.Domain/Entities/Tenant/ActivityItem.cs
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Volo.Abp.Domain.Entities.Auditing;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
|
||||
namespace Kurs.Platform.Entities;
|
||||
|
||||
public class ActivityItem : FullAuditedEntity<Guid>, IMultiTenant
|
||||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
|
||||
public string Type { get; set; }
|
||||
public string EntityName { get; set; }
|
||||
public string EntityId { get; set; }
|
||||
public Guid? RecipientUserId { get; set; }
|
||||
public string RecipientUserName { get; set; }
|
||||
public string Subject { get; set; }
|
||||
public string Content { get; set; }
|
||||
|
||||
// Navigation properties
|
||||
public Guid ActivityId { get; set; }
|
||||
public Activity Activity { get; set; }
|
||||
|
||||
public ICollection<ActivityFile> AttachedFiles { get; set; }
|
||||
|
||||
protected ActivityItem() { }
|
||||
|
||||
public ActivityItem(
|
||||
Guid id,
|
||||
Guid activityId,
|
||||
string type,
|
||||
string entityName,
|
||||
string entityId,
|
||||
string subject,
|
||||
string content,
|
||||
Guid? recipientUserId = null,
|
||||
string recipientUserName = null)
|
||||
: base(id)
|
||||
{
|
||||
ActivityId = activityId;
|
||||
Type = type;
|
||||
EntityName = entityName;
|
||||
EntityId = entityId;
|
||||
Subject = subject;
|
||||
Content = content;
|
||||
RecipientUserId = recipientUserId;
|
||||
RecipientUserName = recipientUserName;
|
||||
AttachedFiles = [];
|
||||
}
|
||||
}
|
||||
|
|
@ -63,6 +63,9 @@ public class PlatformDbContext :
|
|||
public DbSet<ReportParameter> ReportParameters { get; set; }
|
||||
public DbSet<ReportGenerated> ReportGenerated { get; set; }
|
||||
public DbSet<ReportCategory> ReportCategories { get; set; }
|
||||
public DbSet<Activity> Activities { get; set; }
|
||||
public DbSet<ActivityItem> ActivityItems { get; set; }
|
||||
public DbSet<ActivityFile> ActivityFiles { get; set; }
|
||||
#endregion
|
||||
|
||||
#region Definitions from the modules
|
||||
|
|
@ -1549,5 +1552,72 @@ public class PlatformDbContext :
|
|||
b.HasIndex(x => x.SenderId);
|
||||
b.HasIndex(x => x.Timestamp);
|
||||
});
|
||||
|
||||
// Form Activity Entities
|
||||
builder.Entity<Activity>(b =>
|
||||
{
|
||||
b.ToTable(Prefix.DbTableDefault + nameof(Activity), Prefix.DbSchema);
|
||||
b.ConfigureByConvention();
|
||||
|
||||
b.Property(x => x.Subject).IsRequired().HasMaxLength(256);
|
||||
b.Property(x => x.Content).IsRequired().HasMaxLength(2000);
|
||||
b.Property(x => x.RecipientUserName).HasMaxLength(100);
|
||||
b.Property(x => x.Type).IsRequired();
|
||||
|
||||
b.HasIndex(x => x.Type);
|
||||
b.HasIndex(x => x.CreatorId);
|
||||
b.HasIndex(x => x.CreationTime);
|
||||
});
|
||||
|
||||
builder.Entity<ActivityItem>(b =>
|
||||
{
|
||||
b.ToTable(Prefix.DbTableDefault + nameof(ActivityItem), Prefix.DbSchema);
|
||||
b.ConfigureByConvention();
|
||||
|
||||
b.Property(x => x.EntityName).IsRequired().HasMaxLength(128);
|
||||
b.Property(x => x.EntityId).IsRequired().HasMaxLength(128);
|
||||
b.Property(x => x.Subject).IsRequired().HasMaxLength(256);
|
||||
b.Property(x => x.Content).IsRequired().HasMaxLength(2000);
|
||||
b.Property(x => x.RecipientUserName).HasMaxLength(100);
|
||||
b.Property(x => x.Type).IsRequired();
|
||||
|
||||
// Foreign key relationship
|
||||
b.HasOne(ai => ai.Activity)
|
||||
.WithMany(a => a.ActivityItems)
|
||||
.HasForeignKey(ai => ai.ActivityId)
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasIndex(x => x.ActivityId);
|
||||
b.HasIndex(x => x.EntityName);
|
||||
b.HasIndex(x => x.EntityId);
|
||||
b.HasIndex(x => x.Type);
|
||||
b.HasIndex(x => x.RecipientUserId);
|
||||
b.HasIndex(x => x.CreatorId);
|
||||
});
|
||||
|
||||
builder.Entity<ActivityFile>(b =>
|
||||
{
|
||||
b.ToTable(Prefix.DbTableDefault + nameof(ActivityFile), Prefix.DbSchema);
|
||||
b.ConfigureByConvention();
|
||||
|
||||
b.Property(x => x.EntityName).IsRequired().HasMaxLength(128);
|
||||
b.Property(x => x.EntityId).IsRequired().HasMaxLength(128);
|
||||
b.Property(x => x.FileName).IsRequired().HasMaxLength(256);
|
||||
b.Property(x => x.FileType).IsRequired().HasMaxLength(50);
|
||||
b.Property(x => x.FilePath).IsRequired().HasMaxLength(512);
|
||||
b.Property(x => x.FileSize).IsRequired();
|
||||
|
||||
// Foreign key relationship
|
||||
b.HasOne(af => af.ActivityItem)
|
||||
.WithMany(ai => ai.AttachedFiles)
|
||||
.HasForeignKey(af => af.ActivityItemId)
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasIndex(x => x.ActivityItemId);
|
||||
b.HasIndex(x => x.EntityName);
|
||||
b.HasIndex(x => x.EntityId);
|
||||
b.HasIndex(x => x.FileName);
|
||||
b.HasIndex(x => x.CreatorId);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
|
|||
namespace Kurs.Platform.Migrations
|
||||
{
|
||||
[DbContext(typeof(PlatformDbContext))]
|
||||
[Migration("20251013115205_Initial")]
|
||||
[Migration("20251013134213_Initial")]
|
||||
partial class Initial
|
||||
{
|
||||
/// <inheritdoc />
|
||||
|
|
@ -625,6 +625,247 @@ namespace Kurs.Platform.Migrations
|
|||
b.ToTable("WAbout", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.Activity", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Content")
|
||||
.IsRequired()
|
||||
.HasMaxLength(2000)
|
||||
.HasColumnType("nvarchar(2000)");
|
||||
|
||||
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<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<string>("RecipientUserName")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<string>("Subject")
|
||||
.IsRequired()
|
||||
.HasMaxLength(256)
|
||||
.HasColumnType("nvarchar(256)");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.Property<int>("Type")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CreationTime");
|
||||
|
||||
b.HasIndex("CreatorId");
|
||||
|
||||
b.HasIndex("Type");
|
||||
|
||||
b.ToTable("PActivity", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.ActivityFile", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid>("ActivityItemId")
|
||||
.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<string>("EntityId")
|
||||
.IsRequired()
|
||||
.HasMaxLength(128)
|
||||
.HasColumnType("nvarchar(128)");
|
||||
|
||||
b.Property<string>("EntityName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(128)
|
||||
.HasColumnType("nvarchar(128)");
|
||||
|
||||
b.Property<string>("FileName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(256)
|
||||
.HasColumnType("nvarchar(256)");
|
||||
|
||||
b.Property<string>("FilePath")
|
||||
.IsRequired()
|
||||
.HasMaxLength(512)
|
||||
.HasColumnType("nvarchar(512)");
|
||||
|
||||
b.Property<long>("FileSize")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<string>("FileType")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
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.HasKey("Id");
|
||||
|
||||
b.HasIndex("ActivityItemId");
|
||||
|
||||
b.HasIndex("CreatorId");
|
||||
|
||||
b.HasIndex("EntityId");
|
||||
|
||||
b.HasIndex("EntityName");
|
||||
|
||||
b.HasIndex("FileName");
|
||||
|
||||
b.ToTable("PActivityFile", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.ActivityItem", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid>("ActivityId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Content")
|
||||
.IsRequired()
|
||||
.HasMaxLength(2000)
|
||||
.HasColumnType("nvarchar(2000)");
|
||||
|
||||
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<string>("EntityId")
|
||||
.IsRequired()
|
||||
.HasMaxLength(128)
|
||||
.HasColumnType("nvarchar(128)");
|
||||
|
||||
b.Property<string>("EntityName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(128)
|
||||
.HasColumnType("nvarchar(128)");
|
||||
|
||||
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?>("RecipientUserId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("RecipientUserName")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<string>("Subject")
|
||||
.IsRequired()
|
||||
.HasMaxLength(256)
|
||||
.HasColumnType("nvarchar(256)");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.Property<int>("Type")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ActivityId");
|
||||
|
||||
b.HasIndex("CreatorId");
|
||||
|
||||
b.HasIndex("EntityId");
|
||||
|
||||
b.HasIndex("EntityName");
|
||||
|
||||
b.HasIndex("RecipientUserId");
|
||||
|
||||
b.HasIndex("Type");
|
||||
|
||||
b.ToTable("PActivityItem", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.AiBot", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
|
|
@ -8619,6 +8860,28 @@ namespace Kurs.Platform.Migrations
|
|||
b.Navigation("NotificationRule");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.ActivityFile", b =>
|
||||
{
|
||||
b.HasOne("Kurs.Platform.Entities.ActivityItem", "ActivityItem")
|
||||
.WithMany("AttachedFiles")
|
||||
.HasForeignKey("ActivityItemId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("ActivityItem");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.ActivityItem", b =>
|
||||
{
|
||||
b.HasOne("Kurs.Platform.Entities.Activity", "Activity")
|
||||
.WithMany("ActivityItems")
|
||||
.HasForeignKey("ActivityId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Activity");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.ApiEndpoint", b =>
|
||||
{
|
||||
b.HasOne("Kurs.Platform.Entities.CustomEntity", "Entity")
|
||||
|
|
@ -9117,6 +9380,16 @@ namespace Kurs.Platform.Migrations
|
|||
b.Navigation("Notifications");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.Activity", b =>
|
||||
{
|
||||
b.Navigation("ActivityItems");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.ActivityItem", b =>
|
||||
{
|
||||
b.Navigation("AttachedFiles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.BlogCategory", b =>
|
||||
{
|
||||
b.Navigation("Posts");
|
||||
|
|
@ -1208,6 +1208,29 @@ namespace Kurs.Platform.Migrations
|
|||
table.PrimaryKey("PK_OpenIddictScopes", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PActivity",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
Type = table.Column<int>(type: "int", nullable: false),
|
||||
Subject = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
|
||||
Content = table.Column<string>(type: "nvarchar(2000)", maxLength: 2000, nullable: false),
|
||||
RecipientUserName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, 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_PActivity", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PAiBot",
|
||||
columns: table => new
|
||||
|
|
@ -2589,6 +2612,39 @@ namespace Kurs.Platform.Migrations
|
|||
principalColumn: "Id");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PActivityItem",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
Type = table.Column<int>(type: "int", nullable: false),
|
||||
EntityName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
|
||||
EntityId = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
|
||||
RecipientUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
RecipientUserName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
|
||||
Subject = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
|
||||
Content = table.Column<string>(type: "nvarchar(2000)", maxLength: 2000, nullable: false),
|
||||
ActivityId = table.Column<Guid>(type: "uniqueidentifier", nullable: 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),
|
||||
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_PActivityItem", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_PActivityItem_PActivity_ActivityId",
|
||||
column: x => x.ActivityId,
|
||||
principalTable: "PActivity",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PBackgroundWorker_MailQueue",
|
||||
columns: table => new
|
||||
|
|
@ -3292,6 +3348,38 @@ namespace Kurs.Platform.Migrations
|
|||
principalColumn: "Id");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PActivityFile",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
EntityName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
|
||||
EntityId = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
|
||||
FileName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
|
||||
FileSize = table.Column<long>(type: "bigint", nullable: false),
|
||||
FileType = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
|
||||
FilePath = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: false),
|
||||
ActivityItemId = table.Column<Guid>(type: "uniqueidentifier", nullable: 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),
|
||||
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_PActivityFile", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_PActivityFile_PActivityItem_ActivityItemId",
|
||||
column: x => x.ActivityItemId,
|
||||
principalTable: "PActivityItem",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PBackgroundWorker_MailQueueEvents",
|
||||
columns: table => new
|
||||
|
|
@ -3831,6 +3919,76 @@ namespace Kurs.Platform.Migrations
|
|||
table: "OpenIddictTokens",
|
||||
column: "ReferenceId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PActivity_CreationTime",
|
||||
table: "PActivity",
|
||||
column: "CreationTime");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PActivity_CreatorId",
|
||||
table: "PActivity",
|
||||
column: "CreatorId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PActivity_Type",
|
||||
table: "PActivity",
|
||||
column: "Type");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PActivityFile_ActivityItemId",
|
||||
table: "PActivityFile",
|
||||
column: "ActivityItemId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PActivityFile_CreatorId",
|
||||
table: "PActivityFile",
|
||||
column: "CreatorId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PActivityFile_EntityId",
|
||||
table: "PActivityFile",
|
||||
column: "EntityId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PActivityFile_EntityName",
|
||||
table: "PActivityFile",
|
||||
column: "EntityName");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PActivityFile_FileName",
|
||||
table: "PActivityFile",
|
||||
column: "FileName");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PActivityItem_ActivityId",
|
||||
table: "PActivityItem",
|
||||
column: "ActivityId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PActivityItem_CreatorId",
|
||||
table: "PActivityItem",
|
||||
column: "CreatorId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PActivityItem_EntityId",
|
||||
table: "PActivityItem",
|
||||
column: "EntityId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PActivityItem_EntityName",
|
||||
table: "PActivityItem",
|
||||
column: "EntityName");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PActivityItem_RecipientUserId",
|
||||
table: "PActivityItem",
|
||||
column: "RecipientUserId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PActivityItem_Type",
|
||||
table: "PActivityItem",
|
||||
column: "Type");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PApiEndpoint_EntityId",
|
||||
table: "PApiEndpoint",
|
||||
|
|
@ -4219,6 +4377,9 @@ namespace Kurs.Platform.Migrations
|
|||
migrationBuilder.DropTable(
|
||||
name: "OpenIddictTokens");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "PActivityFile");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "PAiBot");
|
||||
|
||||
|
|
@ -4372,6 +4533,9 @@ namespace Kurs.Platform.Migrations
|
|||
migrationBuilder.DropTable(
|
||||
name: "OpenIddictAuthorizations");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "PActivityItem");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "PBackgroundWorker_MailQueue");
|
||||
|
||||
|
|
@ -4417,6 +4581,9 @@ namespace Kurs.Platform.Migrations
|
|||
migrationBuilder.DropTable(
|
||||
name: "OpenIddictApplications");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "PActivity");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "PBackgroundWorker_MailQueueTableFormat");
|
||||
|
||||
|
|
@ -622,6 +622,247 @@ namespace Kurs.Platform.Migrations
|
|||
b.ToTable("WAbout", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.Activity", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Content")
|
||||
.IsRequired()
|
||||
.HasMaxLength(2000)
|
||||
.HasColumnType("nvarchar(2000)");
|
||||
|
||||
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<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<string>("RecipientUserName")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<string>("Subject")
|
||||
.IsRequired()
|
||||
.HasMaxLength(256)
|
||||
.HasColumnType("nvarchar(256)");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.Property<int>("Type")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CreationTime");
|
||||
|
||||
b.HasIndex("CreatorId");
|
||||
|
||||
b.HasIndex("Type");
|
||||
|
||||
b.ToTable("PActivity", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.ActivityFile", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid>("ActivityItemId")
|
||||
.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<string>("EntityId")
|
||||
.IsRequired()
|
||||
.HasMaxLength(128)
|
||||
.HasColumnType("nvarchar(128)");
|
||||
|
||||
b.Property<string>("EntityName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(128)
|
||||
.HasColumnType("nvarchar(128)");
|
||||
|
||||
b.Property<string>("FileName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(256)
|
||||
.HasColumnType("nvarchar(256)");
|
||||
|
||||
b.Property<string>("FilePath")
|
||||
.IsRequired()
|
||||
.HasMaxLength(512)
|
||||
.HasColumnType("nvarchar(512)");
|
||||
|
||||
b.Property<long>("FileSize")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<string>("FileType")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
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.HasKey("Id");
|
||||
|
||||
b.HasIndex("ActivityItemId");
|
||||
|
||||
b.HasIndex("CreatorId");
|
||||
|
||||
b.HasIndex("EntityId");
|
||||
|
||||
b.HasIndex("EntityName");
|
||||
|
||||
b.HasIndex("FileName");
|
||||
|
||||
b.ToTable("PActivityFile", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.ActivityItem", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid>("ActivityId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("Content")
|
||||
.IsRequired()
|
||||
.HasMaxLength(2000)
|
||||
.HasColumnType("nvarchar(2000)");
|
||||
|
||||
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<string>("EntityId")
|
||||
.IsRequired()
|
||||
.HasMaxLength(128)
|
||||
.HasColumnType("nvarchar(128)");
|
||||
|
||||
b.Property<string>("EntityName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(128)
|
||||
.HasColumnType("nvarchar(128)");
|
||||
|
||||
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?>("RecipientUserId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("RecipientUserName")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<string>("Subject")
|
||||
.IsRequired()
|
||||
.HasMaxLength(256)
|
||||
.HasColumnType("nvarchar(256)");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.Property<int>("Type")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ActivityId");
|
||||
|
||||
b.HasIndex("CreatorId");
|
||||
|
||||
b.HasIndex("EntityId");
|
||||
|
||||
b.HasIndex("EntityName");
|
||||
|
||||
b.HasIndex("RecipientUserId");
|
||||
|
||||
b.HasIndex("Type");
|
||||
|
||||
b.ToTable("PActivityItem", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.AiBot", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
|
|
@ -8616,6 +8857,28 @@ namespace Kurs.Platform.Migrations
|
|||
b.Navigation("NotificationRule");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.ActivityFile", b =>
|
||||
{
|
||||
b.HasOne("Kurs.Platform.Entities.ActivityItem", "ActivityItem")
|
||||
.WithMany("AttachedFiles")
|
||||
.HasForeignKey("ActivityItemId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("ActivityItem");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.ActivityItem", b =>
|
||||
{
|
||||
b.HasOne("Kurs.Platform.Entities.Activity", "Activity")
|
||||
.WithMany("ActivityItems")
|
||||
.HasForeignKey("ActivityId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Activity");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.ApiEndpoint", b =>
|
||||
{
|
||||
b.HasOne("Kurs.Platform.Entities.CustomEntity", "Entity")
|
||||
|
|
@ -9114,6 +9377,16 @@ namespace Kurs.Platform.Migrations
|
|||
b.Navigation("Notifications");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.Activity", b =>
|
||||
{
|
||||
b.Navigation("ActivityItems");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.ActivityItem", b =>
|
||||
{
|
||||
b.Navigation("AttachedFiles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Kurs.Platform.Entities.BlogCategory", b =>
|
||||
{
|
||||
b.Navigation("Posts");
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
.menu-item {
|
||||
@apply cursor-pointer font-medium rounded-md flex items-center w-full whitespace-nowrap gap-x-1 px-0.5;
|
||||
@apply cursor-pointer font-medium rounded-md flex items-center w-full whitespace-nowrap gap-x-1 px-1.5;
|
||||
|
||||
&.menu-item-light {
|
||||
@apply text-gray-600;
|
||||
|
|
|
|||
32
ui/src/proxy/activity/models.ts
Normal file
32
ui/src/proxy/activity/models.ts
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
import { FullAuditedEntityDto } from "../abp";
|
||||
|
||||
export interface ActivityDto extends FullAuditedEntityDto<string> {
|
||||
tenantId?: string;
|
||||
type?: string;
|
||||
subject?: string;
|
||||
content?: string;
|
||||
recipientUserName?: string;
|
||||
}
|
||||
|
||||
export interface ActivityFileDto extends FullAuditedEntityDto<string> {
|
||||
tenantId?: string;
|
||||
entityName?: string;
|
||||
entityId?: string;
|
||||
fileName?: string;
|
||||
fileSize?: number;
|
||||
fileType?: string;
|
||||
filePath?: string;
|
||||
activityItemId: string;
|
||||
}
|
||||
|
||||
export interface ActivityItemDto extends FullAuditedEntityDto<string> {
|
||||
tenantId?: string;
|
||||
type?: string;
|
||||
entityName?: string;
|
||||
entityId?: string;
|
||||
recipientUserId?: string;
|
||||
recipientUserName?: string;
|
||||
subject?: string;
|
||||
content?: string;
|
||||
activityId: string;
|
||||
}
|
||||
134
ui/src/services/activity.service.ts
Normal file
134
ui/src/services/activity.service.ts
Normal file
|
|
@ -0,0 +1,134 @@
|
|||
import { ActivityDto, ActivityItemDto, ActivityFileDto } from '@/proxy/activity/models'
|
||||
import apiService from '@/services/api.service'
|
||||
|
||||
class ActivityService {
|
||||
async getList(params?: any): Promise<ActivityDto[]> {
|
||||
const response = await apiService.fetchData<ActivityDto[]>({
|
||||
url: '/api/app/activity',
|
||||
method: 'GET',
|
||||
params,
|
||||
})
|
||||
return response.data
|
||||
}
|
||||
|
||||
async get(id: string): Promise<ActivityDto> {
|
||||
const response = await apiService.fetchData<ActivityDto>({
|
||||
url: `/api/app/activity/${id}`,
|
||||
method: 'GET',
|
||||
})
|
||||
return response.data
|
||||
}
|
||||
|
||||
async create(data: ActivityDto): Promise<ActivityDto> {
|
||||
const response = await apiService.fetchData<ActivityDto>({
|
||||
url: '/api/app/activity',
|
||||
method: 'POST',
|
||||
data: data as any,
|
||||
})
|
||||
return response.data
|
||||
}
|
||||
|
||||
async update(id: string, data: ActivityDto): Promise<ActivityDto> {
|
||||
const response = await apiService.fetchData<ActivityDto>({
|
||||
url: `/api/app/activity/${id}`,
|
||||
method: 'PUT',
|
||||
data: data as any,
|
||||
})
|
||||
return response.data
|
||||
}
|
||||
|
||||
async delete(id: string): Promise<void> {
|
||||
await apiService.fetchData({
|
||||
url: `/api/app/activity/${id}`,
|
||||
method: 'DELETE',
|
||||
})
|
||||
}
|
||||
|
||||
// 🔹 ActivityItem kayıtları ---------------------------------------------------
|
||||
async getItems(activityId?: string): Promise<ActivityItemDto[]> {
|
||||
const response = await apiService.fetchData<ActivityItemDto[]>({
|
||||
url: '/api/app/activity-item',
|
||||
method: 'GET',
|
||||
params: { activityId },
|
||||
})
|
||||
return response.data
|
||||
}
|
||||
|
||||
async getItem(id: string): Promise<ActivityItemDto> {
|
||||
const response = await apiService.fetchData<ActivityItemDto>({
|
||||
url: `/api/app/activity-item/${id}`,
|
||||
method: 'GET',
|
||||
})
|
||||
return response.data
|
||||
}
|
||||
|
||||
async createItem(data: ActivityItemDto): Promise<ActivityItemDto> {
|
||||
const response = await apiService.fetchData<ActivityItemDto>({
|
||||
url: '/api/app/activity-item',
|
||||
method: 'POST',
|
||||
data: data as any,
|
||||
})
|
||||
return response.data
|
||||
}
|
||||
|
||||
async updateItem(id: string, data: ActivityItemDto): Promise<ActivityItemDto> {
|
||||
const response = await apiService.fetchData<ActivityItemDto>({
|
||||
url: `/api/app/activity-item/${id}`,
|
||||
method: 'PUT',
|
||||
data: data as any,
|
||||
})
|
||||
return response.data
|
||||
}
|
||||
|
||||
async deleteItem(id: string): Promise<void> {
|
||||
await apiService.fetchData({
|
||||
url: `/api/app/activity-item/${id}`,
|
||||
method: 'DELETE',
|
||||
})
|
||||
}
|
||||
|
||||
// 🔹 ActivityFile kayıtları ---------------------------------------------------
|
||||
async getFiles(activityItemId?: string): Promise<ActivityFileDto[]> {
|
||||
const response = await apiService.fetchData<ActivityFileDto[]>({
|
||||
url: '/api/app/activity-file',
|
||||
method: 'GET',
|
||||
params: { activityItemId },
|
||||
})
|
||||
return response.data
|
||||
}
|
||||
|
||||
async getFile(id: string): Promise<ActivityFileDto> {
|
||||
const response = await apiService.fetchData<ActivityFileDto>({
|
||||
url: `/api/app/activity-file/${id}`,
|
||||
method: 'GET',
|
||||
})
|
||||
return response.data
|
||||
}
|
||||
|
||||
async uploadFile(data: ActivityFileDto): Promise<ActivityFileDto> {
|
||||
const response = await apiService.fetchData<ActivityFileDto>({
|
||||
url: '/api/app/activity-file',
|
||||
method: 'POST',
|
||||
data: data as any,
|
||||
})
|
||||
return response.data
|
||||
}
|
||||
|
||||
async updateFile(id: string, data: ActivityFileDto): Promise<ActivityFileDto> {
|
||||
const response = await apiService.fetchData<ActivityFileDto>({
|
||||
url: `/api/app/activity-file/${id}`,
|
||||
method: 'PUT',
|
||||
data: data as any,
|
||||
})
|
||||
return response.data
|
||||
}
|
||||
|
||||
async deleteFile(id: string): Promise<void> {
|
||||
await apiService.fetchData({
|
||||
url: `/api/app/activity-file/${id}`,
|
||||
method: 'DELETE',
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export const activityService = new ActivityService()
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
// import { ChartJsonItemRowDto } from '../proxy/admin/charts/models'
|
||||
// import apiService from './api.service'
|
||||
|
||||
// export const deleteChartJsonItem = (
|
||||
// id: string,
|
||||
// listFormCode: string,
|
||||
// index: number,
|
||||
// fieldName: string,
|
||||
// ) =>
|
||||
// apiService.fetchData({
|
||||
// method: 'DELETE',
|
||||
// url: `/api/app/charts/chart-json-item?id=${id}&listFormCode=${listFormCode}&index=${index}&fieldName=${fieldName}`,
|
||||
// })
|
||||
|
||||
// export const putChartJsonItem = (input: ChartJsonItemRowDto) =>
|
||||
// apiService.fetchData({
|
||||
// method: 'PUT',
|
||||
// url: `/api/app/charts/chart-json-item`,
|
||||
// data: input,
|
||||
// })
|
||||
|
|
@ -170,11 +170,12 @@ export const FormActivityPanel: React.FC<ActivityPanelProps> = ({
|
|||
<Button
|
||||
variant="solid"
|
||||
size="sm"
|
||||
shape='none'
|
||||
className="!rounded-l-full !rounded-r-none"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation()
|
||||
onToggle()
|
||||
}}
|
||||
className="rounded-l-lg rounded-r-none shadow-lg hover:shadow-xl transition-shadow"
|
||||
title={isVisible ? 'Aktivite panelini kapat' : 'Aktivite panelini aç'}
|
||||
>
|
||||
<div className="flex items-center gap-2">
|
||||
|
|
|
|||
Loading…
Reference in a new issue