Class Restaurant
Namespace: Restaurant.Domain.Aggregates.RestaurantAggregate
Assembly: Restaurant.Domain.dll
Inheritance
object ← Entity ← Restaurant
Implements
Inherited Members
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
Restaurant\(\)
Properties
Address
Restaurant.Domain.Aggregates.RestaurantAggregate.Restaurant.Address of the Restaurant.
Property Value
Description
Description of the restaurant services.
Property Value
DisplayImageUrl
URL of the restaurant's picture.
Property Value
IsChargesEnabled
Boolean that says if the restaurant activated the charges on the payment platform.
Property Value
IsInPrePaymentMode
Boolean that says if the restaurant activated the pre-payment on it's restaurant.
Property Value
IsOnPaymentPlatform
Boolean that says if the restaurant created his account on our current payment platform.
Property Value
IsPaymentModuleEnabled
Boolean that says if the restaurant activated the payment module.
Property Value
Menus
The Menu property represents the Menu of products offered by the Restaurant.
Property Value
IEnumerable < Menu \>
Name
The Name property represents the name of the Restaurant.
Property Value
OpeningHours
The OpeningHours property represents the opening hours of the Restaurant.
Property Value
IEnumerable < OpeningHours \>
PaymentPlatformId
Payment's platform identifier.
Property Value
RestaurantEvents
The RestaurantEvents property represents the events of the Restaurant.
Property Value
Methods
AddMenu\(Menu\)
Add a Restaurant.Domain.Aggregates.MenuAggregate.Menu to a Restaurant.Domain.Aggregates.RestaurantAggregate.Restaurant.
Parameters
menu Menu
The Restaurant.Domain.Aggregates.MenuAggregate.Menu to add.
AddRestaurantEvent\(RestaurantEvent\)
Add a Restaurant.Domain.Aggregates.RestaurantAggregate.RestaurantEvent to a Restaurant.Domain.Aggregates.RestaurantAggregate.Restaurant.
Parameters
restaurantEvent RestaurantEvent
The Restaurant.Domain.Aggregates.RestaurantAggregate.RestaurantEvent to add.
CanRestaurantChargeClients\(bool\)
Update basic informations of the Restaurant.Domain.Aggregates.RestaurantAggregate.Restaurant.
Parameters
isChargesEnabled bool
Restaurant.Domain.Aggregates.RestaurantAggregate.Restaurant.IsChargesEnabled of the Restaurant.Domain.Aggregates.RestaurantAggregate.Restaurant.
Create\(string, string, string, Address, List<OpeningHours\>\)
Parameters
name string
description string
displayImageUrl string
address Address
openingHours List < OpeningHours \>
Returns
Restaurant
GetMenus\(Func<Menu, bool\>\)
Method that returns all the Restaurant.Domain.Aggregates.MenuAggregate.Menus requested by a certain predicate.
Parameters
predicate Func < Menu, bool \>
System.Func%601 is a predicate.
Returns
IEnumerable < Menu \>
IsLinkedToBillingPlatform\(\)
Method that say is a Restaurant.Domain.Aggregates.RestaurantAggregate.Restaurant is currently linked to a billing service.
Returns
IsRestaurantOpen\(DateTimeOffset\)
Method that say is a Restaurant.Domain.Aggregates.RestaurantAggregate.Restaurant is currently opened.
Parameters
serverDateTime DateTimeOffset
The current server date when called.
Returns
A boolean that indicates if the Restaurant.Domain.Aggregates.RestaurantAggregate.Restaurant is open or closed at the moment.
RemoveMenu\(Menu\)
Remove a Restaurant.Domain.Aggregates.MenuAggregate.Menu from a Restaurant.Domain.Aggregates.RestaurantAggregate.Restaurant.
Parameters
menu Menu
The Restaurant.Domain.Aggregates.MenuAggregate.Menu to remove.
RemoveRestaurantEvent\(RestaurantEvent\)
Parameters
restaurantEventToDelete RestaurantEvent
SetPaymentPlatformId\(string\)
Parameters
paymentPlatformId string
ToggleMenuState\(Menu\)
Toggle method that take the Restaurant.Domain.Aggregates.MenuAggregate.Menu state and change it to it's opposed state.
Parameters
menu Menu
The Restaurant.Domain.Aggregates.MenuAggregate.Menu to activate or deactivate.
TogglePaymentFlow\(\)
Toggle restaurant payment mode.
UpdateBasicInformation\(string, string, string, Address\)
Update basic informations of the Restaurant.Domain.Aggregates.RestaurantAggregate.Restaurant.
Parameters
name string
Restaurant.Domain.Aggregates.RestaurantAggregate.Restaurant.Name of the Restaurant.Domain.Aggregates.RestaurantAggregate.Restaurant.
description string
Restaurant.Domain.Aggregates.RestaurantAggregate.Restaurant.Description of the Restaurant.Domain.Aggregates.RestaurantAggregate.Restaurant.
displayImageUrl string
Restaurant.Domain.Aggregates.RestaurantAggregate.Restaurant.DisplayImageUrl of the Restaurant.Domain.Aggregates.RestaurantAggregate.Restaurant.
address Address
Restaurant.Domain.Aggregates.RestaurantAggregate.Restaurant.Address of the Restaurant.Domain.Aggregates.RestaurantAggregate.Restaurant.
UpdateOpeningHours\(IEnumerable<OpeningHours\>\)
Update the Restaurant.Domain.Aggregates.RestaurantAggregate.Restaurant.OpeningHours of a Restaurant.Domain.Aggregates.RestaurantAggregate.Restaurant
Parameters
openingHours IEnumerable < OpeningHours \>
The Restaurant.Domain.Aggregates.RestaurantAggregate.Restaurant.OpeningHours to replace.