/
Vehicle.cs
36 lines (32 loc) · 1 KB
/
Vehicle.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace vega.Core.Models
{
[Table("Vehicles")]
public class Vehicle
{
public int Id { get; set; }
public int ModelId { get; set; }
public Model Model { get; set; }
public bool IsRegistered { get; set; }
[Required]
[StringLength(255)]
public string ContactName { get; set; }
[StringLength(255)]
public string ContactEmail { get; set; }
[Required]
[StringLength(255)]
public string ContactPhone { get; set; }
public DateTime LastUpdate { get; set; }
public ICollection<VehicleFeature> Features { get; set; }
public ICollection<Photo> Photos { get; set; }
public Vehicle()
{
Features = new Collection<VehicleFeature>();
Photos = new Collection<Photo>();
}
}
}