Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .vs/ExamNETWebAPI/v17/.wsuo
Binary file not shown.
12 changes: 12 additions & 0 deletions .vs/ExamNETWebAPI/v17/DocumentLayout.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"Version": 1,
"WorkspaceRootPath": "C:\\Users\\nicho\\source\\repos\\ExamNETWebAPI\\",
"Documents": [],
"DocumentGroupContainers": [
{
"Orientation": 0,
"VerticalTabListWidth": 256,
"DocumentGroups": []
}
]
}
6 changes: 6 additions & 0 deletions .vs/VSWorkspaceState.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"ExpandedNodes": [
""
],
"PreviewInSolutionExplorer": false
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Contracts.BookTicketModels.ResponseModel;
using MediatR;

namespace Contracts.BookTicketModels.RequestModel
{
public class DeleteBookTicketRequest : IRequest<DeleteUpdateBookTicketResponse>
{
public Guid BookedId { get; set; }
public string TicketID { get; set; } = string.Empty;
public int Quantity { get; set; }
}


}

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Contracts.BookTicketModels.ResponseModel;
using MediatR;

namespace Contracts.BookTicketModels.RequestModel
{
public class GetBookTicketDataRequest : IRequest<GetBookTicketDataResponse>
{

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Contracts.BookTicketModel.ResponseModel;
using MediatR;

namespace Contracts.BookTicketModel.RequestModel
{
public class GetBookedTicketByIdRequest : GetTicketModel, IRequest<GetBookedTicketByIdResponse>
{
public Guid BookedId { get; set; }
}

public class GetTicketModel
{

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Contracts.BookTicketModel.ResponseModel;
using MediatR;

namespace Contracts.BookTicketModel.RequestModel
{
public class PostBookTicketRequest : IRequest<PostBookTicketResponse>
{
public List<TicketBookingModel> TicketBookings { get; set; } = new List<TicketBookingModel>();
}

public class TicketBookingModel
{
public string TicketCode { get; set; } = string.Empty;
public int Quantity { get; set; }
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Contracts.BookTicketModels.ResponseModel;
using MediatR;

namespace Contracts.BookTicketModels.RequestModel
{
public class UpdateBookTicketRequest : IRequest<DeleteUpdateBookTicketResponse>
{
public Guid BookedTicketId { get; set; }
public int NewQuantity { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Contracts.BookTicketModels.ResponseModel
{
public class DeleteUpdateBookTicketResponse
{
public List<TicketDetail> RevokedTickets { get; set; } = new List<TicketDetail>();
}

public class TicketDetail
{
public string TicketCode { get; set; } = string.Empty;
public string TicketName { get; set; } = string.Empty;
public int Quantity { get; set; }
public string CategoryName { get; set; } = string.Empty;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Contracts.BookTicketModels.ResponseModel
{
public class GetBookTicketDataResponse
{
public List<Guid> Ids { get; set; } = new List<Guid>();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Contracts.BookTicketModel.ResponseModel
{
public class GetBookedTicketByIdResponse
{
public List<CategoryDetail> Categories { get; set; } = new List<CategoryDetail>();
}

public class CategoryDetail
{
public int QtyPerCategory { get; set; }
public string CategoryName { get; set; }
public List<GetTicketDetail> Tickets { get; set; } = new List<GetTicketDetail>();
}

public class GetTicketDetail
{
public string TicketCode { get; set; }
public string TicketName { get; set; }
public DateTime Date { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
namespace Contracts.BookTicketModel.ResponseModel
{
public class PostBookTicketResponse
{
public decimal PriceSummary { get; set; }
public List<CategorySummary> TicketsPerCategories { get; set; } = new List<CategorySummary>();
}

public class CategorySummary
{
public string CategoryName { get; set; }
public decimal SummaryPrice { get; set; }
public List<TicketDetail> Tickets { get; set; } = new List<TicketDetail>();
}

public class TicketDetail
{
public string TicketCode { get; set; }
public string TicketName { get; set; }
public decimal Price { get; set; }
}
}
13 changes: 13 additions & 0 deletions WebApplication_NicholasHansMuliawan/Contracts/Contracts.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="MediatR" Version="11.1.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Contracts.TicketData.ResponseModels;
using MediatR;

namespace Contracts.TicketData.RequestModels
{
public class GetTicketDataListRequest : IRequest<GetTicketDataListResponse>
{
public string CategoryName { get; set; } = string.Empty;
public string TicketCode { get; set; } = string.Empty;
public DateTime MinDate { get; set; }
public DateTime MaxDate { get; set; }
public string OrderBy { get; set; } = string.Empty;
public string OrderState { get; set; } = string.Empty;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Contracts.TicketData.ResponseModels;
using MediatR;

namespace Contracts.TicketData.RequestModels
{
public class PostTicketDataRequest : IRequest<PostTicketDataResponse>
{
public string TicketCode{ get; set; } = string.Empty;
public string TicketName { get; set; } = string.Empty;
public string CategoryName { get; set; } = string.Empty;
public DateTime Date { get; set; }
public decimal Price { get; set; }
public int Quota { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Contracts.TicketData.ResponseModels
{
public class GetTicketDataListResponse
{
public List<TicketData> TicketDatas { get; set; } = new List<TicketData>();
}

public class TicketData
{
public string CategoryName { get; set; } = string.Empty;
public string TicketCode { get; set; } = string.Empty;
public string TicketName { get; set; } = string.Empty;
public DateTime Date { get; set; }
public decimal Price { get; set; }
public int Quota { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Contracts.TicketData.ResponseModels
{
public class PostTicketDataResponse
{
public string Message { get; set; } = string.Empty;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v8.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v8.0": {
"Contracts/1.0.0": {
"dependencies": {
"MediatR": "11.1.0"
},
"runtime": {
"Contracts.dll": {}
}
},
"MediatR/11.1.0": {
"dependencies": {
"MediatR.Contracts": "1.0.1"
},
"runtime": {
"lib/netstandard2.1/MediatR.dll": {
"assemblyVersion": "11.0.0.0",
"fileVersion": "11.1.0.0"
}
}
},
"MediatR.Contracts/1.0.1": {
"runtime": {
"lib/netstandard2.0/MediatR.Contracts.dll": {
"assemblyVersion": "1.0.1.0",
"fileVersion": "1.0.1.0"
}
}
}
}
},
"libraries": {
"Contracts/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"MediatR/11.1.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-YIbtrLOyeCuIv8vIuHL/mMdls5xmgS36pIOJDxKZuu55nxA2MI2Z+E/Uk0z+F/LE11AGmpjplOM0NZ91m5LQBA==",
"path": "mediatr/11.1.0",
"hashPath": "mediatr.11.1.0.nupkg.sha512"
},
"MediatR.Contracts/1.0.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-NsRvOxthhkYml4DcBMyJsmym8C4MchioH7wxKVPEg7plFj9Euh/i4IcmZ3Gvgx6+K8obeuhPeJdoBl56wnuo3A==",
"path": "mediatr.contracts/1.0.1",
"hashPath": "mediatr.contracts.1.0.1.nupkg.sha512"
}
}
}
Binary file not shown.
Binary file not shown.
Loading