Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a generator for Domain events #8

Closed
jan-schutte opened this issue Jun 20, 2023 · 0 comments
Closed

Create a generator for Domain events #8

jan-schutte opened this issue Jun 20, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@jan-schutte
Copy link
Collaborator

jan-schutte commented Jun 20, 2023

Create concrete classes for all the domain events in a nox solution
yaml definition:

      events:
        - name: CountryNameUpdatedEvent
          description: Raised when the name of a country changes
          type: object
          objectTypeOptions:
            attributes:
              
              - name: CountryId
                description: The identifier of the country. The Iso alpha 2 code
                type: countryCode2
              
              - name: CountryName
                description: The new name of the country
                type: text   

Generated class:

// Generated by DomainEventGenerator::Generate

using Nox.Core.Interfaces.Entity;
using Nox.Types;
using System.Collections.Generic;

namespace SampleService.Domain;

/// <summary>
/// a Domain event which is raised when the name of a country changes
/// </summary>
public partial class CountryNameUpdatedEvent : INoxEvent
{

    /// <summary>
    /// The identity of the country, the Iso Alpha 2 code.
    /// </summary>
    public CountryCode2? CountryId { get; set; } = null!;

    /// <summary>
    /// The new name of the country
    /// </summary>
    public Text? CountryName { get; set; } = null!;
}
@jan-schutte jan-schutte self-assigned this Jun 20, 2023
@jan-schutte jan-schutte added the enhancement New feature or request label Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant