38 lines
977 B
C#
38 lines
977 B
C#
using Microsoft.EntityFrameworkCore;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using IndexAttribute = Microsoft.EntityFrameworkCore.IndexAttribute;
|
|
|
|
namespace Elwig.Models.Entities {
|
|
[Table("wine_attribute"), PrimaryKey("AttrId"), Index("Name", IsUnique = true)]
|
|
public class WineAttr {
|
|
[Column("attrid")]
|
|
public string AttrId { get; set; }
|
|
|
|
[Column("name")]
|
|
public string Name { get; set; }
|
|
|
|
[Column("active")]
|
|
public bool IsActive { get; set; }
|
|
|
|
[Column("max_kg_per_ha")]
|
|
public int? MaxKgPerHa { get; set; }
|
|
|
|
[Column("strict")]
|
|
public bool IsStrict { get; set; }
|
|
|
|
[Column("fill_lower")]
|
|
public int FillLower { get; set; }
|
|
|
|
public WineAttr() { }
|
|
|
|
public WineAttr(string attrId, string name) {
|
|
AttrId = attrId;
|
|
Name = name;
|
|
}
|
|
|
|
public override string ToString() {
|
|
return Name;
|
|
}
|
|
}
|
|
}
|