// ------------------------------------------------------------------------------
// 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 tblSMPreferencesUser class

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

    #region Data Properties

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

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

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

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

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

    /// <summary>Gets or sets the intUserID. </summary>
    [DataMember]
    //[ForeignKey("tblSMSecurityUser")]
    [Column("intUserID")]
    [Bindable(false)]
    [Editable(true)]
    [Display(Name="intUserID", AutoGenerateField=false)]
    [IbVal.RequiredValueVerifier( ErrorMessageResourceName="tblSMPreferencesUser_intUserID")]
    public int intUserID {
      get; set;
    }

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

    #region Navigation properties

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

    #region EntityPropertyNames
    public partial class EntityPropertyNames  {
      public const String intPreferenceUserID = "intPreferenceUserID";
      public const String strFieldName = "strFieldName";
      public const String strFieldCaption = "strFieldCaption";
      public const String strFieldType = "strFieldType";
      public const String strFieldValue = "strFieldValue";
      public const String intUserID = "intUserID";
      public const String intUserGroupID = "intUserGroupID";
      public const String tblSMSecurityUser = "tblSMSecurityUser";
    }
    #endregion EntityPropertyNames
  }
  #endregion tblSMPreferencesUser class
}
