Browse Source

parameter

confirmation-email
uJ 11 years ago
parent
commit
853616867d
2 changed files with 63 additions and 0 deletions
  1. +38
    -0
      Sevomin.Models/Parameter.cs
  2. +25
    -0
      Sevomin.Models/ParameterValue.cs

+ 38
- 0
Sevomin.Models/Parameter.cs View File

@ -0,0 +1,38 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Sevomin.Models.Helpers;
namespace Sevomin.Models
{
public class Parameter
{
[Key]
public int Id { get; set; }
[Required]
public string Name { get; set; }
[Required]
public bool Moscow { get; set; }
[Required]
public byte DisplayMethod { get; set; }
[Required]
public string GroupName { get; set; }
[StringLength(140)]
public string CommentAvalin { get; set; }
[StringLength(140)]
public string CommentDovomin { get; set; }
}
}

+ 25
- 0
Sevomin.Models/ParameterValue.cs View File

@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Sevomin.Models
{
public class ParameterValue
{
[Key]
public int Id { get; set; }
[Required]
[Index]
[Index("IX_UniqueKey", 1, IsUnique=true)]
public int GroupKey { get; set; }
[Required]
[Index("IX_UniqueKey", 2, IsUnique = true)]
public string Value { get; set; }
}
}

Loading…
Cancel
Save