14 | {props.Variant === ErrorVariants.success &&
{props.setError(false)}} severity="success">{props.Message}}
15 | {props.Variant === ErrorVariants.info &&
{props.setError(false)}} severity="info">{props.Message}}
16 | {props.Variant === ErrorVariants.warning &&
{props.setError(false)}} severity="warning">{props.Message}}
17 | {props.Variant === ErrorVariants.error &&
{props.setError(false)}} severity="error">{props.Message}}
18 |
19 |
20 | >
21 | )
22 | }
23 |
24 | export default MainAlert
--------------------------------------------------------------------------------
/TableSpotServer/Dto/RestaurantDto.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel.DataAnnotations;
2 | using System.ComponentModel.DataAnnotations.Schema;
3 |
4 | namespace TableSpot.Dto;
5 |
6 | public class RestaurantDto
7 | {
8 | [Key]
9 | public int Id { get; set; }
10 | [Required] public string Name { get; set; }
11 | [Required] public string Address { get; set; }
12 | [Required] public string Description { get; set; }
13 | //TODO: Save image and save file path in database instead of saving the image url in the database
14 | // Eventually, get favicon from resturant website if it exists
15 | [Required] public string ImageUrl { get; set; }
16 | [ForeignKey("Category")] public int CategoryId { get; set; }
17 | public CategoryDto Category { get; set; } = null!;
18 |
19 | [ForeignKey("Account")] public int OwnerAccountId { get; set; }
20 | public AccountDto Account { get; set; } = null!;
21 |
22 | public string? Email { get; set; }
23 | public string? Website { get; set; }
24 | public string? PhoneNumber { get; set; }
25 |
26 | public ICollection