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

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

    #region Data Properties

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

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

    /// <summary>Gets or sets the intStateID. </summary>
    [DataMember]
    //[ForeignKey("tblSMState")]
    [Column("intStateID")]
    [Bindable(false)]
    [Editable(true)]
    [Display(Name="intStateID", AutoGenerateField=false)]
    public System.Nullable<int> intStateID {
      get; set;
    }

    /// <summary>Gets or sets the intCityID. </summary>
    [DataMember]
    //[ForeignKey("tblSMCity")]
    [Column("intCityID")]
    [Bindable(false)]
    [Editable(true)]
    [Display(Name="intCityID", AutoGenerateField=false)]
    public System.Nullable<int> intCityID {
      get; set;
    }

    /// <summary>Gets or sets the intCountryID. </summary>
    [DataMember]
    //[ForeignKey("tblSMCountry")]
    [Column("intCountryID")]
    [Bindable(false)]
    [Editable(true)]
    [Display(Name="intCountryID", AutoGenerateField=false)]
    public System.Nullable<int> intCountryID {
      get; set;
    }

    /// <summary>Gets or sets the dblLatitude. </summary>
    [DataMember]
    [Column("dblLatitude")]
    [Bindable(true, BindingDirection.TwoWay)]
    [Editable(true)]
    [Display(Name="dblLatitude", AutoGenerateField=true)]
    public System.Nullable<decimal> dblLatitude {
      get; set;
    }

    /// <summary>Gets or sets the dblLongitude. </summary>
    [DataMember]
    [Column("dblLongitude")]
    [Bindable(true, BindingDirection.TwoWay)]
    [Editable(true)]
    [Display(Name="dblLongitude", AutoGenerateField=true)]
    public System.Nullable<decimal> dblLongitude {
      get; set;
    }

    /// <summary>Gets or sets the intSort. </summary>
    [DataMember]
    [Column("intSort")]
    [Bindable(true, BindingDirection.TwoWay)]
    [Editable(true)]
    [Display(Name="intSort", AutoGenerateField=true)]
    public System.Nullable<int> intSort {
      get; set;
    }

    
    #endregion Data Properties

    #region Navigation properties

    /// <summary>Gets or sets the tblSMCity. </summary>
    [DataMember]
    [InverseProperty("tblSMZipCodes")]
    [Bindable(false)]
    [Display(Name="tblSMCity", AutoGenerateField=false)]
    public tblSMCity tblSMCity {
      get; set;
    }

    /// <summary>Gets the tblSMCompanySetups. </summary>
    [DataMember]
    [InverseProperty("tblSMZipCode")]
    [Bindable(false)]
    [Display(Name="tblSMCompanySetups", AutoGenerateField=false)]
    public IbEm.RelatedEntityList<tblSMCompanySetup> tblSMCompanySetups {
      get; set;
    }

    /// <summary>Gets or sets the tblSMCountry. </summary>
    [DataMember]
    [InverseProperty("tblSMZipCodes")]
    [Bindable(false)]
    [Display(Name="tblSMCountry", AutoGenerateField=false)]
    public tblSMCountry tblSMCountry {
      get; set;
    }

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

    #region EntityPropertyNames
    public partial class EntityPropertyNames  {
      public const String intZipCodeID = "intZipCodeID";
      public const String strZipCode = "strZipCode";
      public const String intStateID = "intStateID";
      public const String intCityID = "intCityID";
      public const String intCountryID = "intCountryID";
      public const String dblLatitude = "dblLatitude";
      public const String dblLongitude = "dblLongitude";
      public const String intSort = "intSort";
      
      public const String tblSMCity = "tblSMCity";
      public const String tblSMCompanySetups = "tblSMCompanySetups";
      public const String tblSMCountry = "tblSMCountry";
      public const String tblSMState = "tblSMState";
    }
    #endregion EntityPropertyNames
  }
  #endregion tblSMZipCode class
}
