This commit is contained in:
Paul Schneider 2016-10-23 01:31:09 +02:00
commit 6e5e0afa9e
17 changed files with 2143 additions and 25 deletions

View file

@ -1,6 +1,7 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
using Yavsc.Models.Market;
namespace Yavsc.Models.Billing
@ -11,11 +12,16 @@ namespace Yavsc.Models.Billing
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
[Required]
[Required,MaxLength(512)]
public string Description { get; set; }
public BaseProduct Article { get; set; }
public int Count { get; set; }
public decimal UnitaryCost { get; set; }
public long EstimateId { get; set; }
[JsonIgnore,NotMapped,ForeignKey("EstimateId")]
virtual public Estimate Estimate { get; set; }
}
}

View file

@ -24,7 +24,9 @@ namespace Yavsc.Models.Billing
public string Description { get; set; }
public int? Status { get; set; }
public string Title { get; set; }
public List<CommandLine> Bill { get; set; }
[InverseProperty("Estimate")]
public virtual List<CommandLine> Bill { get; set; }
/// <summary>
/// List of attached graphic files
/// to this estimate, as relative pathes to

View file

@ -18,7 +18,13 @@ namespace Yavsc.Models
/// <see>Startup.UserFilesOptions</see>
/// </summary>
/// <returns></returns>
[MaxLength(512)]
public string Avatar { get; set; }
[MaxLength(512)]
public string FullName { get; set; }
/// <summary>
/// WIP Paypal
/// </summary>

View file

@ -31,8 +31,8 @@ namespace Yavsc
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
[Required(),
Display(Name="Address")]
Display(Name="Address"),
MaxLength(512)]
public string Address { get; set; }
}
}