Class Table
Namespace: Ordering.Domain.Aggregates.TableAggregate
Assembly: Ordering.Domain.dll
Inheritance
object ← Entity ← Table
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
Table\(\)
Table\(Guid, int, int, long\)
Parameters
restaurantId Guid
tableNumber int
seatsCount int
color long
Properties
Color
The color of the Ordering.Domain.Aggregates.TableAggregate.Table
Property Value
CurrentCustomers
List of Ordering.Domain.Aggregates.OrderAggregate.Order currently running on a Ordering.Domain.Aggregates.TableAggregate.Table.
Property Value
IEnumerable < Customer \>
CurrentlySittingCustomersCount
The current number of customers sitting on the Ordering.Domain.Aggregates.TableAggregate.Table.
Property Value
IsCustomersLimitReached
Bool that says if the customers cap is reached on this table.
Property Value
IsManualRelease
Bool that says if a waiter needs to do the customers sitting on a the table.
Property Value
IsOutOfService
Boot that says if the table is out of service.
Property Value
IsReleasable
Boot that says if the table is releasable.
Property Value
NumberOfCustomersWhoPlacedAnOrder
The current number of customers who placed an order on the Ordering.Domain.Aggregates.TableAggregate.Table.
Property Value
OutstandingBalance
The outstanding balance of the Ordering.Domain.Aggregates.TableAggregate.Table.
Property Value
RestaurantId
Id of the restaurant where the Ordering.Domain.Aggregates.TableAggregate.Table is located.
Property Value
RowVersion
Versioning field for database concurrency.
Property Value
SeatsCount
Number of seats that can be placed on a Ordering.Domain.Aggregates.TableAggregate.Table.
Property Value
SittingCustomersLimit
Int that specify the maximum customers linked to the table.
Property Value
int?
SortingIndex
Position of the Ordering.Domain.Aggregates.TableAggregate.Table on the owner view.
Property Value
State
The current state of the Ordering.Domain.Aggregates.TableAggregate.Table.
Property Value
TableNumber
Number of the Ordering.Domain.Aggregates.TableAggregate.Table.
Property Value
TotalPrice
The total price of all Ordering.Domain.Aggregates.OrderAggregate.Order included in the Ordering.Domain.Aggregates.TableAggregate.Table.
Property Value
WaiterCalledIndicator
Bool that says if a waiter is called on the table.
Property Value
Methods
AlreadyWaitingForServer\(\)
Method that toggle the Ordering.Domain.Aggregates.TableAggregate.Table.WaiterCalledIndicator indicator.
Returns
AssignPayingCustomerToFinanciallyUnresolvedItems\(Guid\)
Method that assign customer to the unassigned and unpaid line items.
Parameters
payingCustomerId Guid
BehaveOnSitting\(\)
Method that reset sitting customer limit if table is in manual release.
CanWaitingStateMutate\(WaiterCalledIndicatorStates\)
Method that says if the waiterCall indicator will change after the operation.
Parameters
newWaiterCalledIndicator WaiterCalledIndicatorStates
Returns
ChangeWaiterCalledIndicator\(WaiterCalledIndicatorStates\)
Method that toggle the Ordering.Domain.Aggregates.TableAggregate.Table.WaiterCalledIndicator indicator.
Parameters
newValue WaiterCalledIndicatorStates
ClearForNewCustomerWithALimit\(int\)
Method that toggle the releasing mode.
Parameters
sittingCustomersLimit int
ClearTableForNewCustomers\(\)
Method that release a table for next customers when Ordering.Domain.Aggregates.TableAggregate.Table.IsNowFullyPaid.
Create\(Guid, int, int, long\)
Method that create a Ordering.Domain.Aggregates.TableAggregate.Table.
Parameters
restaurantId Guid
Id of the restaurant where the Ordering.Domain.Aggregates.TableAggregate.Table is located.
tableNumber int
Number of the Ordering.Domain.Aggregates.TableAggregate.Table.
seatsNumber int
Number of seats that can be placed on a Ordering.Domain.Aggregates.TableAggregate.Table.
color long
The color of the Ordering.Domain.Aggregates.TableAggregate.Table
Returns
Table
DecreaseOutstandingBalance\(double, string\)
Method that decrease the Ordering.Domain.Aggregates.TableAggregate.Table.OutstandingBalance of the Ordering.Domain.Aggregates.TableAggregate.Table.
Parameters
valueToSubtract double
customerIdentifier string
EnactCustomerDepartureToAnotherTable\(Guid, string\)
Method that notify customers and staff that a customer quit the table.
Parameters
customerToRemoveGuid Guid
customerToRemoveIdentifier string
FullyAcknowledgeCategory\(string\)
Method that acknowledge a category.
Parameters
categoryName string
FullyAcknowledgeServingPeriod\(ServingPeriod\)
Method that acknowledge a period of time.
Parameters
periodToServe ServingPeriod
IncreaseOutstandingBalance\(double, string, Guid\)
Method that increase the Ordering.Domain.Aggregates.TableAggregate.Table.OutstandingBalance of the Ordering.Domain.Aggregates.TableAggregate.Table. It also checks if a table need to be passed from available to busy when an order is placed.
Parameters
valueToAdd double
customerIdentifier string
customerId Guid
IsNowFullyPaid\(\)
Bool that returns if table is paid.
Returns
ReceiveACustomerFromAnotherTable\(Customer\)
Method that notify customers and staff that a customer joined the table.
Parameters
joiningCustomer Customer
RedeemAnExpenseReportForCustomerWithId\(Guid, string, int\)
Parameters
customerGuid Guid
customerEmail string
guestsCount int
ResetSittingCustomerLimit\(\)
Method that sets the limit to 0.
RetrieveCustomers\(List<Guid\>\)
Method that selects sitting customers on the table by their IDs.
Parameters
Returns
SeatACustomer\(string, bool, bool, Guid?\)
Method that add an Ordering.Domain.Aggregates.Customer to the Ordering.Domain.Aggregates.TableAggregate.Table.CurrentCustomers list of the Ordering.Domain.Aggregates.TableAggregate.Table.
Parameters
customerIdentifier string
The Ordering.Domain.Aggregates.Customer to add.
isPaymentFirst bool
Do the customer have to pay before lunch.
hasToPay bool
Do the customer has to pay (is payment enabled).
oneSignalId Guid?
Returns
Result< Customer \>
SendOrderLineItemsTogglingEvent\(IEnumerable<OrderLineItem\>, Guid?\)
Send toggle on remaining selectable products event.
Parameters
orderLineItems IEnumerable < OrderLineItem \>
All affected orderLineItems.
payingCustomerId Guid?
The paying customer id, which want to select the remaining products.
ServeAFullCategory\(string\)
Method that serve a category.
Parameters
categoryName string
ServeAFullServingPeriod\(ServingPeriod\)
Method that serve a period of time.
Parameters
periodToServe ServingPeriod
SetAvailable\(\)
Method that sets the table state to available.
SetBusy\(\)
Method that sets the table state to busy.
SetOutOfService\(\)
Method that sets the table state to available.
ToggleReleasingMode\(\)
Method that toggle the releasing mode.
ToggleUnresolvedItemsOfACustomer\(Guid, Guid\)
Parameters
nonPayingCustomerId Guid
payingCustomerId Guid
UpdateSortingIndex\(int\)
Update the position of the Ordering.Domain.Aggregates.TableAggregate.Table in its restaurant.
Parameters
newSortingIndex int
New position.
UpdateTableAttributes\(int, int, long\)
Method that update table attributes.
Parameters
tableNumber int
Number of the Ordering.Domain.Aggregates.TableAggregate.Table.
seatsCount int
Number of seats that can be placed on a Ordering.Domain.Aggregates.TableAggregate.Table.
color long
The Ordering.Domain.Aggregates.TableAggregate.Table.Color of the Ordering.Domain.Aggregates.TableAggregate.Table
ValidateCustomersItemsPayment\(Guid, double\)
Set the paid items to the paid status.
Parameters
payingCustomerId Guid
paymentAmount double