using MisIngredientesVue.Core.Attributes; using MisIngredientesVue.Core.Services; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Text; namespace MisIngredientesVue.Core.Models { public class DeliveryRoute : RepositoryEntityWithTenantId { public int Year { get; set; } public int Month { get; set; } public int Day { get; set; } public Vehicle Vehicle { get; set; } public int VehicleId { get; set; } public int SortOrder { get; set; } //Una ruta contiene conductores (por lo general uno nada más), sucursales y lugares ////////////////// public Driver Driver { get; set; } public int? DriverId { get; set; } //Ó public ClientBranch ClientBranch { get; set; } public int? ClientBranchId { get; set; } //Ó public Place Place { get; set; } public int? PlaceId { get; set; } //////////////// } public class Place : RepositoryEntity { [DoNotUpdate] [IgnoreRelationship] public string TenantId { get; set; } [Required] public string Description { get; set; } [Required] public string Phone { get; set; } [Required] public string ReceivedBy { get; set; } [Required] [MaxLength(100)] public string Address { get; set; } [Required] public decimal Lat { get; set; } [Required] public decimal Lng { get; set; } } }