cratie+lang btn

This commit is contained in:
Paul Schneider 2017-09-23 02:20:38 +02:00
commit eba9744981
8 changed files with 98 additions and 13 deletions

View file

@ -53,6 +53,7 @@ namespace Yavsc.Models
builder.Entity<HairTaintInstance>().HasKey(ti=>new { ti.TaintId, ti.PrestationId } );
builder.Entity<HyperLink>().HasKey(l=>new { l.HRef, l.Method });
builder.Entity<Period>().HasKey(l=>new { l.Start, l.End });
builder.Entity<Models.Cratie.Option>().HasKey( o => new { o.Code, o.CodeScrutin });
foreach (var et in builder.Model.GetEntityTypes()) {
if (et.ClrType.GetInterface("IBaseTrackedEntity")!=null)

View file

@ -0,0 +1,17 @@
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Yavsc.Models.Cratie
{
public class Option: IBaseTrackedEntity
{
public string CodeScrutin { get; set; }
public string Code { get; set ; }
public string Description { get; set; }
public DateTime DateCreated { get ; set ; }
public string UserCreated { get ; set ; }
public DateTime DateModified { get ; set ; }
public string UserModified { get ; set ; }
}
}

View file

@ -0,0 +1,16 @@
using System;
using System.ComponentModel.DataAnnotations;
namespace Yavsc.Models.Cratie
{
public class Scrutin : IBaseTrackedEntity
{
[Key]
public string Code { get; set ; }
public string Description { get ; set ; }
public DateTime DateCreated { get; set; }
public string UserCreated { get; set; }
public DateTime DateModified { get; set; }
public string UserModified { get; set; }
}
}