mirror of https://github.com/abpframework/eventhub
12 changed files with 2737 additions and 34 deletions
@ -0,0 +1,27 @@ |
|||
using System; |
|||
using Volo.Abp.Domain.Entities.Auditing; |
|||
|
|||
namespace EventHub.Events.Registrations |
|||
{ |
|||
public class EventRegistration : CreationAuditedAggregateRoot<Guid> |
|||
{ |
|||
public Guid EventId { get; private set; } |
|||
|
|||
public Guid UserId { get; private set; } |
|||
|
|||
private EventRegistration() |
|||
{ |
|||
|
|||
} |
|||
|
|||
public EventRegistration( |
|||
Guid id, |
|||
Guid eventId, |
|||
Guid userId) |
|||
: base(id) |
|||
{ |
|||
EventId = eventId; |
|||
UserId = userId; |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,18 @@ |
|||
using System; |
|||
using Volo.Abp.Domain.Repositories; |
|||
using Volo.Abp.Domain.Services; |
|||
|
|||
namespace EventHub.Events.Registrations |
|||
{ |
|||
public class EventRegistrationManager : DomainService |
|||
{ |
|||
private readonly IRepository<EventRegistration, Guid> _eventRegistrationRepository; |
|||
|
|||
public EventRegistrationManager( |
|||
IRepository<EventRegistration, Guid> eventRegistrationRepository |
|||
) |
|||
{ |
|||
_eventRegistrationRepository = eventRegistrationRepository; |
|||
} |
|||
} |
|||
} |
|||
File diff suppressed because it is too large
@ -0,0 +1,85 @@ |
|||
using System; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
namespace EventHub.Migrations |
|||
{ |
|||
public partial class Added_EventRegistration : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.CreateTable( |
|||
name: "AppEventRegistrations", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
EventId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true), |
|||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AppEventRegistrations", x => x.Id); |
|||
table.ForeignKey( |
|||
name: "FK_AppEventRegistrations_AbpUsers_UserId", |
|||
column: x => x.UserId, |
|||
principalTable: "AbpUsers", |
|||
principalColumn: "Id"); |
|||
table.ForeignKey( |
|||
name: "FK_AppEventRegistrations_AppEvents_EventId", |
|||
column: x => x.EventId, |
|||
principalTable: "AppEvents", |
|||
principalColumn: "Id"); |
|||
}); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AppOrganizations_OwnerUserId", |
|||
table: "AppOrganizations", |
|||
column: "OwnerUserId"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AppEventRegistrations_EventId_UserId", |
|||
table: "AppEventRegistrations", |
|||
columns: new[] { "EventId", "UserId" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AppEventRegistrations_UserId", |
|||
table: "AppEventRegistrations", |
|||
column: "UserId"); |
|||
|
|||
migrationBuilder.AddForeignKey( |
|||
name: "FK_AppEvents_AppOrganizations_OrganizationId", |
|||
table: "AppEvents", |
|||
column: "OrganizationId", |
|||
principalTable: "AppOrganizations", |
|||
principalColumn: "Id"); |
|||
|
|||
migrationBuilder.AddForeignKey( |
|||
name: "FK_AppOrganizations_AbpUsers_OwnerUserId", |
|||
table: "AppOrganizations", |
|||
column: "OwnerUserId", |
|||
principalTable: "AbpUsers", |
|||
principalColumn: "Id"); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropForeignKey( |
|||
name: "FK_AppEvents_AppOrganizations_OrganizationId", |
|||
table: "AppEvents"); |
|||
|
|||
migrationBuilder.DropForeignKey( |
|||
name: "FK_AppOrganizations_AbpUsers_OwnerUserId", |
|||
table: "AppOrganizations"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AppEventRegistrations"); |
|||
|
|||
migrationBuilder.DropIndex( |
|||
name: "IX_AppOrganizations_OwnerUserId", |
|||
table: "AppOrganizations"); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,9 @@ |
|||
using Volo.Abp.AspNetCore.Mvc; |
|||
|
|||
namespace EventHub.Web.Pages.Events.Components.RegistrationArea |
|||
{ |
|||
public class RegistrationAreaViewComponent : AbpViewComponent |
|||
{ |
|||
|
|||
} |
|||
} |
|||
Loading…
Reference in new issue