Owneat Technical Guide main Help

Class Formula

Namespace: Restaurant.Domain.Aggregates.FormulaAggregate
Assembly: Restaurant.Domain.dll

public sealed class Formula : ProductBase, IAggregateRoot, IAuditable, ISortableElement

Inheritance

object ← Entity ← ProductBaseFormula

Implements

IAggregateRoot, IAuditable, ISortableElement

Inherited Members

ProductBase.Name, ProductBase.Description, ProductBase.DisplayImageUrl, ProductBase.UnitPrice, ProductBase.SortingIndex, ProductBase.IsAvailable, ProductBase.CategoryId, ProductBase.RestaurantId, ProductBase.ExternalPaymentId, ProductBase.Discriminator, ProductBase.UpdateBasicInfos\(string, string, string, double\), ProductBase.UpdateImageUrl\(string\), ProductBase.UpdateSortingIndex\(int\), ProductBase.UpdateExternalPaymentId\(string\), ProductBase.UpdateAvailability\(bool\), ProductBase.DeleteExternalPaymentId\(\), Entity.Id, Entity.CreatedAt, Entity.UpdatedAt, Entity.DomainEvents, object.Equals\(object?\), object.Equals\(object?, object?\), object.GetHashCode\(\), object.GetType\(\), object.ReferenceEquals\(object?, object?\), object.ToString\(\)

Constructors

Formula\(\)

public Formula()

Properties

Discriminator

Discriminator that state the type of the inheritor.

[NotMapped] public override string Discriminator { get; }

Property Value

string

Sections

This represents the list of Restaurant.Domain.Aggregates.FormulaAggregate.FormulaSection that will be available in the Restaurant.Domain.Aggregates.FormulaAggregate.Formula.

public List<FormulaSection> Sections { get; init; }

Property Value

List < FormulaSection \>

Methods

AddSection\(FormulaSection\)

Method that add a new section in a formula.

public void AddSection(FormulaSection newSection)

Parameters

newSection FormulaSection

The new section to add.

Create\(string, string, string, double, Guid\)

public static Formula Create(string name, string description, string displayImageUrl, double price, Guid restaurantGuid)

Parameters

name string

description string

displayImageUrl string

price double

restaurantGuid Guid

Returns

Formula

UpdateFormulaInfos\(string, string\)

public void UpdateFormulaInfos(string name, string description)

Parameters

name string

description string

Last modified: 21 May 2024