29 lines
764 B
C#
29 lines
764 B
C#
using Microsoft.EntityFrameworkCore;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using IndexAttribute = Microsoft.EntityFrameworkCore.IndexAttribute;
|
|
|
|
namespace Elwig.Models.Entities {
|
|
[Table("wine_cultivation"), PrimaryKey("CultId"), Index("Name", IsUnique = true)]
|
|
public class WineCult {
|
|
[Column("cultid")]
|
|
public string CultId { get; set; }
|
|
|
|
[Column("name")]
|
|
public string Name { get; set; }
|
|
|
|
[Column("description")]
|
|
public string? Description { get; set; }
|
|
|
|
public WineCult() { }
|
|
|
|
public WineCult(string cultId, string name) {
|
|
CultId = cultId;
|
|
Name = name;
|
|
}
|
|
|
|
public override string ToString() {
|
|
return Name;
|
|
}
|
|
}
|
|
}
|