Owneat Technical Guide main Help

Class RestaurantEvent

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

[Table("RestaurantEvents")] public class RestaurantEvent : Entity, IAuditable, ISortableElement

Inheritance

object ← Entity ← RestaurantEvent

Implements

IAuditable, ISortableElement

Inherited Members

Entity.Id, Entity.CreatedAt, Entity.UpdatedAt, Entity.DomainEvents, Entity.EmitDomainEvent\(IDomainEvent\)s.Entity.md#emitdomainevent-idomainevent), object.Equals\(object?\), object.Equals\(object?, object?\), object.GetHashCode\(\), object.GetType\(\), object.MemberwiseClone\(\), object.ReferenceEquals\(object?, object?\), object.ToString\(\)

Constructors

RestaurantEvent\(\)

public RestaurantEvent()

Properties

Description

Description of the Restaurant.Domain.Aggregates.RestaurantAggregate.RestaurantEvent.

[MaxLength(500)] [Required] public string Description { get; set; }

Property Value

string

DisplayImageUrl

URL of the Restaurant.Domain.Aggregates.RestaurantAggregate.RestaurantEvent image.

[MaxLength(500)] [Required] public string DisplayImageUrl { get; set; }

Property Value

string

IsActive

Indicates if the Restaurant.Domain.Aggregates.RestaurantAggregate.RestaurantEvent is active.

[Required] public bool IsActive { get; set; }

Property Value

bool

RestaurantId

Id of the parent Restaurant.Domain.Aggregates.RestaurantAggregate.Restaurant.

[ForeignKey("RestaurantId")] public Guid RestaurantId { get; set; }

Property Value

Guid

SortingIndex

Position of the Restaurant.Domain.Aggregates.RestaurantAggregate.RestaurantEvent in it's Restaurant.Domain.Aggregates.RestaurantAggregate.Restaurant.

[Required] public int SortingIndex { get; set; }

Property Value

int

Title

Name of the Restaurant.Domain.Aggregates.RestaurantAggregate.RestaurantEvent.

[Required] [MaxLength(50)] public string Title { get; set; }

Property Value

string

TitleColor

Color of the Restaurant.Domain.Aggregates.RestaurantAggregate.RestaurantEvent title.

[Required] public long TitleColor { get; set; }

Property Value

long

Methods

Create\(string, string, string, bool, long\)

public static RestaurantEvent Create(string title, string description, string displayImageUrl, bool isActive, long titleColor)

Parameters

title string

description string

displayImageUrl string

isActive bool

titleColor long

Returns

RestaurantEvent

Update\(string, string, string, bool, long\)

Updated the Restaurant.Domain.Aggregates.RestaurantAggregate.RestaurantEvent.

public void Update(string title, string description, string displayImageUrl, bool isActive, long titleColor)

Parameters

title string

Name of the Restaurant.Domain.Aggregates.RestaurantAggregate.RestaurantEvent.

description string

Description of the Restaurant.Domain.Aggregates.RestaurantAggregate.RestaurantEvent.

displayImageUrl string

URL of the Restaurant.Domain.Aggregates.RestaurantAggregate.RestaurantEvent image.

isActive bool

Indicates if the Restaurant.Domain.Aggregates.RestaurantAggregate.RestaurantEvent is active.

titleColor long

Color of the Restaurant.Domain.Aggregates.RestaurantAggregate.RestaurantEvent title.

UpdateSortingIndex\(int\)

Update index of position.

public void UpdateSortingIndex(int newSortingIndex)

Parameters

newSortingIndex int

Last modified: 21 May 2024