yavsc/Yavsc/Model/Billing/Estimate.cs

73 lines
2.3 KiB
C#
Raw Normal View History

2016-06-14 03:37:57 +02:00
namespace Yavsc.Models.Billing
2016-05-17 18:22:18 +02:00
{
2016-10-20 20:15:48 +02:00
using System;
2016-10-07 12:49:24 +02:00
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using Yavsc.Interfaces;
using Yavsc.Models.Booking;
public partial class Estimate : IEstimate
2016-05-17 18:22:18 +02:00
{
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
public long? CommandId { get; set; }
/// <summary>
/// A command is not required to create
/// an estimate,
/// it will result in a new estimate template
/// </summary>
/// <returns></returns>
[ForeignKey("CommandId")]
2016-10-07 12:49:24 +02:00
public BookQuery Query { get; set; }
2016-05-17 18:22:18 +02:00
public string Description { get; set; }
public int? Status { get; set; }
public string Title { get; set; }
public List<CommandLine> Bill { get; set; }
/// <summary>
/// List of attached graphic files
/// to this estimate, as relative pathes to
/// the command performer's root path.
/// In db, they are separated by <c>:</c>
/// </summary>
/// <returns></returns>
[NotMapped]
public List<string> AttachedGraphics { get; set; }
2016-10-07 12:49:24 +02:00
public string AttachedGraphicsString
{
2016-08-13 01:26:32 +02:00
get { return string.Join(":", AttachedGraphics); }
2016-10-07 12:49:24 +02:00
set { AttachedGraphics = value.Split(':').ToList(); }
2016-08-13 01:26:32 +02:00
}
2016-05-17 18:22:18 +02:00
/// <summary>
/// List of attached files
/// to this estimate, as relative pathes to
/// the command performer's root path.
/// In db, they are separated by <c>:</c>
/// </summary>
/// <returns></returns>
[NotMapped]
public List<string> AttachedFiles { get; set; }
2016-10-07 12:49:24 +02:00
public string AttachedFilesString
{
2016-08-13 01:26:32 +02:00
get { return string.Join(":", AttachedFiles); }
2016-10-07 12:49:24 +02:00
set { AttachedFiles = value.Split(':').ToList(); }
2016-08-13 01:26:32 +02:00
}
[Required]
public string OwnerId { get; set; }
[Required]
public string ClientId { get; set; }
2016-10-07 12:49:24 +02:00
public string CommandType
{
get; set;
}
2016-10-20 20:15:48 +02:00
public DateTime LatestValidationDate { get; set; }
public DateTime ClientApprouvalDate { get; set; }
2016-05-17 18:22:18 +02:00
}
}