WIP billing
This commit is contained in:
parent
569cd74760
commit
62e1c49c1f
12 changed files with 1462 additions and 10 deletions
|
|
@ -178,5 +178,9 @@ namespace Yavsc.Models
|
|||
public DbSet<Tag> Tags { get; set; }
|
||||
|
||||
public DbSet<PostTag> TagsDomain { get; set; }
|
||||
|
||||
public DbSet<EstimateTemplate> EstimateTemplates { get; set; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
20
Yavsc/Model/Billing/EstimateTemplate.cs
Normal file
20
Yavsc/Model/Billing/EstimateTemplate.cs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Yavsc.Models.Billing
|
||||
{
|
||||
public partial class EstimateTemplate
|
||||
{
|
||||
|
||||
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id { get; set; }
|
||||
public string Description { get; set; }
|
||||
public string Title { get; set; }
|
||||
public List<CommandLine> Bill { get; set; }
|
||||
|
||||
[Required]
|
||||
public string OwnerId { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -40,7 +40,7 @@ namespace Yavsc.Models.Billing
|
|||
/// The bill
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public List<CommandLine> Bill { get; set; }
|
||||
public List<Service> Bill { get; set; } = new List<Service>();
|
||||
|
||||
///<summary>
|
||||
/// Time span in seconds in which
|
||||
|
|
|
|||
|
|
@ -17,18 +17,27 @@ namespace Yavsc.Models.Booking
|
|||
public long Id {get; set; }
|
||||
|
||||
[Display(Name="Event date")]
|
||||
public DateTime EventDate{get; set; }
|
||||
public Location Location { get; set; }
|
||||
public DateTime EventDate{
|
||||
get
|
||||
{ return ((RendezVous)Bill[0]).EventDate; }
|
||||
set { ((RendezVous)Bill[0]).EventDate = value; }
|
||||
}
|
||||
public Location Location {
|
||||
get
|
||||
{ return ((RendezVous)Bill[0]).Location; }
|
||||
set { ((RendezVous)Bill[0]).Location = value; }}
|
||||
|
||||
public BookQuery()
|
||||
{
|
||||
|
||||
this.Bill.Add(new RendezVous());
|
||||
}
|
||||
|
||||
public BookQuery(Location eventLocation, DateTime eventDate)
|
||||
{
|
||||
Location = eventLocation;
|
||||
EventDate = eventDate;
|
||||
this.Bill.Add(new RendezVous{
|
||||
Location = eventLocation,
|
||||
EventDate = eventDate
|
||||
});
|
||||
}
|
||||
public string GetDescription() {
|
||||
return $"{Location?.Address} {EventDate.ToString()}";
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
namespace Yavsc.Models.Market {
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Billing;
|
||||
|
||||
public partial class Service : BaseProduct
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue