demo20230512/Models/Paramemter/NonYearlyParameterType.cs

37 lines
1.0 KiB
C#
Raw Normal View History

2023-05-12 10:20:28 +08:00
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Web;
using Resources;
namespace Weee.Models.Paramemter
{
public class NonYearlyParameterType :MultiLanguage
{
public NonYearlyParameterType()
{
Parameters = new HashSet<NonYearlyParameter>();
}
public NonYearlyParameterType(string name,decimal value)
{
DisplayNameTW = name;
Parameters = new HashSet<NonYearlyParameter>()
{
new NonYearlyParameter(value)
};
}
public int ID { get; set; }
[Required]
public int CategoryID { get; set; }
[ForeignKey("CategoryID")]
[Display(Name = "Category", ResourceType = typeof(Resource))]
public virtual NonYearlyParameterCategory Category { get; set; }
[InverseProperty("Type")]
public virtual ICollection<NonYearlyParameter> Parameters { get; set; }
}
}