Added new Models and Razor Template
This commit is contained in:
51
WGneu/Models/AreaCommit.cs
Normal file
51
WGneu/Models/AreaCommit.cs
Normal file
@ -0,0 +1,51 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace WGneu.Models {
|
||||
[Table("area_commitment"), PrimaryKey("Vnr", "KgNr", "GstNr")]
|
||||
public class AreaCommit {
|
||||
[Column("vnr")]
|
||||
public int Vnr { get; set; }
|
||||
|
||||
[Column("kgnr")]
|
||||
public int KgNr { get; set; }
|
||||
|
||||
[Column("gstnr")]
|
||||
public String? GstNr { get; set; }
|
||||
|
||||
[Column("rdnr")]
|
||||
public int RdNr { get; set; }
|
||||
|
||||
[Column("area")]
|
||||
public int Area { get; set; }
|
||||
|
||||
[Column("sortid")]
|
||||
public String SortId { get; set; }
|
||||
|
||||
[Column("attrid")]
|
||||
public String? AttrId { get; set; }
|
||||
|
||||
[Column("cultid")]
|
||||
public String CultId { get; set; }
|
||||
|
||||
[ForeignKey("Vnr")]
|
||||
public virtual Contract Contract { get; set; }
|
||||
|
||||
[ForeignKey("SortId")]
|
||||
public virtual WineVar WineVar { get; set; }
|
||||
|
||||
[ForeignKey("AttrId")]
|
||||
public virtual WineAttr WineAttr { get; set; }
|
||||
|
||||
[ForeignKey("CultId")]
|
||||
public virtual WineCult WineCult { get; set; }
|
||||
|
||||
[ForeignKey("KgNr, RdNr")]
|
||||
public virtual WbRd WbRd { get; set; }
|
||||
}
|
||||
}
|
27
WGneu/Models/Contract.cs
Normal file
27
WGneu/Models/Contract.cs
Normal file
@ -0,0 +1,27 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace WGneu.Models {
|
||||
[Table("contract"), PrimaryKey("Vnr")]
|
||||
public class Contract {
|
||||
[Column("vnr")]
|
||||
public int Vnr { get; set; }
|
||||
|
||||
[Column("mgnr")]
|
||||
public int MgNr { get; set; }
|
||||
|
||||
[Column("year_from")]
|
||||
public int YearFrom { get; set; }
|
||||
|
||||
[Column("year_to")]
|
||||
public int? YearTo { get; set; }
|
||||
|
||||
[ForeignKey("MgNr")]
|
||||
public virtual Member Member { get; set; }
|
||||
}
|
||||
}
|
24
WGneu/Models/WbRd.cs
Normal file
24
WGneu/Models/WbRd.cs
Normal file
@ -0,0 +1,24 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace WGneu.Models {
|
||||
[Table("wb_rd"), PrimaryKey("KgNr", "RdNr")]
|
||||
public class WbRd {
|
||||
[Column("kgnr")]
|
||||
public int KgNr { get; set; }
|
||||
|
||||
[Column("rdnr")]
|
||||
public int RdNr { get; set; }
|
||||
|
||||
[Column("name")]
|
||||
public String Name { get; set; }
|
||||
|
||||
[ForeignKey("KgNr")]
|
||||
public virtual WbKg WbKg { get; set; }
|
||||
}
|
||||
}
|
21
WGneu/Models/WineAttr.cs
Normal file
21
WGneu/Models/WineAttr.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace WGneu.Models {
|
||||
[Table("wine_attribute"), PrimaryKey("AttrId")]
|
||||
public class WineAttr {
|
||||
[Column("attrid")]
|
||||
public String AttrId { get; set; }
|
||||
|
||||
[Column("name")]
|
||||
public String Name { get; set; }
|
||||
|
||||
[Column("kg_per_ha")]
|
||||
public int KgPerHa { get; set; }
|
||||
}
|
||||
}
|
18
WGneu/Models/WineCult.cs
Normal file
18
WGneu/Models/WineCult.cs
Normal file
@ -0,0 +1,18 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace WGneu.Models {
|
||||
[Table("wine_cultivation"), PrimaryKey("CultId")]
|
||||
public class WineCult {
|
||||
[Column("cultid")]
|
||||
public String CultId { get; set; }
|
||||
|
||||
[Column("name")]
|
||||
public String Name { get; set; }
|
||||
}
|
||||
}
|
27
WGneu/Models/WineQual.cs
Normal file
27
WGneu/Models/WineQual.cs
Normal file
@ -0,0 +1,27 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace WGneu.Models {
|
||||
[Table("wine_quality"), PrimaryKey("QualId")]
|
||||
public class WineQual {
|
||||
[Column("qualid")]
|
||||
public String QualId { get; set; }
|
||||
|
||||
[Column("origin_level")]
|
||||
public int OriginLevel { get; set; }
|
||||
|
||||
[Column("name")]
|
||||
public String Name { get; set; }
|
||||
|
||||
[Column("from_kmw")]
|
||||
public double? FromKmw { get; set; }
|
||||
|
||||
[Column("to_kmw")]
|
||||
public double? ToKmw { get; set; }
|
||||
}
|
||||
}
|
24
WGneu/Models/WineVar.cs
Normal file
24
WGneu/Models/WineVar.cs
Normal file
@ -0,0 +1,24 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace WGneu.Models {
|
||||
[Table("wine_variety"), PrimaryKey("SortId")]
|
||||
public class WineVar {
|
||||
[Column("sortid")]
|
||||
public String SortId { get; set; }
|
||||
|
||||
[Column("type")]
|
||||
public String Type { get; set; }
|
||||
|
||||
[Column("name")]
|
||||
public String Name { get; set; }
|
||||
|
||||
[Column("comment")]
|
||||
public String? Comment { get; set; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user