Skip to content

Commit

Permalink
allow update dto to be extended (#1113)
Browse files Browse the repository at this point in the history
add base class for update dto
  • Loading branch information
rochar authored Nov 14, 2023
1 parent 7e8dd03 commit 9bdb263
Show file tree
Hide file tree
Showing 225 changed files with 1,521 additions and 400 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@

namespace Cryptocash.Application.Dto;

/// <summary>
/// Currencies related frequent and rare bank notes.
/// </summary>
public partial class BankNoteCreateDto : BankNoteCreateDtoBase
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ namespace Cryptocash.Application.Dto;

public record BankNoteKeyDto(System.Int64 keyId);

/// <summary>
/// Update BankNote
/// Currencies related frequent and rare bank notes.
/// </summary>
public partial class BankNoteDto : BankNoteDtoBase
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,31 @@

namespace Cryptocash.Application.Dto;

/// <summary>
/// Currencies related frequent and rare bank notes.
/// </summary>
public partial class BankNoteUpdateDto : BankNoteUpdateDtoBase
{

}

/// <summary>
/// Currencies related frequent and rare bank notes
/// </summary>
public partial class BankNoteUpdateDto : IEntityDto<DomainNamespace.BankNote>
public partial class BankNoteUpdateDtoBase: EntityDtoBase, IEntityDto<DomainNamespace.BankNote>
{
/// <summary>
/// Currency's cash bank note identifier
/// <remarks>Required.</remarks>
/// </summary>
[Required(ErrorMessage = "CashNote is required")]

public System.String CashNote { get; set; } = default!;
public virtual System.String CashNote { get; set; } = default!;
/// <summary>
/// Bank note value
/// <remarks>Required.</remarks>
/// </summary>
[Required(ErrorMessage = "Value is required")]

public MoneyDto Value { get; set; } = default!;
public virtual MoneyDto Value { get; set; } = default!;
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@

namespace Cryptocash.Application.Dto;

/// <summary>
/// Exchange booking and related data.
/// </summary>
public partial class BookingCreateDto : BookingCreateDtoBase
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ namespace Cryptocash.Application.Dto;

public record BookingKeyDto(System.Guid keyId);

/// <summary>
/// Update Booking
/// Exchange booking and related data.
/// </summary>
public partial class BookingDto : BookingDtoBase
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,74 +12,82 @@

namespace Cryptocash.Application.Dto;

/// <summary>
/// Exchange booking and related data.
/// </summary>
public partial class BookingUpdateDto : BookingUpdateDtoBase
{

}

/// <summary>
/// Exchange booking and related data
/// </summary>
public partial class BookingUpdateDto : IEntityDto<DomainNamespace.Booking>
public partial class BookingUpdateDtoBase: EntityDtoBase, IEntityDto<DomainNamespace.Booking>
{
/// <summary>
/// Booking's amount exchanged from
/// <remarks>Required.</remarks>
/// </summary>
[Required(ErrorMessage = "AmountFrom is required")]

public MoneyDto AmountFrom { get; set; } = default!;
public virtual MoneyDto AmountFrom { get; set; } = default!;
/// <summary>
/// Booking's amount exchanged to
/// <remarks>Required.</remarks>
/// </summary>
[Required(ErrorMessage = "AmountTo is required")]

public MoneyDto AmountTo { get; set; } = default!;
public virtual MoneyDto AmountTo { get; set; } = default!;
/// <summary>
/// Booking's requested pick up date
/// <remarks>Required.</remarks>
/// </summary>
[Required(ErrorMessage = "RequestedPickUpDate is required")]

public DateTimeRangeDto RequestedPickUpDate { get; set; } = default!;
public virtual DateTimeRangeDto RequestedPickUpDate { get; set; } = default!;
/// <summary>
/// Booking's actual pick up date
/// <remarks>Optional.</remarks>
/// </summary>
public DateTimeRangeDto? PickedUpDateTime { get; set; }
public virtual DateTimeRangeDto? PickedUpDateTime { get; set; }
/// <summary>
/// Booking's expiry date
/// <remarks>Optional.</remarks>
/// </summary>
public System.DateTimeOffset? ExpiryDateTime { get; set; }
public virtual System.DateTimeOffset? ExpiryDateTime { get; set; }
/// <summary>
/// Booking's cancelled date
/// <remarks>Optional.</remarks>
/// </summary>
public System.DateTimeOffset? CancelledDateTime { get; set; }
public virtual System.DateTimeOffset? CancelledDateTime { get; set; }
/// <summary>
/// Booking's related vat number
/// <remarks>Optional.</remarks>
/// </summary>
public VatNumberDto? VatNumber { get; set; }
public virtual VatNumberDto? VatNumber { get; set; }

/// <summary>
/// Booking for ExactlyOne Customers
/// </summary>
[Required(ErrorMessage = "Customer is required")]
public System.Int64 CustomerId { get; set; } = default!;
public virtual System.Int64 CustomerId { get; set; } = default!;

/// <summary>
/// Booking related to ExactlyOne VendingMachines
/// </summary>
[Required(ErrorMessage = "VendingMachine is required")]
public System.Guid VendingMachineId { get; set; } = default!;
public virtual System.Guid VendingMachineId { get; set; } = default!;

/// <summary>
/// Booking fees for ExactlyOne Commissions
/// </summary>
[Required(ErrorMessage = "Commission is required")]
public System.Int64 CommissionId { get; set; } = default!;
public virtual System.Int64 CommissionId { get; set; } = default!;

/// <summary>
/// Booking related to ExactlyOne Transactions
/// </summary>
[Required(ErrorMessage = "Transaction is required")]
public System.Int64 TransactionId { get; set; } = default!;
public virtual System.Int64 TransactionId { get; set; } = default!;
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@

namespace Cryptocash.Application.Dto;

/// <summary>
/// Vending machine cash stock order and related data.
/// </summary>
public partial class CashStockOrderCreateDto : CashStockOrderCreateDtoBase
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ namespace Cryptocash.Application.Dto;

public record CashStockOrderKeyDto(System.Int64 keyId);

/// <summary>
/// Update CashStockOrder
/// Vending machine cash stock order and related data.
/// </summary>
public partial class CashStockOrderDto : CashStockOrderDtoBase
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,40 +12,48 @@

namespace Cryptocash.Application.Dto;

/// <summary>
/// Vending machine cash stock order and related data.
/// </summary>
public partial class CashStockOrderUpdateDto : CashStockOrderUpdateDtoBase
{

}

/// <summary>
/// Vending machine cash stock order and related data
/// </summary>
public partial class CashStockOrderUpdateDto : IEntityDto<DomainNamespace.CashStockOrder>
public partial class CashStockOrderUpdateDtoBase: EntityDtoBase, IEntityDto<DomainNamespace.CashStockOrder>
{
/// <summary>
/// Order amount
/// <remarks>Required.</remarks>
/// </summary>
[Required(ErrorMessage = "Amount is required")]

public MoneyDto Amount { get; set; } = default!;
public virtual MoneyDto Amount { get; set; } = default!;
/// <summary>
/// Order requested delivery date
/// <remarks>Required.</remarks>
/// </summary>
[Required(ErrorMessage = "RequestedDeliveryDate is required")]

public System.DateTime RequestedDeliveryDate { get; set; } = default!;
public virtual System.DateTime RequestedDeliveryDate { get; set; } = default!;
/// <summary>
/// Order delivery date
/// <remarks>Optional.</remarks>
/// </summary>
public System.DateTimeOffset? DeliveryDateTime { get; set; }
public virtual System.DateTimeOffset? DeliveryDateTime { get; set; }

/// <summary>
/// CashStockOrder for ExactlyOne VendingMachines
/// </summary>
[Required(ErrorMessage = "VendingMachine is required")]
public System.Guid VendingMachineId { get; set; } = default!;
public virtual System.Guid VendingMachineId { get; set; } = default!;

/// <summary>
/// CashStockOrder reviewed by ExactlyOne Employees
/// </summary>
[Required(ErrorMessage = "Employee is required")]
public System.Int64 EmployeeId { get; set; } = default!;
public virtual System.Int64 EmployeeId { get; set; } = default!;
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@

namespace Cryptocash.Application.Dto;

/// <summary>
/// Exchange commission rate and amount.
/// </summary>
public partial class CommissionCreateDto : CommissionCreateDtoBase
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ namespace Cryptocash.Application.Dto;

public record CommissionKeyDto(System.Int64 keyId);

/// <summary>
/// Update Commission
/// Exchange commission rate and amount.
/// </summary>
public partial class CommissionDto : CommissionDtoBase
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,34 +12,42 @@

namespace Cryptocash.Application.Dto;

/// <summary>
/// Exchange commission rate and amount.
/// </summary>
public partial class CommissionUpdateDto : CommissionUpdateDtoBase
{

}

/// <summary>
/// Exchange commission rate and amount
/// </summary>
public partial class CommissionUpdateDto : IEntityDto<DomainNamespace.Commission>
public partial class CommissionUpdateDtoBase: EntityDtoBase, IEntityDto<DomainNamespace.Commission>
{
/// <summary>
/// Commission rate
/// <remarks>Required.</remarks>
/// </summary>
[Required(ErrorMessage = "Rate is required")]

public System.Single Rate { get; set; } = default!;
public virtual System.Single Rate { get; set; } = default!;
/// <summary>
/// Exchange rate conversion amount
/// <remarks>Required.</remarks>
/// </summary>
[Required(ErrorMessage = "EffectiveAt is required")]

public System.DateTimeOffset EffectiveAt { get; set; } = default!;
public virtual System.DateTimeOffset EffectiveAt { get; set; } = default!;

/// <summary>
/// Commission fees for ZeroOrOne Countries
/// </summary>

public System.String? CountryId { get; set; } = default!;
public virtual System.String? CountryId { get; set; } = default!;

/// <summary>
/// Commission fees for ZeroOrMany Bookings
/// </summary>
public List<System.Guid> BookingsId { get; set; } = new();
public virtual List<System.Guid> BookingsId { get; set; } = new();
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@

namespace Cryptocash.Application.Dto;

/// <summary>
/// Country and related data.
/// </summary>
public partial class CountryCreateDto : CountryCreateDtoBase
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ namespace Cryptocash.Application.Dto;

public record CountryKeyDto(System.String keyId);

/// <summary>
/// Update Country
/// Country and related data.
/// </summary>
public partial class CountryDto : CountryDtoBase
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@

namespace Cryptocash.Application.Dto;

/// <summary>
/// Time zone related to country.
/// </summary>
public partial class CountryTimeZoneCreateDto : CountryTimeZoneCreateDtoBase
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ namespace Cryptocash.Application.Dto;

public record CountryTimeZoneKeyDto(System.Int64 keyId);

/// <summary>
/// Update CountryTimeZone
/// Time zone related to country.
/// </summary>
public partial class CountryTimeZoneDto : CountryTimeZoneDtoBase
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,24 @@

namespace Cryptocash.Application.Dto;

/// <summary>
/// Time zone related to country.
/// </summary>
public partial class CountryTimeZoneUpdateDto : CountryTimeZoneUpdateDtoBase
{

}

/// <summary>
/// Time zone related to country
/// </summary>
public partial class CountryTimeZoneUpdateDto : IEntityDto<DomainNamespace.CountryTimeZone>
public partial class CountryTimeZoneUpdateDtoBase: EntityDtoBase, IEntityDto<DomainNamespace.CountryTimeZone>
{
/// <summary>
/// Country's related time zone code
/// <remarks>Required.</remarks>
/// </summary>
[Required(ErrorMessage = "TimeZoneCode is required")]

public System.String TimeZoneCode { get; set; } = default!;
public virtual System.String TimeZoneCode { get; set; } = default!;
}
Loading

0 comments on commit 9bdb263

Please sign in to comment.