Prvi commit
This commit is contained in:
70
EveryThing/Models/File.cs
Normal file
70
EveryThing/Models/File.cs
Normal file
@@ -0,0 +1,70 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using EveryThing.Models.CodeTable;
|
||||
|
||||
namespace EveryThing.Models
|
||||
{
|
||||
public enum FileType
|
||||
{
|
||||
Vehicle = 0,
|
||||
VehicleIssue = 1,
|
||||
VehicleIncident = 2,
|
||||
VehicleFuelingCard = 3,
|
||||
VehicleFueling = 4,
|
||||
VehicleBreakdown = 5,
|
||||
Document = 6,
|
||||
Note = 7,
|
||||
Project = 8,
|
||||
ProjectPart = 9,
|
||||
ProjectPartItem = 10,
|
||||
CodeTableItem = 11
|
||||
}
|
||||
|
||||
public class File
|
||||
{
|
||||
[Key]
|
||||
public int IdFile { get; set; }
|
||||
|
||||
[Required]
|
||||
[ForeignKey("Company")]
|
||||
public int IdCompanyFk { get; set; }
|
||||
|
||||
[Required]
|
||||
public FileType FileType { get; set; }
|
||||
|
||||
[Required]
|
||||
public int IdReferenceFk { get; set; }
|
||||
|
||||
[Required]
|
||||
public string Guid { get; set; }
|
||||
|
||||
[Required]
|
||||
public string Extension { get; set; }
|
||||
|
||||
[Required]
|
||||
public string Salt { get; set; }
|
||||
|
||||
[Required]
|
||||
public string Iv { get; set; }
|
||||
|
||||
[Required]
|
||||
[Display(Name = "Naziv")]
|
||||
public string Title { get; set; }
|
||||
|
||||
[Required]
|
||||
[DataType(DataType.Date)]
|
||||
[DisplayFormat(DataFormatString = "{0:dd.MM.yyyy HH:mm:ss}", ApplyFormatInEditMode = true)]
|
||||
[Display(Name = "Datum dodajanja")]
|
||||
public DateTime DateOfUpload { get; set; }
|
||||
|
||||
[Display(Name = "Opomba")]
|
||||
public string Note { get; set; }
|
||||
|
||||
//ForeignKey
|
||||
public CodeTableCompany Company { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user