124 lines
3.2 KiB
C#
124 lines
3.2 KiB
C#
using System.ComponentModel.DataAnnotations;
|
|
using Landmark.OLA.Models.Addresses;
|
|
using Landmark.OLA.Models.Assets.Enums;
|
|
|
|
namespace Landmark.OLA.Models.Assets
|
|
{
|
|
public class Vehicle : OlaModel
|
|
{
|
|
//This will either hold an ToString'ed int or a 36-char long GUID
|
|
[StringLength(36)]
|
|
public string ValuationId { get; private set; }
|
|
|
|
[Required]
|
|
public VehicleValuationType? ValuationType { get; set; }
|
|
|
|
[Required]
|
|
public NewUsed? Condition { get; set; }
|
|
|
|
public VehicleSeller? Seller { get; set; }
|
|
|
|
[Required]
|
|
public VehicleType? Type { get; set; }
|
|
|
|
public UsageType? Usage { get; set; }
|
|
|
|
public bool? HasClearTitle { get; set; }
|
|
|
|
[Required]
|
|
[Range(minimum: 0, maximum: 1000000000)]
|
|
public decimal? InitialEstimatedValue { get; set; }
|
|
|
|
public bool? IsForBusinessUse { get; set; }
|
|
|
|
public bool? IsOwnerOperator { get; set; }
|
|
|
|
[Required]
|
|
//Slightly arbitrary values that should be safe
|
|
[Range(1900, 3000)]
|
|
public int? Year { get; set; }
|
|
|
|
//Slightly arbitrary values that should be safe
|
|
[Range(0, 1000000000)]
|
|
public int? Mileage { get; set; }
|
|
|
|
[Required]
|
|
[StringLength(100)]
|
|
public string Make { get; set; }
|
|
|
|
[Required]
|
|
[StringLength(100)]
|
|
public string Model { get; set; }
|
|
|
|
[StringLength(20)]
|
|
public string Color { get; set; }
|
|
|
|
[StringLength(400)]
|
|
public string Body { get; set; }
|
|
|
|
[StringLength(100)]
|
|
public string Series { get; set; }
|
|
|
|
[StringLength(100)]
|
|
public string Style { get; set; }
|
|
|
|
[StringLength(400)]
|
|
public string Trim { get; set; }
|
|
|
|
[StringLength(60)]
|
|
public string VIN { get; set; }
|
|
|
|
[StringLength(8)]
|
|
public string LicensePlateNumber { get; set; }
|
|
|
|
public string StateTitled { get; set; }
|
|
|
|
[StringLength(20)]
|
|
public string CountyTitled { get; set; }
|
|
|
|
[StringLength(120)]
|
|
public string MunicipalityType { get; set; }
|
|
|
|
[StringLength(120)]
|
|
public string MunicipalityWhereKept { get; set; }
|
|
|
|
public string Lien { get; set; }
|
|
|
|
[StringLength(120)]
|
|
public string DealerName { get; set; }
|
|
|
|
[StringLength(180)]
|
|
public string DealerPhone { get; set; }
|
|
|
|
public Address BoatAddress { get; set; }
|
|
|
|
[Range(0, 1000000000000000)]
|
|
public decimal? BoatLength { get; set; }
|
|
|
|
[Range(1900, 3000)]
|
|
public int? TrailerYear { get; set; }
|
|
|
|
[StringLength(60)]
|
|
public string TrailerMake { get; set; }
|
|
|
|
public string TrailerType { get; set; }
|
|
|
|
[Range(1900, 3000)]
|
|
public int? MotorYear { get; set; }
|
|
|
|
[StringLength(60)]
|
|
public string MotorMake { get; set; }
|
|
|
|
[StringLength(200)]
|
|
public string MotorModel { get; set; }
|
|
|
|
public int? MotorType { get; set; }
|
|
|
|
public Vehicle(Guid? valuationId = null, Guid? vehicleId = null, Guid? sellerId = null)
|
|
{
|
|
ValuationId = valuationId.HasValue ? valuationId.ToString() : Guid.NewGuid().ToString();
|
|
Id = vehicleId.HasValue ? vehicleId.ToString() : null;
|
|
}
|
|
}
|
|
}
|