// ------------------------------------------------------------------------------
// This is autogenerated code from the CodeFirst template.  This file will be
// automatically re-generated from the EDMX when it is saved or the .tt is run.
// You will usually want to first generate your CodeFirst classes from your model
// and then make all subsequent modifications manually.  To avoid losing your
// changes, rename and move this code file so that it will not be re-generated.
// 
//    Generated at: 9/4/2012 7:04:45 PM
//    DevForce version: 6.1.7.1
//    Template version: 2.1.4
// ------------------------------------------------------------------------------
using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Runtime.Serialization;
using IbEm   = IdeaBlade.EntityModel;
using IbCore = IdeaBlade.Core;
using IbVal  = IdeaBlade.Validation;
using IbAop  = IdeaBlade.Aop;

namespace iRely.Model { 

  #region tblSMSecurityPolicy class

  /// <summary>The auto-generated tblSMSecurityPolicy class. </summary>
  
  
  [Table("tblSMSecurityPolicy", Schema="dbo")]
  public partial class tblSMSecurityPolicy : iRely.BaseModel.iRelyEntity {

    #region Data Properties

    /// <summary>Gets or sets the intSecurityPolicyID. </summary>
    [Key]
    [DataMember]
    [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
    [Column("intSecurityPolicyID")]
    [Bindable(true, BindingDirection.TwoWay)]
    [Editable(true)]
    [Display(Name="intSecurityPolicyID", AutoGenerateField=true)]
    [IbVal.RequiredValueVerifier( ErrorMessageResourceName="tblSMSecurityPolicy_intSecurityPolicyID")]
    public int intSecurityPolicyID {
      get; set;
    }

    /// <summary>Gets or sets the strPolicyGroup. </summary>
    [DataMember]
    [Column("strPolicyGroup")]
    [Bindable(true, BindingDirection.TwoWay)]
    [Editable(true)]
    [Display(Name="strPolicyGroup", AutoGenerateField=true)]
    [IbVal.StringLengthVerifier(MaxValue=50, IsRequired=true, ErrorMessageResourceName="tblSMSecurityPolicy_strPolicyGroup")]
    public string strPolicyGroup {
      get; set;
    }

    /// <summary>Gets or sets the strPolicy. </summary>
    [DataMember]
    [Column("strPolicy")]
    [Bindable(true, BindingDirection.TwoWay)]
    [Editable(true)]
    [Display(Name="strPolicy", AutoGenerateField=true)]
    [IbVal.StringLengthVerifier(MaxValue=100, IsRequired=true, ErrorMessageResourceName="tblSMSecurityPolicy_strPolicy")]
    public string strPolicy {
      get; set;
    }

    /// <summary>Gets or sets the strValueType. </summary>
    [DataMember]
    [Column("strValueType")]
    [Bindable(true, BindingDirection.TwoWay)]
    [Editable(true)]
    [Display(Name="strValueType", AutoGenerateField=true)]
    [IbVal.StringLengthVerifier(MaxValue=10, IsRequired=false, ErrorMessageResourceName="tblSMSecurityPolicy_strValueType")]
    public string strValueType {
      get; set;
    }

    /// <summary>Gets or sets the strValue. </summary>
    [DataMember]
    [Column("strValue")]
    [Bindable(true, BindingDirection.TwoWay)]
    [Editable(true)]
    [Display(Name="strValue", AutoGenerateField=true)]
    [IbVal.StringLengthVerifier(MaxValue=10, IsRequired=true, ErrorMessageResourceName="tblSMSecurityPolicy_strValue")]
    public string strValue {
      get; set;
    }

    /// <summary>Gets or sets the strDisplayValue. </summary>
    [DataMember]
    [Column("strDisplayValue")]
    [Bindable(true, BindingDirection.TwoWay)]
    [Editable(true)]
    [Display(Name="strDisplayValue", AutoGenerateField=true)]
    [IbVal.StringLengthVerifier(MaxValue=100, IsRequired=true, ErrorMessageResourceName="tblSMSecurityPolicy_strDisplayValue")]
    public string strDisplayValue {
      get; set;
    }

    /// <summary>Gets or sets the strDescription. </summary>
    [DataMember]
    [Column("strDescription")]
    [Bindable(true, BindingDirection.TwoWay)]
    [Editable(true)]
    [Display(Name="strDescription", AutoGenerateField=true)]
    [IbVal.StringLengthVerifier(MaxValue=4000, IsRequired=true, ErrorMessageResourceName="tblSMSecurityPolicy_strDescription")]
    public string strDescription {
      get; set;
    }

    

    /// <summary>Gets or sets the intSecurityPolicyGroupID. </summary>
    [DataMember]
    //[ForeignKey("tblSMSecurityPolicyGroup")]
    [Column("intSecurityPolicyGroupID")]
    [Bindable(false)]
    [Editable(true)]
    [Display(Name="intSecurityPolicyGroupID", AutoGenerateField=false)]
    [IbVal.RequiredValueVerifier( ErrorMessageResourceName="tblSMSecurityPolicy_intSecurityPolicyGroupID")]
    public int intSecurityPolicyGroupID {
      get; set;
    }
    #endregion Data Properties

    #region Navigation properties

    /// <summary>Gets or sets the tblSMSecurityPolicyGroup. </summary>
    [DataMember]
    [InverseProperty("tblSMSecurityPolicies")]
    [Bindable(false)]
    [Display(Name="tblSMSecurityPolicyGroup", AutoGenerateField=false)]
    public tblSMSecurityPolicyGroup tblSMSecurityPolicyGroup {
      get; set;
    }
    #endregion Navigation properties

    #region EntityPropertyNames
    public partial class EntityPropertyNames  {
      public const String intSecurityPolicyID = "intSecurityPolicyID";
      public const String strPolicyGroup = "strPolicyGroup";
      public const String strPolicy = "strPolicy";
      public const String strValueType = "strValueType";
      public const String strValue = "strValue";
      public const String strDisplayValue = "strDisplayValue";
      public const String strDescription = "strDescription";
      
      public const String intSecurityPolicyGroupID = "intSecurityPolicyGroupID";
      public const String tblSMSecurityPolicyGroup = "tblSMSecurityPolicyGroup";
    }
    #endregion EntityPropertyNames
  }
  #endregion tblSMSecurityPolicy class
}
