<?xml version="1.0" encoding="utf-8"?>
<Schema Namespace="iBemsModel.Store" Provider="System.Data.SqlClient" ProviderManifestToken="2008" Alias="Self" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">
  <EntityType Name="BemsAlarmGroup">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="AlarmGroupId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="AlarmGroupId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="50" Nullable="false" />
  </EntityType>
  <EntityType Name="BemsAlarmGroupUser">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="AlarmGroupId" />
      <PropertyRef Name="UserId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="AlarmGroupId" Type="int" Nullable="false" />
    <Property Name="UserId" Type="nvarchar" MaxLength="24" Nullable="false" />
  </EntityType>
  <EntityType Name="BemsAlarmLog">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="FacilityTypeId" />
      <PropertyRef Name="FacilityCode" />
      <PropertyRef Name="PropertyId" />
      <PropertyRef Name="FormulaId" />
      <PropertyRef Name="CreatedDateTime" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="FacilityTypeId" Type="int" Nullable="false" />
    <Property Name="FacilityCode" Type="int" Nullable="false" />
    <Property Name="PropertyId" Type="int" Nullable="false" />
    <Property Name="FormulaId" Type="int" Nullable="false" />
    <Property Name="CreatedDateTime" Type="datetime" Nullable="false" />
    <Property Name="CurrentValue" Type="float" />
    <Property Name="SMSResult" Type="nvarchar" MaxLength="2" />
    <Property Name="EmailResult" Type="nvarchar" MaxLength="2" />
    <Property Name="Conform" Type="bit" />
  </EntityType>
  <EntityType Name="BemsAlarmSetting">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="FacilityTypeId" />
      <PropertyRef Name="FacilityCode" />
      <PropertyRef Name="PropertyId" />
      <PropertyRef Name="FormulaId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="FacilityTypeId" Type="int" Nullable="false" />
    <Property Name="FacilityCode" Type="int" Nullable="false" />
    <Property Name="PropertyId" Type="int" Nullable="false" />
    <Property Name="FormulaId" Type="int" Nullable="false" />
    <Property Name="FacilityName" Type="nvarchar" MaxLength="80" Nullable="false" />
    <Property Name="PointName" Type="nvarchar" MaxLength="64" Nullable="false" />
    <Property Name="UseUpperLimit" Type="bit" Nullable="false" />
    <Property Name="UpperLimit" Type="float" />
    <Property Name="UseLowerLimit" Type="bit" Nullable="false" />
    <Property Name="LowerLimit" Type="float" />
    <Property Name="UseAlarm" Type="bit" Nullable="false" />
    <Property Name="UseSMS" Type="bit" Nullable="false" />
    <Property Name="UseEmail" Type="bit" Nullable="false" />
    <Property Name="AlarmGroupName" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="Content" Type="nvarchar" MaxLength="1000" />
  </EntityType>
  <EntityType Name="BemsAnalysisType">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="AnalysisType" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="AnalysisType" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="48" />
  </EntityType>
  <EntityType Name="BemsChartInfo">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="FacilityTypeId" />
      <PropertyRef Name="ChartId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="FacilityTypeId" Type="int" Nullable="false" />
    <Property Name="ChartId" Type="int" Nullable="false" />
    <Property Name="LAxTitle" Type="nvarchar" MaxLength="64" Nullable="false" />
    <Property Name="RAxTitle" Type="nvarchar" MaxLength="64" />
    <Property Name="XAxTitle" Type="nvarchar" MaxLength="64" />
    <Property Name="XSFmId" Type="int" />
    <Property Name="XSType" Type="nvarchar" MaxLength="16" />
    <Property Name="LSFmId1" Type="int" Nullable="false" />
    <Property Name="LSName1" Type="nvarchar" MaxLength="64" Nullable="false" />
    <Property Name="LSType1" Type="nvarchar" MaxLength="16" Nullable="false" />
    <Property Name="LSFmId2" Type="int" />
    <Property Name="LSName2" Type="nvarchar" MaxLength="64" />
    <Property Name="LSType2" Type="nvarchar" MaxLength="16" />
    <Property Name="LSFmId3" Type="int" />
    <Property Name="LSName3" Type="nvarchar" MaxLength="64" />
    <Property Name="LSType3" Type="nvarchar" MaxLength="16" />
    <Property Name="LSFmId4" Type="int" />
    <Property Name="LSName4" Type="nvarchar" MaxLength="64" />
    <Property Name="LSType4" Type="nvarchar" MaxLength="16" />
    <Property Name="RSFmId1" Type="int" />
    <Property Name="RSName1" Type="nvarchar" MaxLength="64" />
    <Property Name="RSType1" Type="nvarchar" MaxLength="16" />
    <Property Name="RSFmId2" Type="int" />
    <Property Name="RSName2" Type="nvarchar" MaxLength="64" />
    <Property Name="RSType2" Type="nvarchar" MaxLength="16" />
    <Property Name="RSFmId3" Type="int" />
    <Property Name="RSName3" Type="nvarchar" MaxLength="64" />
    <Property Name="RSType3" Type="nvarchar" MaxLength="16" />
    <Property Name="RSFmId4" Type="int" />
    <Property Name="RSName4" Type="nvarchar" MaxLength="64" />
    <Property Name="RSType4" Type="nvarchar" MaxLength="16" />
    <Property Name="Title" Type="nvarchar" MaxLength="64" Nullable="false" />
    <Property Name="UseX" Type="bit" />
    <Property Name="UseLAxMinMax" Type="bit" />
    <Property Name="UseRAxMinMax" Type="bit" />
    <Property Name="UseXAxMinMax" Type="bit" />
    <Property Name="LAxMin" Type="float" />
    <Property Name="LAxMax" Type="float" />
    <Property Name="RAxMin" Type="float" />
    <Property Name="RAxMax" Type="float" />
    <Property Name="XAxMin" Type="float" />
    <Property Name="XAxMax" Type="float" />
    <Property Name="Palette" Type="nvarchar" MaxLength="32" Nullable="false" />
    <Property Name="UseChart" Type="bit" />
    <Property Name="UseLCTLine" Type="bit" Nullable="false" />
    <Property Name="LCTLineTitle" Type="nvarchar" MaxLength="64" />
    <Property Name="LCTLineValue" Type="float" />
    <Property Name="UseRCTLine" Type="bit" Nullable="false" />
    <Property Name="RCTLineTitle" Type="nvarchar" MaxLength="64" />
    <Property Name="RCTLineValue" Type="float" />
  </EntityType>
  <EntityType Name="BemsConfigData">
    <Key>
      <PropertyRef Name="SiteId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="LoadDBIP" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="LoadDBUserID" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="LoadDBUserPW" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="LoadDBName" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="TargetDBIP" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="TargetDBUserID" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="TargetDBUserPW" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="TargetDBName" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="InitialDate" Type="datetime" Nullable="false" />
    <Property Name="LinearFilterLength" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="NonlinearTestSize" Type="float" Nullable="false" />
  </EntityType>
  <EntityType Name="BemsControlAHUTempConfig">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="FacilityTypeId" />
      <PropertyRef Name="FacilityCode" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="FacilityTypeId" Type="int" Nullable="false" />
    <Property Name="FacilityCode" Type="int" Nullable="false" />
    <Property Name="MaxTemperature" Type="float" Nullable="false" />
    <Property Name="MinTemperature" Type="float" Nullable="false" />
  </EntityType>
  <EntityType Name="BemsControlPointHistory">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="FacilityCode" />
      <PropertyRef Name="PropertyId" />
      <PropertyRef Name="CreateDateTime" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="FacilityTypeId" Type="int" Nullable="false" />
    <Property Name="FacilityCode" Type="int" Nullable="false" />
    <Property Name="PropertyId" Type="int" Nullable="false" />
    <Property Name="CreateDateTime" Type="datetime" Nullable="false" />
    <Property Name="ControlValue" Type="float" Nullable="false" />
    <Property Name="WriteServiceName" Type="nvarchar" MaxLength="64" />
    <Property Name="ActionDateTime" Type="datetime" />
  </EntityType>
  <EntityType Name="BemsEnergyConfigPercentMonth">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="Year" />
      <PropertyRef Name="Month" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="Year" Type="int" Nullable="false" />
    <Property Name="Month" Type="int" Nullable="false" />
    <Property Name="Electricity" Type="float" />
    <Property Name="Gas" Type="float" />
    <Property Name="Water" Type="float" />
  </EntityType>
  <EntityType Name="BemsEnergyConfigPercentWeek">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="Year" />
      <PropertyRef Name="Week" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="Year" Type="int" Nullable="false" />
    <Property Name="Week" Type="int" Nullable="false" />
    <Property Name="Electricity" Type="float" />
    <Property Name="Gas" Type="float" />
    <Property Name="Water" Type="float" />
  </EntityType>
  <EntityType Name="BemsEnergyCost">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="FacilityCode" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="FacilityTypeId" Type="int" Nullable="false" />
    <Property Name="FacilityCode" Type="int" Nullable="false" />
    <Property Name="PowerConsumption1" Type="float" />
    <Property Name="PowerConsumption2" Type="float" />
    <Property Name="GasConsumption" Type="float" />
    <Property Name="GasHeatQuantity" Type="float" />
    <Property Name="PowerPriceTypeId" Type="int" />
    <Property Name="GasPriceTypeId" Type="int" />
    <Property Name="IsUse" Type="bit" />
  </EntityType>
  <EntityType Name="BemsEnergyDaily">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="BuildingId" />
      <PropertyRef Name="ServiceTypeId" />
      <PropertyRef Name="FuelTypeId" />
      <PropertyRef Name="CreatedDate" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="BuildingId" Type="int" Nullable="false" />
    <Property Name="ServiceTypeId" Type="smallint" Nullable="false" />
    <Property Name="FuelTypeId" Type="smallint" Nullable="false" />
    <Property Name="CreatedDate" Type="date" Nullable="false" />
    <Property Name="Prediction" Type="float" />
    <Property Name="Measurement" Type="float" />
    <Property Name="Goal" Type="float" />
    <Property Name="Prediction_Regression" Type="float" />
    <Property Name="MeanT" Type="float" />
    <Property Name="HDD" Type="float" />
    <Property Name="CDD" Type="float" />
  </EntityType>
  <EntityType Name="BemsEnergyDailyRegression">
    <Key>
      <PropertyRef Name="SiteId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="Weekday_Power" Type="nvarchar" MaxLength="50" />
    <Property Name="Weekday_Power_Temp" Type="nvarchar" MaxLength="50" />
    <Property Name="Weekday_Gas" Type="nvarchar" MaxLength="50" />
    <Property Name="Weekday_Gas_Temp" Type="nvarchar" MaxLength="50" />
    <Property Name="Weekday_Water" Type="nvarchar" MaxLength="50" />
    <Property Name="Weekday_Water_Temp" Type="nvarchar" MaxLength="50" />
    <Property Name="Holiday_Power" Type="nvarchar" MaxLength="50" />
    <Property Name="Holiday_Power_Temp" Type="nvarchar" MaxLength="50" />
    <Property Name="Holiday_Gas" Type="nvarchar" MaxLength="50" />
    <Property Name="Holiday_Gas_Temp" Type="nvarchar" MaxLength="50" />
    <Property Name="Holiday_Water" Type="nvarchar" MaxLength="50" />
    <Property Name="Holiday_Water_Temp" Type="nvarchar" MaxLength="50" />
    <Property Name="IsRegression" Type="bit" />
  </EntityType>
  <EntityType Name="BemsFacilityType">
    <Key>
      <PropertyRef Name="FacilityTypeId" />
    </Key>
    <Property Name="FacilityTypeId" Type="int" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="48" />
  </EntityType>
  <EntityType Name="BemsFactorCo2">
    <Key>
      <PropertyRef Name="FuelTypeId" />
    </Key>
    <Property Name="FuelTypeId" Type="smallint" Nullable="false" />
    <Property Name="Factor" Type="float" Nullable="false" />
  </EntityType>
  <EntityType Name="BemsFactorToe">
    <Key>
      <PropertyRef Name="FuelTypeId" />
    </Key>
    <Property Name="FuelTypeId" Type="smallint" Nullable="false" />
    <Property Name="TotalFactor" Type="float" Nullable="false" />
    <Property Name="PureFactor" Type="float" Nullable="false" />
    <Property Name="kcal" Type="float" />
  </EntityType>
  <EntityType Name="BemsFloorPlan">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="Name" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="FloorId" Type="int" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="ImageFileId" Type="int" />
  </EntityType>
  <EntityType Name="BemsFloorStatus">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="FloorId" />
      <PropertyRef Name="FloorName" />
      <PropertyRef Name="ImageFileId" />
      <PropertyRef Name="Xvalue" />
      <PropertyRef Name="Yvalue" />
      <PropertyRef Name="PropertyId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="FloorId" Type="int" Nullable="false" />
    <Property Name="FloorName" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="ImageFileId" Type="int" Nullable="false" />
    <Property Name="Xvalue" Type="int" Nullable="false" />
    <Property Name="Yvalue" Type="int" Nullable="false" />
    <Property Name="ZoneId" Type="int" />
    <Property Name="ServiceTypeId" Type="int" />
    <Property Name="FacilityTypeId" Type="int" Nullable="false" />
    <Property Name="FacilityCode" Type="int" Nullable="false" />
    <Property Name="PropertyId" Type="int" Nullable="false" />
    <Property Name="FacilityName" Type="nvarchar" MaxLength="64" />
  </EntityType>
  <EntityType Name="BemsFormula">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="FacilityTypeId" />
      <PropertyRef Name="FacilityCode" />
      <PropertyRef Name="FormulaId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="FacilityTypeId" Type="int" Nullable="false" />
    <Property Name="FacilityCode" Type="int" Nullable="false" />
    <Property Name="FormulaId" Type="int" Nullable="false" />
    <Property Name="Formula" Type="nvarchar" MaxLength="120" Nullable="false" />
  </EntityType>
  <EntityType Name="BemsFormulaBase">
    <Key>
      <PropertyRef Name="FacilityTypeId" />
      <PropertyRef Name="FormulaId" />
    </Key>
    <Property Name="FacilityTypeId" Type="int" Nullable="false" />
    <Property Name="FormulaId" Type="int" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="32" Nullable="false" />
  </EntityType>
  <EntityType Name="BemsFormulaParameter">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="FacilityCode" />
      <PropertyRef Name="FormulaId" />
      <PropertyRef Name="ParameterId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="FacilityTypeId" Type="int" Nullable="false" />
    <Property Name="FacilityCode" Type="int" Nullable="false" />
    <Property Name="FormulaId" Type="int" Nullable="false" />
    <Property Name="ParameterId" Type="nchar" MaxLength="1" Nullable="false" />
    <Property Name="ParameterFacilityCode" Type="int" Nullable="false" />
    <Property Name="ParameterPropertyId" Type="int" Nullable="false" />
  </EntityType>
  <EntityType Name="BemsFormulaTable">
    <Key>
      <PropertyRef Name="TableId" />
    </Key>
    <Property Name="TableId" Type="int" Nullable="false" />
    <Property Name="FunctionName" Type="nvarchar" MaxLength="20" Nullable="false" />
    <Property Name="Description" Type="nvarchar" MaxLength="80" Nullable="false" />
  </EntityType>
  <EntityType Name="BemsFormulaTableValue">
    <Key>
      <PropertyRef Name="TableId" />
      <PropertyRef Name="XValue" />
    </Key>
    <Property Name="TableId" Type="int" Nullable="false" />
    <Property Name="XValue" Type="float" Nullable="false" />
    <Property Name="YValue" Type="float" Nullable="false" />
  </EntityType>
  <EntityType Name="BemsFuelType">
    <Key>
      <PropertyRef Name="FuelTypeId" />
    </Key>
    <Property Name="FuelTypeId" Type="smallint" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="48" />
  </EntityType>
  <EntityType Name="BemsIceThermalStorageSimulation">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="FacilityCode" />
      <PropertyRef Name="PropertyId" />
      <PropertyRef Name="CreatedDateTime" />
      <PropertyRef Name="TargetDateTime" />
      <PropertyRef Name="SimulationCase" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="FacilityTypeId" Type="int" Nullable="false" />
    <Property Name="FacilityCode" Type="int" Nullable="false" />
    <Property Name="PropertyId" Type="int" Nullable="false" />
    <Property Name="CreatedDateTime" Type="datetime" Nullable="false" />
    <Property Name="TargetDateTime" Type="datetime" Nullable="false" />
    <Property Name="SimulationValue" Type="float" />
    <Property Name="SimulationCase" Type="int" Nullable="false" />
  </EntityType>
  <EntityType Name="BemsMonitoringPoint">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="FacilityCode" />
      <PropertyRef Name="PropertyId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="FacilityTypeId" Type="int" Nullable="false" />
    <Property Name="FacilityCode" Type="int" Nullable="false" />
    <Property Name="PropertyId" Type="int" Nullable="false" />
    <Property Name="ValueType" Type="int" Nullable="false" />
    <Property Name="ServiceTypeId" Type="smallint" />
    <Property Name="FuelTypeId" Type="smallint" />
    <Property Name="Name" Type="nvarchar" MaxLength="64" />
    <Property Name="Description" Type="nvarchar" MaxLength="256" />
    <Property Name="BuildingId" Type="int" />
    <Property Name="FloorId" Type="int" />
    <Property Name="ZoneId" Type="int" />
  </EntityType>
  <EntityType Name="BemsMonitoringPointBaseData">
    <Key>
      <PropertyRef Name="FacilityTypeId" />
      <PropertyRef Name="PropertyId" />
    </Key>
    <Property Name="FacilityTypeId" Type="int" Nullable="false" />
    <Property Name="PropertyId" Type="int" Nullable="false" />
    <Property Name="ValueType" Type="int" Nullable="false" />
    <Property Name="IsAccumulated" Type="bit" Nullable="false" />
    <Property Name="ServiceTypeId" Type="smallint" />
    <Property Name="FuelTypeId" Type="smallint" />
    <Property Name="Name" Type="nvarchar" MaxLength="64" />
    <Property Name="Description" Type="nvarchar" MaxLength="256" />
    <Property Name="IsSampled" Type="bit" />
    <Property Name="IsConverted" Type="bit" />
  </EntityType>
  <EntityType Name="BemsMonitoringPointConfig">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="FacilityCode" />
      <PropertyRef Name="PropertyId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="FacilityTypeId" Type="int" Nullable="false" />
    <Property Name="FacilityCode" Type="int" Nullable="false" />
    <Property Name="PropertyId" Type="int" Nullable="false" />
    <Property Name="IsAccumulated" Type="bit" Nullable="false" />
    <Property Name="IsSampled" Type="bit" Nullable="false" />
    <Property Name="SaveMode" Type="int" Nullable="false" />
    <Property Name="ControlPointName" Type="nvarchar" MaxLength="200" />
    <Property Name="IsConverted" Type="bit" />
  </EntityType>
  <EntityType Name="BemsMonitoringPointForecastingDayAhead">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="FacilityCode" />
      <PropertyRef Name="PropertyId" />
      <PropertyRef Name="CreatedDateTime" />
      <PropertyRef Name="TargetDateTime" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="FacilityTypeId" Type="int" Nullable="false" />
    <Property Name="FacilityCode" Type="int" Nullable="false" />
    <Property Name="PropertyId" Type="int" Nullable="false" />
    <Property Name="CreatedDateTime" Type="datetime" Nullable="false" />
    <Property Name="TargetDateTime" Type="datetime" Nullable="false" />
    <Property Name="ForecastedValue" Type="float" Nullable="false" />
  </EntityType>
  <EntityType Name="BemsMonitoringPointForecastingHourAhead">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="FacilityCode" />
      <PropertyRef Name="PropertyId" />
      <PropertyRef Name="CreatedDateTime" />
      <PropertyRef Name="TargetDateTime" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="FacilityTypeId" Type="int" Nullable="false" />
    <Property Name="FacilityCode" Type="int" Nullable="false" />
    <Property Name="PropertyId" Type="int" Nullable="false" />
    <Property Name="CreatedDateTime" Type="datetime" Nullable="false" />
    <Property Name="TargetDateTime" Type="datetime" Nullable="false" />
    <Property Name="ForecastedValue" Type="float" Nullable="false" />
  </EntityType>
  <EntityType Name="BemsMonitoringPointHistory15min">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="FacilityCode" />
      <PropertyRef Name="PropertyId" />
      <PropertyRef Name="CreatedDateTime" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="FacilityTypeId" Type="int" Nullable="false" />
    <Property Name="FacilityCode" Type="int" Nullable="false" />
    <Property Name="PropertyId" Type="int" Nullable="false" />
    <Property Name="CreatedDateTime" Type="datetime" Nullable="false" />
    <Property Name="CurrentValue" Type="float" Nullable="false" />
  </EntityType>
  <EntityType Name="BemsMonitoringPointHistory15minRawData">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="FacilityCode" />
      <PropertyRef Name="PropertyId" />
      <PropertyRef Name="CreatedDateTime" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="FacilityTypeId" Type="int" Nullable="false" />
    <Property Name="FacilityCode" Type="int" Nullable="false" />
    <Property Name="PropertyId" Type="int" Nullable="false" />
    <Property Name="CreatedDateTime" Type="datetime" Nullable="false" />
    <Property Name="CurrentValue" Type="float" Nullable="false" />
  </EntityType>
  <EntityType Name="BemsMonitoringPointHistoryDaily">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="FacilityCode" />
      <PropertyRef Name="PropertyId" />
      <PropertyRef Name="CreatedDateTime" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="FacilityTypeId" Type="int" Nullable="false" />
    <Property Name="FacilityCode" Type="int" Nullable="false" />
    <Property Name="PropertyId" Type="int" Nullable="false" />
    <Property Name="CreatedDateTime" Type="datetime" Nullable="false" />
    <Property Name="DailyValue" Type="float" Nullable="false" />
    <Property Name="MaxValue" Type="float" />
    <Property Name="MinValue" Type="float" />
  </EntityType>
  <EntityType Name="BemsMonitoringPointHistoryHourly">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="FacilityCode" />
      <PropertyRef Name="PropertyId" />
      <PropertyRef Name="CreatedDateTime" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="FacilityTypeId" Type="int" Nullable="false" />
    <Property Name="FacilityCode" Type="int" Nullable="false" />
    <Property Name="PropertyId" Type="int" Nullable="false" />
    <Property Name="CreatedDateTime" Type="datetime" Nullable="false" />
    <Property Name="CurrentValue" Type="float" Nullable="false" />
  </EntityType>
  <EntityType Name="BemsMonitoringPointToAnlaysisType">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="FacilityTypeId" />
      <PropertyRef Name="FacilityCode" />
      <PropertyRef Name="PropertyId" />
      <PropertyRef Name="AnalysisType" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="FacilityTypeId" Type="int" Nullable="false" />
    <Property Name="FacilityCode" Type="int" Nullable="false" />
    <Property Name="PropertyId" Type="int" Nullable="false" />
    <Property Name="AnalysisType" Type="int" Nullable="false" />
  </EntityType>
  <EntityType Name="BemsMonitoringPointWeatherForecasted">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="CreatedDateTime" />
      <PropertyRef Name="Category" />
      <PropertyRef Name="BaseDateTime" />
      <PropertyRef Name="ForecastedDateTime" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="CreatedDateTime" Type="datetime" Nullable="false" />
    <Property Name="Category" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="BaseDateTime" Type="datetime" Nullable="false" />
    <Property Name="ForecastedDateTime" Type="datetime" Nullable="false" />
    <Property Name="ForecastedValue" Type="float" Nullable="false" />
    <Property Name="nx" Type="int" Nullable="false" />
    <Property Name="ny" Type="int" Nullable="false" />
  </EntityType>
  <EntityType Name="BemsNoticePriceBase">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="FuelTypeId" />
      <PropertyRef Name="ApplyDate" />
      <PropertyRef Name="ContractType" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="FuelTypeId" Type="smallint" Nullable="false" />
    <Property Name="ApplyDate" Type="date" Nullable="false" />
    <Property Name="ContractType" Type="smallint" Nullable="false" />
    <Property Name="PrimaryPrice" Type="int" />
    <Property Name="SecondaryPrice" Type="int" />
  </EntityType>
  <EntityType Name="BemsNoticePriceContractType">
    <Key>
      <PropertyRef Name="FuelTypeId" />
      <PropertyRef Name="ContractType" />
    </Key>
    <Property Name="FuelTypeId" Type="smallint" Nullable="false" />
    <Property Name="ContractType" Type="smallint" Nullable="false" />
    <Property Name="Name" Type="varchar" MaxLength="50" Nullable="false" />
  </EntityType>
  <EntityType Name="BemsNoticePriceDetail">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="FuelTypeId" />
      <PropertyRef Name="ApplyDate" />
      <PropertyRef Name="ContractType" />
      <PropertyRef Name="DataId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="FuelTypeId" Type="smallint" Nullable="false" />
    <Property Name="ApplyDate" Type="date" Nullable="false" />
    <Property Name="ContractType" Type="smallint" Nullable="false" />
    <Property Name="DataId" Type="smallint" Nullable="false" />
    <Property Name="P01" Type="float" />
    <Property Name="P02" Type="float" />
    <Property Name="P03" Type="float" />
    <Property Name="P04" Type="float" />
    <Property Name="P05" Type="float" />
    <Property Name="P06" Type="float" />
    <Property Name="P07" Type="float" />
    <Property Name="P08" Type="float" />
    <Property Name="P09" Type="float" />
    <Property Name="P10" Type="float" />
    <Property Name="P11" Type="float" />
    <Property Name="P12" Type="float" />
  </EntityType>
  <EntityType Name="BemsPeakFacility">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="MaxDateTime" />
      <PropertyRef Name="FacilityCode" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="MaxDateTime" Type="datetime" Nullable="false" />
    <Property Name="FacilityCode" Type="int" Nullable="false" />
  </EntityType>
  <EntityType Name="BemsPeakHistory">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="CreatedDateTime" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="CreatedDateTime" Type="datetime" Nullable="false" />
    <Property Name="CurrentValue" Type="float" Nullable="false" />
  </EntityType>
  <EntityType Name="BemsPeakHistoryDaily">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="CreatedDateTime" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="CreatedDateTime" Type="datetime" Nullable="false" />
    <Property Name="MaxPeakValue" Type="float" />
    <Property Name="MaxDateTime" Type="datetime" />
    <Property Name="MinPeakValue" Type="float" />
    <Property Name="MinDateTime" Type="datetime" />
  </EntityType>
  <EntityType Name="BemsPeakInfo">
    <Key>
      <PropertyRef Name="SiteId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="MaxDateTime" Type="datetime" Nullable="false" />
    <Property Name="MaxPeakValue" Type="float" Nullable="false" />
    <Property Name="MinDateTime" Type="datetime" Nullable="false" />
    <Property Name="MinPeakValue" Type="float" Nullable="false" />
    <Property Name="todayMaxPeakValue" Type="float" Nullable="false" />
    <Property Name="todayMinPeakValue" Type="float" Nullable="false" />
  </EntityType>
  <EntityType Name="BemsPeopleIncrease">
    <Key>
      <PropertyRef Name="Date" />
      <PropertyRef Name="SiteId" />
    </Key>
    <Property Name="Date" Type="nvarchar" MaxLength="5" Nullable="false" />
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="m1" Type="nvarchar" MaxLength="50" />
    <Property Name="m2" Type="nvarchar" MaxLength="50" />
    <Property Name="m3" Type="nvarchar" MaxLength="50" />
    <Property Name="m4" Type="nvarchar" MaxLength="50" />
    <Property Name="m5" Type="nvarchar" MaxLength="50" />
    <Property Name="m6" Type="nvarchar" MaxLength="50" />
    <Property Name="m7" Type="nvarchar" MaxLength="50" />
    <Property Name="m8" Type="nvarchar" MaxLength="50" />
    <Property Name="m9" Type="nvarchar" MaxLength="50" />
    <Property Name="m10" Type="nvarchar" MaxLength="50" />
    <Property Name="m11" Type="nvarchar" MaxLength="50" />
    <Property Name="m12" Type="nvarchar" MaxLength="50" />
  </EntityType>
  <EntityType Name="BemsPriceCode">
    <Key>
      <PropertyRef Name="PriceCode" />
    </Key>
    <Property Name="PriceCode" Type="varchar" MaxLength="20" Nullable="false" />
    <Property Name="PriceCodeDesc" Type="varchar" MaxLength="200" />
    <Property Name="FuelTypeId" Type="smallint" Nullable="false" />
    <Property Name="Unit" Type="varchar" MaxLength="20" />
  </EntityType>
  <EntityType Name="BemsPriceFormula">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="PriceTypeId" />
      <PropertyRef Name="FacilityTypeId" />
      <PropertyRef Name="FormulaId" />
      <PropertyRef Name="FacilityCode" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="PriceTypeId" Type="int" Nullable="false" />
    <Property Name="FacilityTypeId" Type="int" Nullable="false" />
    <Property Name="FormulaId" Type="int" Nullable="false" />
    <Property Name="FacilityCode" Type="int" Nullable="false" />
    <Property Name="UseYN" Type="nvarchar" MaxLength="1" Nullable="false" />
  </EntityType>
  <EntityType Name="BemsPriceMeta">
    <Key>
      <PropertyRef Name="PriceTypeId" />
      <PropertyRef Name="PublishDate" />
    </Key>
    <Property Name="PriceTypeId" Type="int" Nullable="false" />
    <Property Name="PublishDate" Type="datetime" Nullable="false" />
    <Property Name="BasePrice" Type="int" />
    <Property Name="01_00" Type="float" />
    <Property Name="01_01" Type="float" />
    <Property Name="01_02" Type="float" />
    <Property Name="01_03" Type="float" />
    <Property Name="01_04" Type="float" />
    <Property Name="01_05" Type="float" />
    <Property Name="01_06" Type="float" />
    <Property Name="01_07" Type="float" />
    <Property Name="01_08" Type="float" />
    <Property Name="01_09" Type="float" />
    <Property Name="01_10" Type="float" />
    <Property Name="01_11" Type="float" />
    <Property Name="01_12" Type="float" />
    <Property Name="01_13" Type="float" />
    <Property Name="01_14" Type="float" />
    <Property Name="01_15" Type="float" />
    <Property Name="01_16" Type="float" />
    <Property Name="01_17" Type="float" />
    <Property Name="01_18" Type="float" />
    <Property Name="01_19" Type="float" />
    <Property Name="01_20" Type="float" />
    <Property Name="01_21" Type="float" />
    <Property Name="01_22" Type="float" />
    <Property Name="01_23" Type="float" />
    <Property Name="02_00" Type="float" />
    <Property Name="02_01" Type="float" />
    <Property Name="02_02" Type="float" />
    <Property Name="02_03" Type="float" />
    <Property Name="02_04" Type="float" />
    <Property Name="02_05" Type="float" />
    <Property Name="02_06" Type="float" />
    <Property Name="02_07" Type="float" />
    <Property Name="02_08" Type="float" />
    <Property Name="02_09" Type="float" />
    <Property Name="02_10" Type="float" />
    <Property Name="02_11" Type="float" />
    <Property Name="02_12" Type="float" />
    <Property Name="02_13" Type="float" />
    <Property Name="02_14" Type="float" />
    <Property Name="02_15" Type="float" />
    <Property Name="02_16" Type="float" />
    <Property Name="02_17" Type="float" />
    <Property Name="02_18" Type="float" />
    <Property Name="02_19" Type="float" />
    <Property Name="02_20" Type="float" />
    <Property Name="02_21" Type="float" />
    <Property Name="02_22" Type="float" />
    <Property Name="02_23" Type="float" />
    <Property Name="03_00" Type="float" />
    <Property Name="03_01" Type="float" />
    <Property Name="03_02" Type="float" />
    <Property Name="03_03" Type="float" />
    <Property Name="03_04" Type="float" />
    <Property Name="03_05" Type="float" />
    <Property Name="03_06" Type="float" />
    <Property Name="03_07" Type="float" />
    <Property Name="03_08" Type="float" />
    <Property Name="03_09" Type="float" />
    <Property Name="03_10" Type="float" />
    <Property Name="03_11" Type="float" />
    <Property Name="03_12" Type="float" />
    <Property Name="03_13" Type="float" />
    <Property Name="03_14" Type="float" />
    <Property Name="03_15" Type="float" />
    <Property Name="03_16" Type="float" />
    <Property Name="03_17" Type="float" />
    <Property Name="03_18" Type="float" />
    <Property Name="03_19" Type="float" />
    <Property Name="03_20" Type="float" />
    <Property Name="03_21" Type="float" />
    <Property Name="03_22" Type="float" />
    <Property Name="03_23" Type="float" />
    <Property Name="04_00" Type="float" />
    <Property Name="04_01" Type="float" />
    <Property Name="04_02" Type="float" />
    <Property Name="04_03" Type="float" />
    <Property Name="04_04" Type="float" />
    <Property Name="04_05" Type="float" />
    <Property Name="04_06" Type="float" />
    <Property Name="04_07" Type="float" />
    <Property Name="04_08" Type="float" />
    <Property Name="04_09" Type="float" />
    <Property Name="04_10" Type="float" />
    <Property Name="04_11" Type="float" />
    <Property Name="04_12" Type="float" />
    <Property Name="04_13" Type="float" />
    <Property Name="04_14" Type="float" />
    <Property Name="04_15" Type="float" />
    <Property Name="04_16" Type="float" />
    <Property Name="04_17" Type="float" />
    <Property Name="04_18" Type="float" />
    <Property Name="04_19" Type="float" />
    <Property Name="04_20" Type="float" />
    <Property Name="04_21" Type="float" />
    <Property Name="04_22" Type="float" />
    <Property Name="04_23" Type="float" />
    <Property Name="05_00" Type="float" />
    <Property Name="05_01" Type="float" />
    <Property Name="05_02" Type="float" />
    <Property Name="05_03" Type="float" />
    <Property Name="05_04" Type="float" />
    <Property Name="05_05" Type="float" />
    <Property Name="05_06" Type="float" />
    <Property Name="05_07" Type="float" />
    <Property Name="05_08" Type="float" />
    <Property Name="05_09" Type="float" />
    <Property Name="05_10" Type="float" />
    <Property Name="05_11" Type="float" />
    <Property Name="05_12" Type="float" />
    <Property Name="05_13" Type="float" />
    <Property Name="05_14" Type="float" />
    <Property Name="05_15" Type="float" />
    <Property Name="05_16" Type="float" />
    <Property Name="05_17" Type="float" />
    <Property Name="05_18" Type="float" />
    <Property Name="05_19" Type="float" />
    <Property Name="05_20" Type="float" />
    <Property Name="05_21" Type="float" />
    <Property Name="05_22" Type="float" />
    <Property Name="05_23" Type="float" />
    <Property Name="06_00" Type="float" />
    <Property Name="06_01" Type="float" />
    <Property Name="06_02" Type="float" />
    <Property Name="06_03" Type="float" />
    <Property Name="06_04" Type="float" />
    <Property Name="06_05" Type="float" />
    <Property Name="06_06" Type="float" />
    <Property Name="06_07" Type="float" />
    <Property Name="06_08" Type="float" />
    <Property Name="06_09" Type="float" />
    <Property Name="06_10" Type="float" />
    <Property Name="06_11" Type="float" />
    <Property Name="06_12" Type="float" />
    <Property Name="06_13" Type="float" />
    <Property Name="06_14" Type="float" />
    <Property Name="06_15" Type="float" />
    <Property Name="06_16" Type="float" />
    <Property Name="06_17" Type="float" />
    <Property Name="06_18" Type="float" />
    <Property Name="06_19" Type="float" />
    <Property Name="06_20" Type="float" />
    <Property Name="06_21" Type="float" />
    <Property Name="06_22" Type="float" />
    <Property Name="06_23" Type="float" />
    <Property Name="07_00" Type="float" />
    <Property Name="07_01" Type="float" />
    <Property Name="07_02" Type="float" />
    <Property Name="07_03" Type="float" />
    <Property Name="07_04" Type="float" />
    <Property Name="07_05" Type="float" />
    <Property Name="07_06" Type="float" />
    <Property Name="07_07" Type="float" />
    <Property Name="07_08" Type="float" />
    <Property Name="07_09" Type="float" />
    <Property Name="07_10" Type="float" />
    <Property Name="07_11" Type="float" />
    <Property Name="07_12" Type="float" />
    <Property Name="07_13" Type="float" />
    <Property Name="07_14" Type="float" />
    <Property Name="07_15" Type="float" />
    <Property Name="07_16" Type="float" />
    <Property Name="07_17" Type="float" />
    <Property Name="07_18" Type="float" />
    <Property Name="07_19" Type="float" />
    <Property Name="07_20" Type="float" />
    <Property Name="07_21" Type="float" />
    <Property Name="07_22" Type="float" />
    <Property Name="07_23" Type="float" />
    <Property Name="08_00" Type="float" />
    <Property Name="08_01" Type="float" />
    <Property Name="08_02" Type="float" />
    <Property Name="08_03" Type="float" />
    <Property Name="08_04" Type="float" />
    <Property Name="08_05" Type="float" />
    <Property Name="08_06" Type="float" />
    <Property Name="08_07" Type="float" />
    <Property Name="08_08" Type="float" />
    <Property Name="08_09" Type="float" />
    <Property Name="08_10" Type="float" />
    <Property Name="08_11" Type="float" />
    <Property Name="08_12" Type="float" />
    <Property Name="08_13" Type="float" />
    <Property Name="08_14" Type="float" />
    <Property Name="08_15" Type="float" />
    <Property Name="08_16" Type="float" />
    <Property Name="08_17" Type="float" />
    <Property Name="08_18" Type="float" />
    <Property Name="08_19" Type="float" />
    <Property Name="08_20" Type="float" />
    <Property Name="08_21" Type="float" />
    <Property Name="08_22" Type="float" />
    <Property Name="08_23" Type="float" />
    <Property Name="09_00" Type="float" />
    <Property Name="09_01" Type="float" />
    <Property Name="09_02" Type="float" />
    <Property Name="09_03" Type="float" />
    <Property Name="09_04" Type="float" />
    <Property Name="09_05" Type="float" />
    <Property Name="09_06" Type="float" />
    <Property Name="09_07" Type="float" />
    <Property Name="09_08" Type="float" />
    <Property Name="09_09" Type="float" />
    <Property Name="09_10" Type="float" />
    <Property Name="09_11" Type="float" />
    <Property Name="09_12" Type="float" />
    <Property Name="09_13" Type="float" />
    <Property Name="09_14" Type="float" />
    <Property Name="09_15" Type="float" />
    <Property Name="09_16" Type="float" />
    <Property Name="09_17" Type="float" />
    <Property Name="09_18" Type="float" />
    <Property Name="09_19" Type="float" />
    <Property Name="09_20" Type="float" />
    <Property Name="09_21" Type="float" />
    <Property Name="09_22" Type="float" />
    <Property Name="09_23" Type="float" />
    <Property Name="10_00" Type="float" />
    <Property Name="10_01" Type="float" />
    <Property Name="10_02" Type="float" />
    <Property Name="10_03" Type="float" />
    <Property Name="10_04" Type="float" />
    <Property Name="10_05" Type="float" />
    <Property Name="10_06" Type="float" />
    <Property Name="10_07" Type="float" />
    <Property Name="10_08" Type="float" />
    <Property Name="10_09" Type="float" />
    <Property Name="10_10" Type="float" />
    <Property Name="10_11" Type="float" />
    <Property Name="10_12" Type="float" />
    <Property Name="10_13" Type="float" />
    <Property Name="10_14" Type="float" />
    <Property Name="10_15" Type="float" />
    <Property Name="10_16" Type="float" />
    <Property Name="10_17" Type="float" />
    <Property Name="10_18" Type="float" />
    <Property Name="10_19" Type="float" />
    <Property Name="10_20" Type="float" />
    <Property Name="10_21" Type="float" />
    <Property Name="10_22" Type="float" />
    <Property Name="10_23" Type="float" />
    <Property Name="11_00" Type="float" />
    <Property Name="11_01" Type="float" />
    <Property Name="11_02" Type="float" />
    <Property Name="11_03" Type="float" />
    <Property Name="11_04" Type="float" />
    <Property Name="11_05" Type="float" />
    <Property Name="11_06" Type="float" />
    <Property Name="11_07" Type="float" />
    <Property Name="11_08" Type="float" />
    <Property Name="11_09" Type="float" />
    <Property Name="11_10" Type="float" />
    <Property Name="11_11" Type="float" />
    <Property Name="11_12" Type="float" />
    <Property Name="11_13" Type="float" />
    <Property Name="11_14" Type="float" />
    <Property Name="11_15" Type="float" />
    <Property Name="11_16" Type="float" />
    <Property Name="11_17" Type="float" />
    <Property Name="11_18" Type="float" />
    <Property Name="11_19" Type="float" />
    <Property Name="11_20" Type="float" />
    <Property Name="11_21" Type="float" />
    <Property Name="11_22" Type="float" />
    <Property Name="11_23" Type="float" />
    <Property Name="12_00" Type="float" />
    <Property Name="12_01" Type="float" />
    <Property Name="12_02" Type="float" />
    <Property Name="12_03" Type="float" />
    <Property Name="12_04" Type="float" />
    <Property Name="12_05" Type="float" />
    <Property Name="12_06" Type="float" />
    <Property Name="12_07" Type="float" />
    <Property Name="12_08" Type="float" />
    <Property Name="12_09" Type="float" />
    <Property Name="12_10" Type="float" />
    <Property Name="12_11" Type="float" />
    <Property Name="12_12" Type="float" />
    <Property Name="12_13" Type="float" />
    <Property Name="12_14" Type="float" />
    <Property Name="12_15" Type="float" />
    <Property Name="12_16" Type="float" />
    <Property Name="12_17" Type="float" />
    <Property Name="12_18" Type="float" />
    <Property Name="12_19" Type="float" />
    <Property Name="12_20" Type="float" />
    <Property Name="12_21" Type="float" />
    <Property Name="12_22" Type="float" />
    <Property Name="12_23" Type="float" />
  </EntityType>
  <EntityType Name="BemsPriceType">
    <Key>
      <PropertyRef Name="PriceTypeId" />
    </Key>
    <Property Name="PriceTypeId" Type="int" Nullable="false" />
    <Property Name="PriceTypeIdDesc" Type="varchar" MaxLength="200" />
    <Property Name="FuelTypeId" Type="smallint" Nullable="false" />
  </EntityType>
  <EntityType Name="BemsRentalRate">
    <Key>
      <PropertyRef Name="Date" />
      <PropertyRef Name="SiteId" />
    </Key>
    <Property Name="Date" Type="nvarchar" MaxLength="5" Nullable="false" />
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="m1" Type="nvarchar" MaxLength="50" />
    <Property Name="m2" Type="nvarchar" MaxLength="50" />
    <Property Name="m3" Type="nvarchar" MaxLength="50" />
    <Property Name="m4" Type="nvarchar" MaxLength="50" />
    <Property Name="m5" Type="nvarchar" MaxLength="50" />
    <Property Name="m6" Type="nvarchar" MaxLength="50" />
    <Property Name="m7" Type="nvarchar" MaxLength="50" />
    <Property Name="m8" Type="nvarchar" MaxLength="50" />
    <Property Name="m9" Type="nvarchar" MaxLength="50" />
    <Property Name="m10" Type="nvarchar" MaxLength="50" />
    <Property Name="m11" Type="nvarchar" MaxLength="50" />
    <Property Name="m12" Type="nvarchar" MaxLength="50" />
  </EntityType>
  <EntityType Name="BemsReportFormat">
    <Key>
      <PropertyRef Name="ReportFormatId" />
      <PropertyRef Name="parts" />
    </Key>
    <Property Name="ReportFormatId" Type="int" Nullable="false" />
    <Property Name="FormatName" Type="varchar" MaxLength="50" Nullable="false" />
    <Property Name="Content" Type="varchar(max)" />
    <Property Name="parts" Type="int" Nullable="false" />
  </EntityType>
  <EntityType Name="BemsReportHistory">
    <Key>
      <PropertyRef Name="Seq" />
      <PropertyRef Name="DateTime" />
      <PropertyRef Name="ReportFormatId" />
      <PropertyRef Name="parts" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="Seq" Type="int" Nullable="false" />
    <Property Name="DateTime" Type="datetime" Nullable="false" />
    <Property Name="ReportName" Type="varchar" MaxLength="200" Nullable="false" />
    <Property Name="ReportFormatId" Type="int" Nullable="false" />
    <Property Name="FormatName" Type="varchar" MaxLength="50" Nullable="false" />
    <Property Name="Content" Type="varchar(max)" />
    <Property Name="Writer" Type="varchar" MaxLength="50" />
    <Property Name="Confirm1" Type="varchar" MaxLength="50" />
    <Property Name="Confirm2" Type="varchar" MaxLength="50" />
    <Property Name="parts" Type="int" Nullable="false" />
    <Property Name="FileName" Type="nvarchar" MaxLength="100" />
  </EntityType>
  <EntityType Name="BemsServiceType">
    <Key>
      <PropertyRef Name="ServiceTypeId" />
    </Key>
    <Property Name="ServiceTypeId" Type="smallint" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="48" />
  </EntityType>
  <EntityType Name="BemsSitePrice">
    <Key>
      <PropertyRef Name="SiteID" />
      <PropertyRef Name="FuelTypeId" />
      <PropertyRef Name="PriceTypeId" />
      <PropertyRef Name="PriceCode" />
    </Key>
    <Property Name="SiteID" Type="int" Nullable="false" />
    <Property Name="FuelTypeId" Type="smallint" Nullable="false" />
    <Property Name="PriceTypeId" Type="int" Nullable="false" />
    <Property Name="PriceCode" Type="varchar" MaxLength="20" Nullable="false" />
    <Property Name="UseYN" Type="varchar" MaxLength="1" Nullable="false" />
  </EntityType>
  <EntityType Name="BemsSitePriceHistory">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="FuelTypeId" />
      <PropertyRef Name="PriceTypeId" />
      <PropertyRef Name="PriceCode" />
      <PropertyRef Name="PayDate" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="FuelTypeId" Type="smallint" Nullable="false" />
    <Property Name="PriceTypeId" Type="int" Nullable="false" />
    <Property Name="PriceCode" Type="varchar" MaxLength="20" Nullable="false" />
    <Property Name="PriceValue" Type="varchar" MaxLength="200" />
    <Property Name="PayDate" Type="varchar" MaxLength="6" Nullable="false" />
    <Property Name="StartDate" Type="datetime" />
    <Property Name="EndDate" Type="datetime" />
    <Property Name="PayCharge" Type="varchar" MaxLength="200" />
  </EntityType>
  <EntityType Name="CmAlarmAdmin">
    <Key>
      <PropertyRef Name="SiteId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="UserCode" Type="nvarchar" MaxLength="50" />
    <Property Name="DeptCode" Type="nvarchar" MaxLength="50" />
    <Property Name="PhoneNo" Type="nvarchar" MaxLength="50" />
    <Property Name="EmailAddress" Type="nvarchar" MaxLength="50" />
    <Property Name="EmailPassword" Type="nvarchar" MaxLength="50" />
  </EntityType>
  <EntityType Name="CmAnnouncement">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="AnnouncementId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="AnnouncementId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="BusinessFieldId" Type="int" Nullable="false" />
    <Property Name="Title" Type="nvarchar" MaxLength="128" Nullable="false" />
    <Property Name="Contents" Type="nvarchar" MaxLength="1024" Nullable="false" />
    <Property Name="RegisterUserId" Type="nvarchar" MaxLength="24" Nullable="false" />
    <Property Name="FileId" Type="int" />
    <Property Name="AddDate" Type="datetime" Nullable="false" />
    <Property Name="UpdateDate" Type="datetime" Nullable="false" />
    <Property Name="IsUse" Type="bit" />
    <Property Name="ReadCount" Type="int" Nullable="false" />
  </EntityType>
  <EntityType Name="CmBuilding">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="BuildingId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="BuildingId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="FileId" Type="int" />
    <Property Name="IsUse" Type="bit" />
    <Property Name="SortOrderNo" Type="int" />
  </EntityType>
  <EntityType Name="CmBusinessField">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="BusinessFieldId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="BusinessFieldId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="IsUse" Type="bit" />
  </EntityType>
  <EntityType Name="CmCompany">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="CompanyId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="CompanyId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="CompanyTypeId" Type="int" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="PhoneNo" Type="nvarchar" MaxLength="20" Nullable="false" />
    <Property Name="FaxNo" Type="nvarchar" MaxLength="20" />
    <Property Name="RepresentativeName" Type="nvarchar" MaxLength="20" Nullable="false" />
    <Property Name="SalesName" Type="nvarchar" MaxLength="20" />
    <Property Name="SalesPhoneNo" Type="nvarchar" MaxLength="20" />
    <Property Name="AddressZip1" Type="nchar" MaxLength="5" />
    <Property Name="AddressZip2" Type="nchar" MaxLength="3" />
    <Property Name="Address1" Type="nvarchar" MaxLength="50" />
    <Property Name="Adderss2" Type="nvarchar" MaxLength="100" />
    <Property Name="Homepage" Type="nvarchar" MaxLength="100" />
    <Property Name="Comment" Type="nvarchar" MaxLength="1024" />
    <Property Name="IsUse" Type="bit" />
  </EntityType>
  <EntityType Name="CmCompanyType">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="CompanyTypeId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="CompanyTypeId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="IsUse" Type="bit" />
  </EntityType>
  <EntityType Name="CmDepartment">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="CompanyId" />
      <PropertyRef Name="DepartmentId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="CompanyId" Type="int" Nullable="false" />
    <Property Name="DepartmentId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="ShortName" Type="nvarchar" MaxLength="50" />
    <Property Name="FaxNo" Type="nvarchar" MaxLength="50" />
    <Property Name="PhoneNo" Type="nvarchar" MaxLength="50" />
    <Property Name="Comment" Type="nvarchar" MaxLength="1024" />
    <Property Name="IsUse" Type="bit" />
  </EntityType>
  <EntityType Name="CmFacility">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="FacilityCode" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="FacilityTypeId" Type="int" Nullable="false" />
    <Property Name="FacilityCode" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="FirstClassId" Type="int" />
    <Property Name="SecondClassId" Type="int" />
    <Property Name="ThirdClassId" Type="int" />
    <Property Name="DeviceType" Type="nvarchar" MaxLength="48" />
    <Property Name="ParentFacilityCode" Type="int" />
    <Property Name="Name" Type="nvarchar" MaxLength="80" Nullable="false" />
    <Property Name="Nickname" Type="nvarchar" MaxLength="40" />
    <Property Name="Rfid" Type="nvarchar" MaxLength="52" />
    <Property Name="Manufacturer" Type="nvarchar" MaxLength="40" />
    <Property Name="ManufactureDate" Type="date" />
    <Property Name="ManufactureSerial" Type="nvarchar" MaxLength="20" />
    <Property Name="ManufactureModel" Type="nvarchar" MaxLength="40" />
    <Property Name="Supplier" Type="nvarchar" MaxLength="40" />
    <Property Name="SupplierPhoneNo" Type="nvarchar" MaxLength="20" />
    <Property Name="BuildingId" Type="int" />
    <Property Name="FloorId" Type="int" />
    <Property Name="ZoneId" Type="int" />
    <Property Name="InstallDate" Type="date" />
    <Property Name="OperationStartDate" Type="date" />
    <Property Name="FacilityCapacity" Type="nvarchar" MaxLength="40" />
    <Property Name="FacilityCost" Type="int" />
    <Property Name="FacilityCount" Type="int" />
    <Property Name="FacilitySeviceLifeYear" Type="int" />
    <Property Name="FacilityUsage" Type="nvarchar" MaxLength="80" />
    <Property Name="RatedPowerConsumption" Type="nvarchar" MaxLength="40" />
    <Property Name="RatedCOP" Type="float" />
    <Property Name="MainContactorUserId" Type="nvarchar" MaxLength="24" />
    <Property Name="SubContactorUserId" Type="nvarchar" MaxLength="24" />
    <Property Name="Note" Type="nvarchar" MaxLength="1024" />
    <Property Name="Reserved1" Type="nvarchar" MaxLength="64" />
    <Property Name="Reserved2" Type="nvarchar" MaxLength="64" />
    <Property Name="IsUse" Type="bit" />
    <Property Name="FileId" Type="int" />
    <Property Name="IsVirtualFacility" Type="bit" Nullable="false" />
    <Property Name="FuelTypeId" Type="smallint" />
    <Property Name="ContractType" Type="smallint" />
  </EntityType>
  <EntityType Name="CmFacilityFile">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="FileId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="FileId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="FacilityCode" Type="int" Nullable="false" />
    <Property Name="InsertedDate" Type="datetime" />
    <Property Name="InsertedUserId" Type="nvarchar" MaxLength="24" />
    <Property Name="UpdatedDate" Type="datetime" />
    <Property Name="UpdatedUserId" Type="nvarchar" MaxLength="24" />
  </EntityType>
  <EntityType Name="CmFacilityTempSet">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="FacilityCode" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="FacilityCode" Type="int" Nullable="false" />
    <Property Name="T1" Type="float" Nullable="false" />
    <Property Name="T2" Type="float" Nullable="false" />
    <Property Name="T3" Type="float" Nullable="false" />
    <Property Name="T4" Type="float" Nullable="false" />
    <Property Name="T5" Type="float" Nullable="false" />
    <Property Name="T6" Type="float" Nullable="false" />
    <Property Name="T7" Type="float" Nullable="false" />
    <Property Name="T8" Type="float" Nullable="false" />
    <Property Name="T9" Type="float" Nullable="false" />
    <Property Name="T10" Type="float" Nullable="false" />
    <Property Name="T11" Type="float" Nullable="false" />
    <Property Name="T12" Type="float" Nullable="false" />
  </EntityType>
  <EntityType Name="CmFile">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="FileId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="FileId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="FileCategoryId" Type="int" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="256" Nullable="false" />
    <Property Name="FileSize" Type="int" />
    <Property Name="CreatedDate" Type="datetime" />
    <Property Name="ContentType" Type="nvarchar" MaxLength="128" />
  </EntityType>
  <EntityType Name="CmFileCategory">
    <Key>
      <PropertyRef Name="FileCategoryId" />
    </Key>
    <Property Name="FileCategoryId" Type="int" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="32" Nullable="false" />
  </EntityType>
  <EntityType Name="CmFloor">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="BuildingId" />
      <PropertyRef Name="FloorId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="BuildingId" Type="int" Nullable="false" />
    <Property Name="FloorId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="50" Nullable="false" />
  </EntityType>
  <EntityType Name="CmHoliday">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="HolidayMonth" />
      <PropertyRef Name="HolidayDay" />
      <PropertyRef Name="IsLunar" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="HolidayMonth" Type="smallint" Nullable="false" />
    <Property Name="HolidayDay" Type="smallint" Nullable="false" />
    <Property Name="IsLunar" Type="bit" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="16" Nullable="false" />
    <Property Name="IsUse" Type="bit" />
  </EntityType>
  <EntityType Name="CmHolidayCustom">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="HolidayDate" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="HolidayDate" Type="datetime" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="16" Nullable="false" />
    <Property Name="IsUse" Type="bit" />
  </EntityType>
  <EntityType Name="CmHolidayWeekend">
    <Key>
      <PropertyRef Name="SiteId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="Saturday" Type="bit" Nullable="false" />
    <Property Name="Sunday" Type="bit" Nullable="false" />
    <Property Name="IsUse" Type="bit" />
  </EntityType>
  <EntityType Name="CmMenu">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="MenuId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="MenuId" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="Used" Type="bit" />
    <Property Name="MenuPath" Type="nvarchar" MaxLength="255" />
    <Property Name="Name" Type="nvarchar" MaxLength="50" />
  </EntityType>
  <EntityType Name="CmPartner">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="PartnerId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="PartnerId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="PartnerTypeId" Type="int" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="RegistrationNo" Type="nvarchar" MaxLength="24" />
    <Property Name="RepresentativeName" Type="nvarchar" MaxLength="20" />
    <Property Name="PhoneNo" Type="nvarchar" MaxLength="20" />
    <Property Name="FaxNo" Type="nvarchar" MaxLength="20" />
    <Property Name="SalesName" Type="nvarchar" MaxLength="20" />
    <Property Name="SalesPhoneNo" Type="nvarchar" MaxLength="20" />
    <Property Name="AddressZip1" Type="nchar" MaxLength="3" />
    <Property Name="AddressZip2" Type="nchar" MaxLength="3" />
    <Property Name="Address1" Type="nvarchar" MaxLength="50" />
    <Property Name="Adderss2" Type="nvarchar" MaxLength="100" />
    <Property Name="HomepageUri" Type="nvarchar" MaxLength="100" />
    <Property Name="Note" Type="nvarchar" MaxLength="1024" />
    <Property Name="IsUse" Type="bit" />
  </EntityType>
  <EntityType Name="CmPartnerType">
    <Key>
      <PropertyRef Name="PartnerTypeId" />
    </Key>
    <Property Name="PartnerTypeId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="IsUse" Type="bit" />
  </EntityType>
  <EntityType Name="CmPatrolCourse">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="PatrolCourseId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="PatrolCourseId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="48" Nullable="false" />
  </EntityType>
  <EntityType Name="CmPatrolCoursePos">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="PatrolCourseId" />
      <PropertyRef Name="BuildingId" />
      <PropertyRef Name="FloorId" />
      <PropertyRef Name="PosId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="PatrolCourseId" Type="int" Nullable="false" />
    <Property Name="BuildingId" Type="int" Nullable="false" />
    <Property Name="FloorId" Type="int" Nullable="false" />
    <Property Name="PosId" Type="int" Nullable="false" />
    <Property Name="CourseOrder" Type="int" Nullable="false" />
  </EntityType>
  <EntityType Name="CmPatrolGroup">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="PatrolGroupId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="PatrolGroupId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="48" Nullable="false" />
  </EntityType>
  <EntityType Name="CmPatrolGroupUser">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="PatrolGroupId" />
      <PropertyRef Name="UserId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="PatrolGroupId" Type="int" Nullable="false" />
    <Property Name="UserId" Type="nvarchar" MaxLength="24" Nullable="false" />
  </EntityType>
  <EntityType Name="CmPatrolHistory">
    <Key>
      <PropertyRef Name="PatrolHistoryId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="PatrolHistoryId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="ScheduleId" Type="int" Nullable="false" />
    <Property Name="startDate" Type="datetime" Nullable="false" />
    <Property Name="endDate" Type="datetime" />
    <Property Name="resultTypeId" Type="int" Nullable="false" />
    <Property Name="resultDesc" Type="varchar" MaxLength="1024" />
    <Property Name="resultPosCnt" Type="int" />
    <Property Name="resultNormalCnt" Type="int" />
    <Property Name="resultAbnormalCnt" Type="int" />
  </EntityType>
  <EntityType Name="CmPatrolHistoryPos">
    <Key>
      <PropertyRef Name="mId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="PatrolHistoryId" Type="int" Nullable="false" />
    <Property Name="PosId" Type="int" Nullable="false" />
    <Property Name="PatrolTime" Type="datetime" Nullable="false" />
    <Property Name="term" Type="int" />
    <Property Name="resultType" Type="int" Nullable="false" />
    <Property Name="mId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  </EntityType>
  <EntityType Name="CmPatrolPlan">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="PatrolPlanId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="PatrolPlanId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="GroupId" Type="int" Nullable="false" />
    <Property Name="CourseId" Type="int" Nullable="false" />
    <Property Name="Name" Type="varchar" MaxLength="48" Nullable="false" />
    <Property Name="PlanDesc" Type="varchar" MaxLength="1024" />
    <Property Name="term" Type="int" Nullable="false" />
    <Property Name="inDate" Type="datetime" />
  </EntityType>
  <EntityType Name="CmPatrolPos">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="PosId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="BuildingId" Type="int" Nullable="false" />
    <Property Name="FloorId" Type="int" Nullable="false" />
    <Property Name="PosId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="TagId" Type="nvarchar" MaxLength="32" />
    <Property Name="PosDesc" Type="nvarchar" MaxLength="1024" />
  </EntityType>
  <EntityType Name="CmPatrolSchedule">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="ScheduleId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="ScheduleId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="PlanId" Type="int" Nullable="false" />
    <Property Name="Name" Type="varchar" MaxLength="48" Nullable="false" />
    <Property Name="ScheduleDesc" Type="varchar" MaxLength="128" />
    <Property Name="inDate" Type="datetime" />
    <Property Name="patrolDateTime" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="CmPatrolType">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="PatrolTypeId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="PatrolTypeId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="IsUse" Type="bit" />
  </EntityType>
  <EntityType Name="CmPosition">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="PositionId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="PositionId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="40" Nullable="false" />
    <Property Name="IsUse" Type="bit" />
  </EntityType>
  <EntityType Name="CmServiceEnergyCalcDay">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="calDate" />
      <PropertyRef Name="ServiceTypeId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="calDate" Type="datetime" Nullable="false" />
    <Property Name="ServiceTypeId" Type="smallint" Nullable="false" />
    <Property Name="Value" Type="float" />
  </EntityType>
  <EntityType Name="CmServiceEnergyCalcMonth">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="calDate" />
      <PropertyRef Name="ServiceTypeId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="calDate" Type="datetime" Nullable="false" />
    <Property Name="ServiceTypeId" Type="smallint" Nullable="false" />
    <Property Name="Value" Type="float" />
  </EntityType>
  <EntityType Name="CmSite">
    <Key>
      <PropertyRef Name="SiteId" />
    </Key>
    <Property Name="SiteId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="AddressZip1" Type="nchar" MaxLength="5" />
    <Property Name="AddressZip2" Type="nchar" MaxLength="3" />
    <Property Name="Address1" Type="nvarchar" MaxLength="100" />
    <Property Name="Adderss2" Type="nvarchar" MaxLength="100" />
    <Property Name="PhoneNo" Type="nvarchar" MaxLength="24" />
    <Property Name="URL" Type="nvarchar" MaxLength="100" />
    <Property Name="Comment" Type="nvarchar" MaxLength="1024" />
    <Property Name="IsUse" Type="bit" />
    <Property Name="SortOrderNo" Type="int" />
    <Property Name="InsertedDate" Type="datetime" />
    <Property Name="InsertedUserId" Type="nvarchar" MaxLength="24" />
    <Property Name="UpdatedDate" Type="datetime" />
    <Property Name="UpdatedUserId" Type="nvarchar" MaxLength="24" />
    <Property Name="IsControlSchedule" Type="bit" />
    <Property Name="ScheduleCheckHour" Type="int" />
    <Property Name="MaxPeak" Type="float" />
    <Property Name="lat" Type="float" />
    <Property Name="lng" Type="float" />
    <Property Name="controlSchedule" Type="bit" />
    <Property Name="HDD" Type="nvarchar" MaxLength="24" />
    <Property Name="CDD" Type="nvarchar" MaxLength="24" />
    <Property Name="BuildingSize" Type="nvarchar" MaxLength="50" />
    <Property Name="GrossArea" Type="nvarchar" MaxLength="24" />
    <Property Name="BuildingArea" Type="nvarchar" MaxLength="24" />
    <Property Name="FloorAreaRatio" Type="nvarchar" MaxLength="24" />
    <Property Name="BuildingCoverageRatio" Type="nvarchar" MaxLength="24" />
    <Property Name="MainUse" Type="nvarchar" MaxLength="10" />
    <Property Name="CompletionDate" Type="nvarchar" MaxLength="24" />
    <Property Name="Standard" Type="nvarchar" MaxLength="24" />
    <Property Name="MainUseIndex" Type="int" />
  </EntityType>
  <EntityType Name="CmUser">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="UserId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="UserId" Type="nvarchar" MaxLength="24" Nullable="false" />
    <Property Name="CompanyId" Type="int" />
    <Property Name="DepartmentId" Type="int" />
    <Property Name="PositionId" Type="int" />
    <Property Name="BusinessFieldId" Type="int" />
    <Property Name="UserGroupId" Type="int" />
    <Property Name="Name" Type="nvarchar" MaxLength="30" Nullable="false" />
    <Property Name="Passwd" Type="nvarchar" MaxLength="30" Nullable="false" />
    <Property Name="Birthday" Type="datetime" />
    <Property Name="Lunar" Type="bit" />
    <Property Name="StateId" Type="int" />
    <Property Name="EmploymentType" Type="int" />
    <Property Name="EmploymentStatus" Type="int" />
    <Property Name="OfficePhoneNo" Type="nvarchar" MaxLength="50" />
    <Property Name="HomePhoneNo" Type="nvarchar" MaxLength="50" />
    <Property Name="MobilePhoneNo" Type="nvarchar" MaxLength="50" />
    <Property Name="HomeZip1" Type="char" MaxLength="3" />
    <Property Name="HomeZip2" Type="char" MaxLength="3" />
    <Property Name="HomeAddress1" Type="nvarchar" MaxLength="50" />
    <Property Name="HomeAdderss2" Type="nvarchar" MaxLength="100" />
    <Property Name="Email" Type="nvarchar" MaxLength="50" />
    <Property Name="EnterDate" Type="datetime" />
    <Property Name="RetireDate" Type="datetime" />
    <Property Name="Comment" Type="nvarchar" MaxLength="1024" />
    <Property Name="Rfcsn" Type="nvarchar" MaxLength="30" />
    <Property Name="PasswordUpdatedDate" Type="datetime" />
    <Property Name="FileId" Type="int" />
    <Property Name="IsBems" Type="bit" />
    <Property Name="IsUse" Type="bit" />
    <Property Name="IsScheduleUser" Type="bit" />
    <Property Name="Certificated" Type="nvarchar" MaxLength="512" />
    <Property Name="IsSI" Type="bit" />
    <Property Name="IsMobile" Type="bit" />
    <Property Name="Devicetoken" Type="nvarchar" MaxLength="500" />
  </EntityType>
  <EntityType Name="CmUserGroup">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="UserGroupId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="UserGroupId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="32" Nullable="false" />
  </EntityType>
  <EntityType Name="CmUserGroupPermission">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="UserGroupId" />
      <PropertyRef Name="MenuId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="UserGroupId" Type="int" Nullable="false" />
    <Property Name="MenuId" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="MenuPermission" Type="smallint" />
  </EntityType>
  <EntityType Name="CmUserLoginHistory">
    <Key>
      <PropertyRef Name="LoginHistoryId" />
    </Key>
    <Property Name="LoginHistoryId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="UserId" Type="nvarchar" MaxLength="24" Nullable="false" />
    <Property Name="Type" Type="nvarchar" MaxLength="10" Nullable="false" />
    <Property Name="TraceTime" Type="datetime" Nullable="false" />
    <Property Name="IpAddress" Type="nvarchar" MaxLength="16" />
  </EntityType>
  <EntityType Name="CmUserToLicense">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="UserId" />
      <PropertyRef Name="LicenseId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="UserId" Type="nvarchar" MaxLength="24" Nullable="false" />
    <Property Name="LicenseId" Type="int" Nullable="false" />
  </EntityType>
  <EntityType Name="CmZone">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="BuildingId" />
      <PropertyRef Name="FloorId" />
      <PropertyRef Name="ZoneId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="BuildingId" Type="int" Nullable="false" />
    <Property Name="FloorId" Type="int" Nullable="false" />
    <Property Name="ZoneId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="Target_temperature" Type="float" />
    <Property Name="Target_humidity" Type="smallint" />
  </EntityType>
  <EntityType Name="CmZoneTempHumiSet">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="BuildingId" />
      <PropertyRef Name="FloorId" />
      <PropertyRef Name="ZoneId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="BuildingId" Type="int" Nullable="false" />
    <Property Name="FloorId" Type="int" Nullable="false" />
    <Property Name="ZoneId" Type="int" Nullable="false" />
    <Property Name="T1" Type="float" Nullable="false" />
    <Property Name="T2" Type="float" Nullable="false" />
    <Property Name="T3" Type="float" Nullable="false" />
    <Property Name="T4" Type="float" Nullable="false" />
    <Property Name="T5" Type="float" Nullable="false" />
    <Property Name="T6" Type="float" Nullable="false" />
    <Property Name="T7" Type="float" Nullable="false" />
    <Property Name="T8" Type="float" Nullable="false" />
    <Property Name="T9" Type="float" Nullable="false" />
    <Property Name="T10" Type="float" Nullable="false" />
    <Property Name="T11" Type="float" Nullable="false" />
    <Property Name="T12" Type="float" Nullable="false" />
    <Property Name="H1" Type="smallint" Nullable="false" />
    <Property Name="H2" Type="smallint" Nullable="false" />
    <Property Name="H3" Type="smallint" Nullable="false" />
    <Property Name="H4" Type="smallint" Nullable="false" />
    <Property Name="H5" Type="smallint" Nullable="false" />
    <Property Name="H6" Type="smallint" Nullable="false" />
    <Property Name="H7" Type="smallint" Nullable="false" />
    <Property Name="H8" Type="smallint" Nullable="false" />
    <Property Name="H9" Type="smallint" Nullable="false" />
    <Property Name="H10" Type="smallint" Nullable="false" />
    <Property Name="H11" Type="smallint" Nullable="false" />
    <Property Name="H12" Type="smallint" Nullable="false" />
  </EntityType>
  <EntityType Name="FmsAccident">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="AccidentId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="AccidentId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="256" Nullable="false" />
    <Property Name="StartDate" Type="datetime" />
    <Property Name="EndDate" Type="datetime" />
    <Property Name="AccidentTypeId" Type="int" Nullable="false" />
    <Property Name="DepartmentId" Type="int" />
    <Property Name="AccidentLocation" Type="nvarchar" MaxLength="256" />
    <Property Name="Reason" Type="nvarchar" MaxLength="1024" />
    <Property Name="Action" Type="nvarchar" MaxLength="1024" />
    <Property Name="Damage" Type="nvarchar" MaxLength="1024" />
    <Property Name="Measurement" Type="nvarchar" MaxLength="1024" />
    <Property Name="FileId1" Type="int" />
    <Property Name="FileId2" Type="int" />
    <Property Name="FileId3" Type="int" />
    <Property Name="CompanyId" Type="int" />
  </EntityType>
  <EntityType Name="FmsAccidentCodeType">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="AccidentTypeId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="AccidentTypeId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="24" Nullable="false" />
    <Property Name="IsUse" Type="bit" Nullable="false" />
  </EntityType>
  <EntityType Name="FmsBudget">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="Year" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="Year" Type="int" Nullable="false" />
  </EntityType>
  <EntityType Name="FmsBudgetCodeClass">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="BudgetClassId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="BudgetClassId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="BudgetSeq" Type="nvarchar" MaxLength="6" Nullable="false" />
    <Property Name="RootBudgetClassId" Type="int" />
    <Property Name="ParentBudgetClassId" Type="int" />
    <Property Name="Depth" Type="int" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="32" Nullable="false" />
    <Property Name="Abbreviation" Type="nvarchar" MaxLength="16" />
    <Property Name="IsUse" Type="bit" />
    <Property Name="YearlyBudget" Type="float" />
    <Property Name="MonthlyBudget" Type="float" />
  </EntityType>
  <EntityType Name="FmsBudgetDetail">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="Year" />
      <PropertyRef Name="BudgetClassId" />
      <PropertyRef Name="ParentBudgetClassId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="Year" Type="int" Nullable="false" />
    <Property Name="BudgetClassId" Type="int" Nullable="false" />
    <Property Name="BudgetSeq" Type="nvarchar" MaxLength="6" Nullable="false" />
    <Property Name="ParentBudgetClassId" Type="int" Nullable="false" />
    <Property Name="RootBudgetClassId" Type="int" />
    <Property Name="Depth" Type="int" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="32" Nullable="false" />
    <Property Name="Abbreviation" Type="nvarchar" MaxLength="16" />
    <Property Name="IsUse" Type="bit" />
    <Property Name="YearlyBudget" Type="float" Nullable="false" />
    <Property Name="MonthlyBudget" Type="float" Nullable="false" />
  </EntityType>
  <EntityType Name="FmsBudgetDetailExecution">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="Year" />
      <PropertyRef Name="BudgetClassId" />
      <PropertyRef Name="ParentBudgetClassId" />
      <PropertyRef Name="Month" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="Year" Type="int" Nullable="false" />
    <Property Name="BudgetClassId" Type="int" Nullable="false" />
    <Property Name="RootBudgetClassId" Type="int" />
    <Property Name="ParentBudgetClassId" Type="int" Nullable="false" />
    <Property Name="Month" Type="int" Nullable="false" />
    <Property Name="YearlyBudget" Type="float" Nullable="false" />
    <Property Name="MonthlyBudget" Type="float" Nullable="false" />
    <Property Name="YearlyExecution" Type="float" Nullable="false" />
    <Property Name="MonthlyExecution" Type="float" Nullable="false" />
  </EntityType>
  <EntityType Name="FmsCompanyEstimationCodeClass">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="CompanyEstimationClassId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="CompanyEstimationClassId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="32" Nullable="false" />
    <Property Name="IsUse" Type="bit" />
  </EntityType>
  <EntityType Name="FmsConstruction">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="ConstructionId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="ConstructionId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="256" Nullable="false" />
    <Property Name="ConstructionTypeId" Type="int" Nullable="false" />
    <Property Name="StartDate" Type="datetime" Nullable="false" />
    <Property Name="EndDate" Type="datetime" Nullable="false" />
    <Property Name="PartnerId" Type="int" Nullable="false" />
    <Property Name="ConstructLocation" Type="nvarchar" MaxLength="256" Nullable="false" />
    <Property Name="OwnerShipName" Type="nvarchar" MaxLength="24" Nullable="false" />
    <Property Name="CommitmentMan" Type="smallint" />
    <Property Name="OwnerShipPhoneNo" Type="nvarchar" MaxLength="20" Nullable="false" />
    <Property Name="WeldWorkStartTime" Type="datetime" />
    <Property Name="WeldWorkEndTime" Type="datetime" />
    <Property Name="GasWorkStartTime" Type="datetime" />
    <Property Name="GasWorkEndTime" Type="datetime" />
    <Property Name="PaintWorkStartTime" Type="datetime" />
    <Property Name="PaintWorkEndTime" Type="datetime" />
    <Property Name="Comment" Type="nvarchar" MaxLength="1024" />
    <Property Name="ProgressId" Type="smallint" Nullable="false" />
    <Property Name="AddDate" Type="datetime" Nullable="false" />
    <Property Name="UpdateDate" Type="datetime" Nullable="false" />
    <Property Name="ConstructionDetail" Type="nvarchar" MaxLength="1024" />
    <Property Name="InOutStockName" Type="nvarchar" MaxLength="1024" />
    <Property Name="FileId1" Type="int" />
    <Property Name="FileId2" Type="int" />
    <Property Name="FileId3" Type="int" />
  </EntityType>
  <EntityType Name="FmsConstructionCodeProgress">
    <Key>
      <PropertyRef Name="ProgressId" />
    </Key>
    <Property Name="ProgressId" Type="smallint" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="24" Nullable="false" />
    <Property Name="Description" Type="nvarchar" MaxLength="100" />
  </EntityType>
  <EntityType Name="FmsConstructionCodeType">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="ConstructionTypeId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="ConstructionTypeId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="24" Nullable="false" />
    <Property Name="IsUse" Type="bit" Nullable="false" />
  </EntityType>
  <EntityType Name="FmsConstructionEstimation">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="ConstructionId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="ConstructionId" Type="int" Nullable="false" />
    <Property Name="EstimateDate" Type="datetime" Nullable="false" />
    <Property Name="EstimateUserId" Type="nvarchar" MaxLength="24" Nullable="false" />
    <Property Name="Safety01_CleanUp" Type="bit" />
    <Property Name="Safety02_PersonalProtection" Type="bit" />
    <Property Name="Safety03_FireExtinguisher" Type="bit" />
    <Property Name="Safety04_HighPlaceWork" Type="bit" />
    <Property Name="Safety05_Weld" Type="bit" />
    <Property Name="Safety06_SurroundingCleanUp" Type="bit" />
    <Property Name="Safety07_SurroundingHealthy" Type="bit" />
    <Property Name="Safety08_Noise" Type="bit" />
    <Property Name="Safety09_FacilityProtection" Type="bit" />
    <Property Name="Safety10_Waste" Type="bit" />
    <Property Name="Safety11_Execution" Type="bit" />
    <Property Name="Safety12_Announcement" Type="bit" />
    <Property Name="Ability01_Compliance" Type="bit" />
    <Property Name="Ability02_Fault" Type="bit" />
    <Property Name="Ability03_SkillLevel" Type="bit" />
    <Property Name="Ability04_ProcessManagement" Type="bit" />
    <Property Name="Ability05_Collaboration" Type="bit" />
    <Property Name="Service01_Compliance" Type="bit" />
    <Property Name="Service02_SkillLevel" Type="bit" />
    <Property Name="Comment" Type="nvarchar" MaxLength="1024" />
    <Property Name="TotalEstimateScore" Type="float" />
    <Property Name="SafetyScore" Type="float" />
    <Property Name="AbilityScore" Type="float" />
    <Property Name="ServiceScore" Type="float" />
  </EntityType>
  <EntityType Name="FmsContract">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="ContractId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="ContractId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="256" Nullable="false" />
    <Property Name="PartnerTypeId" Type="int" />
    <Property Name="PartnerId" Type="int" />
    <Property Name="ContractDate" Type="datetime" />
    <Property Name="StartDate" Type="datetime" />
    <Property Name="EndDate" Type="datetime" />
    <Property Name="OwnerShipName" Type="nvarchar" MaxLength="24" />
    <Property Name="OwnerShipPhoneNo" Type="nvarchar" MaxLength="20" />
    <Property Name="CommitmentMan" Type="smallint" />
    <Property Name="Comment" Type="nvarchar" MaxLength="1024" />
    <Property Name="ContractClassId" Type="int" />
    <Property Name="ContractTypeId" Type="int" />
    <Property Name="ContractMethodId" Type="int" />
    <Property Name="PaymentTypeId" Type="int" />
  </EntityType>
  <EntityType Name="FmsContractClass">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="ContractClassId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="ContractClassId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="IsUse" Type="bit" />
  </EntityType>
  <EntityType Name="FmsContractMethod">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="ContractMethodId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="ContractMethodId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="IsUse" Type="bit" />
  </EntityType>
  <EntityType Name="FmsContractType">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="ContractTypeId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="ContractTypeId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="IsUse" Type="bit" />
  </EntityType>
  <EntityType Name="FmsDailyCheckReport">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="DailyCheckReportId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="DailyCheckReportId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="128" Nullable="false" />
    <Property Name="Contents" Type="nvarchar" MaxLength="1024" Nullable="false" />
    <Property Name="RegisterUserId" Type="nvarchar" MaxLength="24" Nullable="false" />
    <Property Name="AddDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="FmsDailyReport">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="AddDate" />
      <PropertyRef Name="BusinessFieldId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="DailyReportId" Type="int" />
    <Property Name="Name" Type="nvarchar" MaxLength="128" Nullable="false" />
    <Property Name="Contents" Type="nvarchar" MaxLength="1024" />
    <Property Name="RegisterUserId" Type="nvarchar" MaxLength="24" Nullable="false" />
    <Property Name="AddDate" Type="date" Nullable="false" />
    <Property Name="BusinessFieldId" Type="int" Nullable="false" />
    <Property Name="Datas" Type="varchar(max)" />
    <Property Name="ApproverUserId" Type="nvarchar" MaxLength="24" />
    <Property Name="ApproveDate" Type="date" />
    <Property Name="RegisterDate" Type="date" />
    <Property Name="ApproverUserId2" Type="nvarchar" MaxLength="24" />
    <Property Name="ApproveDate2" Type="date" />
    <Property Name="ApproverUserId3" Type="nvarchar" MaxLength="24" />
    <Property Name="ApproveDate3" Type="date" />
    <Property Name="ApproverUserId4" Type="nvarchar" MaxLength="24" />
    <Property Name="ApproveDate4" Type="date" />
    <Property Name="ApproverUserId5" Type="nvarchar" MaxLength="24" />
    <Property Name="ApproveDate5" Type="date" />
  </EntityType>
  <EntityType Name="FmsDrawing">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="DrawingId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="DrawingId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="DrawingNo" Type="nvarchar" MaxLength="20" Nullable="false" />
    <Property Name="DrawingGroupId" Type="int" Nullable="false" />
    <Property Name="DrawingTypeId" Type="int" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="200" Nullable="false" />
    <Property Name="Description" Type="nvarchar" MaxLength="2000" />
  </EntityType>
  <EntityType Name="FmsDrawingCodeGroup">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="DrawingGroupId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="DrawingGroupId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="IsUse" Type="bit" />
  </EntityType>
  <EntityType Name="FmsDrawingCodeType">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="DrawingTypeId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="DrawingTypeId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="IsUse" Type="bit" />
  </EntityType>
  <EntityType Name="FmsDrawingHistory">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="DrawingId" />
      <PropertyRef Name="HistoryId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="DrawingId" Type="int" Nullable="false" />
    <Property Name="HistoryId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="RevisionNo" Type="int" />
    <Property Name="FileId" Type="int" />
    <Property Name="Description" Type="nvarchar" MaxLength="2000" />
    <Property Name="UpdatedDate" Type="datetime" />
    <Property Name="UpdatedUserId" Type="nvarchar" MaxLength="24" />
  </EntityType>
  <EntityType Name="FmsEquipment">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="EquipmentId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="EquipmentId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="48" Nullable="false" />
    <Property Name="EquipmentTypeId" Type="int" Nullable="false" />
    <Property Name="WarehouseId" Type="int" />
    <Property Name="Unit" Type="nvarchar" MaxLength="12" />
    <Property Name="Standard" Type="nvarchar" MaxLength="20" />
    <Property Name="AddDate" Type="datetime" />
    <Property Name="UpdateDate" Type="datetime" />
    <Property Name="RegisterUserId" Type="nvarchar" MaxLength="24" Nullable="false" />
    <Property Name="SupplierName" Type="nvarchar" MaxLength="256" />
    <Property Name="SupplierPhoneNo" Type="nvarchar" MaxLength="20" />
    <Property Name="ImageFileId" Type="int" />
  </EntityType>
  <EntityType Name="FmsEquipmentCodeStateType">
    <Key>
      <PropertyRef Name="EquipmentStateTypeId" />
    </Key>
    <Property Name="EquipmentStateTypeId" Type="smallint" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="24" Nullable="false" />
    <Property Name="Comment" Type="nvarchar" MaxLength="1024" />
  </EntityType>
  <EntityType Name="FmsEquipmentCodeType">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="EquipmentTypeId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="EquipmentTypeId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="24" Nullable="false" />
    <Property Name="IsUse" Type="bit" Nullable="false" />
    <Property Name="Description" Type="nvarchar" MaxLength="255" />
  </EntityType>
  <EntityType Name="FmsEquipmentHistory">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="EquipmentHistoryId" />
      <PropertyRef Name="EquipmentId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="EquipmentHistoryId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="EquipmentId" Type="int" Nullable="false" />
    <Property Name="TotalStockCount" Type="int" />
    <Property Name="CurrentStockCount" Type="int" />
    <Property Name="RentCount" Type="int" />
    <Property Name="CurrentRentCount" Type="int" />
    <Property Name="ReturnCount" Type="int" />
    <Property Name="LossCount" Type="int" />
    <Property Name="StoredCount" Type="int" />
    <Property Name="EquipmentRentId" Type="int" />
    <Property Name="EquipmentStateTypeId" Type="smallint" />
    <Property Name="AddDate" Type="datetime" />
    <Property Name="UpdateDate" Type="datetime" />
    <Property Name="IsReturned" Type="bit" />
  </EntityType>
  <EntityType Name="FmsEquipmentRentInfo">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="EquipmentRentId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="EquipmentRentId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="RegisterUserId" Type="nvarchar" MaxLength="24" Nullable="false" />
    <Property Name="RentUserId" Type="nvarchar" MaxLength="24" />
    <Property Name="RegisterDate" Type="nchar" MaxLength="10" />
    <Property Name="RentDate" Type="datetime" />
    <Property Name="ReturnDueDate" Type="datetime" />
    <Property Name="ReturnFixDate" Type="datetime" />
    <Property Name="EquipmentStateTypeId" Type="smallint" />
    <Property Name="Comment" Type="nvarchar" MaxLength="1024" />
    <Property Name="Title" Type="nvarchar" MaxLength="128" Nullable="false" />
    <Property Name="RentUser" Type="nvarchar" MaxLength="128" />
  </EntityType>
  <EntityType Name="FmsFacilityCheckItem">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="FacilityCode" />
      <PropertyRef Name="CheckItemId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="FacilityCode" Type="int" Nullable="false" />
    <Property Name="CheckItemId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="WorkTypeId" Type="int" Nullable="false" />
    <Property Name="CycleUnitId" Type="int" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="100" Nullable="false" />
    <Property Name="IsYesNoResult" Type="bit" Nullable="false" />
    <Property Name="IsUse" Type="bit" />
  </EntityType>
  <EntityType Name="FmsFacilityCodeClass">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="FacilityClassId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="FacilityClassId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="ParentFacilityClassId" Type="int" />
    <Property Name="Depth" Type="int" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="80" Nullable="false" />
    <Property Name="Abbreviation" Type="nvarchar" MaxLength="40" />
    <Property Name="IsUse" Type="bit" />
  </EntityType>
  <EntityType Name="FmsFacilityManual">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="FacilityCode" />
      <PropertyRef Name="ManualId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="FacilityCode" Type="int" Nullable="false" />
    <Property Name="ManualId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="BusinessFieldId" Type="int" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="100" />
    <Property Name="Description" Type="nvarchar" MaxLength="1024" />
    <Property Name="Keyword" Type="nvarchar" MaxLength="100" />
    <Property Name="FileId" Type="int" />
    <Property Name="IsUse" Type="bit" />
  </EntityType>
  <EntityType Name="FmsFacilityOperationItem">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="ItemId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="FacilityCode" Type="int" Nullable="false" />
    <Property Name="ItemId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="100" />
    <Property Name="ResultUnit" Type="nvarchar" MaxLength="10" Nullable="false" />
    <Property Name="PointId" Type="nvarchar" MaxLength="50" />
    <Property Name="SystemId" Type="int" />
    <Property Name="EnergyCode" Type="bit" />
    <Property Name="IsUse" Type="bit" />
    <Property Name="SortOrderNo" Type="int" />
    <Property Name="InsertedDate" Type="datetime" />
    <Property Name="InsertedUserId" Type="nvarchar" MaxLength="24" />
    <Property Name="UpdatedDate" Type="datetime" />
    <Property Name="UpdatedUserId" Type="nvarchar" MaxLength="24" />
  </EntityType>
  <EntityType Name="FmsFacilityOperationReport">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="FacilityOperationReportId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="FacilityOperationReportId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="128" Nullable="false" />
    <Property Name="Contents" Type="nvarchar" MaxLength="1024" Nullable="false" />
    <Property Name="RegisterUserId" Type="nvarchar" MaxLength="24" Nullable="false" />
    <Property Name="AddDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="FmsInvestmentCost">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="InsvestmentCostId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="InsvestmentCostId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="32" Nullable="false" />
    <Property Name="Comment" Type="nvarchar" MaxLength="1024" />
    <Property Name="InsvestmentCost" Type="float" Nullable="false" />
  </EntityType>
  <EntityType Name="FmsLicense">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="LicenseId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="LicenseId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="52" Nullable="false" />
    <Property Name="IssuingOffice" Type="nvarchar" MaxLength="52" Nullable="false" />
    <Property Name="BusinessFieldId" Type="int" />
    <Property Name="EducationalInstitute" Type="nvarchar" MaxLength="52" />
    <Property Name="Note" Type="nvarchar" MaxLength="256" />
    <Property Name="IsUse" Type="bit" />
  </EntityType>
  <EntityType Name="FmsManual">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="ManualId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="ManualId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="ManualNo" Type="nvarchar" MaxLength="20" Nullable="false" />
    <Property Name="ManualTypeId" Type="int" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="200" Nullable="false" />
    <Property Name="Description" Type="nvarchar" MaxLength="2000" />
  </EntityType>
  <EntityType Name="FmsManualHistory">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="ManualId" />
      <PropertyRef Name="HistoryId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="ManualId" Type="int" Nullable="false" />
    <Property Name="HistoryId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="RevisionNo" Type="int" />
    <Property Name="FileId" Type="int" />
    <Property Name="Description" Type="nvarchar" MaxLength="2000" />
    <Property Name="UpdatedDate" Type="datetime" />
    <Property Name="UpdatedUserId" Type="nvarchar" MaxLength="24" />
  </EntityType>
  <EntityType Name="FmsManualType">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="ManualTypeId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="ManualTypeId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="IsUse" Type="bit" />
  </EntityType>
  <EntityType Name="FmsMaterial">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="MaterialId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="BusinessFieldId" Type="int" Nullable="false" />
    <Property Name="MaterialId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="MaterialCode" Type="nvarchar" MaxLength="48" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="48" Nullable="false" />
    <Property Name="FirstClassId" Type="int" />
    <Property Name="SecondClassId" Type="int" />
    <Property Name="ThirdClassId" Type="int" />
    <Property Name="LocationId" Type="int" />
    <Property Name="MaterialTypeId" Type="int" />
    <Property Name="WarehouseId" Type="int" />
    <Property Name="TradeCompanyId" Type="int" />
    <Property Name="Rfid" Type="nvarchar" MaxLength="52" />
    <Property Name="Unit" Type="nvarchar" MaxLength="12" />
    <Property Name="DurableYears" Type="smallint" />
    <Property Name="ReasonableStockCount" Type="smallint" />
    <Property Name="Manufacturer" Type="nvarchar" MaxLength="40" />
    <Property Name="Standard" Type="nvarchar" MaxLength="20" />
    <Property Name="FinalPrice" Type="int" />
    <Property Name="ImageFileId" Type="int" />
    <Property Name="Note" Type="nvarchar" MaxLength="512" />
    <Property Name="IsDiscontinued" Type="bit" />
    <Property Name="IsUse" Type="bit" Nullable="false" />
    <Property Name="FinalStockCount" Type="int" Nullable="false" />
    <Property Name="FinalTotalStockAmount" Type="int" Nullable="false" />
  </EntityType>
  <EntityType Name="FmsMaterialCarriedForward">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="ClosedDate" />
      <PropertyRef Name="BusinessFieldId" />
      <PropertyRef Name="WarehouseId" />
      <PropertyRef Name="MaterialId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="ClosedDate" Type="datetime" Nullable="false" />
    <Property Name="BusinessFieldId" Type="int" Nullable="false" />
    <Property Name="WarehouseId" Type="int" Nullable="false" />
    <Property Name="MaterialId" Type="int" Nullable="false" />
    <Property Name="StockCount" Type="int" Nullable="false" />
    <Property Name="StockTotalCost" Type="int" Nullable="false" />
  </EntityType>
  <EntityType Name="FmsMaterialCodeAdjustmentType">
    <Key>
      <PropertyRef Name="AdjustmentTypeId" />
    </Key>
    <Property Name="AdjustmentTypeId" Type="smallint" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="24" Nullable="false" />
    <Property Name="Comment" Type="nvarchar" MaxLength="1024" />
  </EntityType>
  <EntityType Name="FmsMaterialCodeClass">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="MaterialClassId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="MaterialClassId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="ParentMaterialClassId" Type="int" />
    <Property Name="Depth" Type="int" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="32" Nullable="false" />
    <Property Name="Abbreviation" Type="nvarchar" MaxLength="16" />
    <Property Name="IsUse" Type="bit" />
  </EntityType>
  <EntityType Name="FmsMaterialCodeLocation">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="LocationId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="LocationId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="BusinessFieldId" Type="int" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="48" Nullable="false" />
    <Property Name="IsUse" Type="bit" Nullable="false" />
  </EntityType>
  <EntityType Name="FmsMaterialCodeProgress">
    <Key>
      <PropertyRef Name="ProgressId" />
    </Key>
    <Property Name="ProgressId" Type="smallint" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="24" Nullable="false" />
    <Property Name="Description" Type="nvarchar" MaxLength="100" />
  </EntityType>
  <EntityType Name="FmsMaterialCodePurchaseType">
    <Key>
      <PropertyRef Name="PurchaseTypeId" />
    </Key>
    <Property Name="PurchaseTypeId" Type="smallint" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="24" Nullable="false" />
    <Property Name="Comment" Type="nvarchar" MaxLength="1024" />
  </EntityType>
  <EntityType Name="FmsMaterialCodeReleaseType">
    <Key>
      <PropertyRef Name="ReleaseTypeId" />
    </Key>
    <Property Name="ReleaseTypeId" Type="smallint" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="24" Nullable="false" />
    <Property Name="Description" Type="nvarchar" MaxLength="255" />
  </EntityType>
  <EntityType Name="FmsMaterialCodeType">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="MaterialTypeId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="MaterialTypeId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="24" Nullable="false" />
    <Property Name="Nickname" Type="nvarchar" MaxLength="24" Nullable="false" />
    <Property Name="IsUse" Type="bit" Nullable="false" />
  </EntityType>
  <EntityType Name="FmsMaterialPurchaseOrder">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="PurchaseOrderId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="BusinessFieldId" Type="int" Nullable="false" />
    <Property Name="PurchaseOrderId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="PurchaseRequestId" Type="int" Nullable="false" />
    <Property Name="TradeCompanyId" Type="int" />
    <Property Name="OrderDate" Type="datetime" Nullable="false" />
    <Property Name="OrderUserId" Type="nvarchar" MaxLength="24" Nullable="false" />
    <Property Name="Title" Type="nvarchar" MaxLength="256" Nullable="false" />
    <Property Name="Reason" Type="nvarchar" MaxLength="2000" />
    <Property Name="StoredDueDate" Type="datetime" />
    <Property Name="FileId" Type="int" />
  </EntityType>
  <EntityType Name="FmsMaterialPurchaseOrderMaterial">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="PurchaseOrderId" />
      <PropertyRef Name="MaterialId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="BusinessFieldId" Type="int" Nullable="false" />
    <Property Name="PurchaseOrderId" Type="int" Nullable="false" />
    <Property Name="MaterialId" Type="int" Nullable="false" />
    <Property Name="MaterialCount" Type="int" Nullable="false" />
    <Property Name="UnitCost" Type="int" Nullable="false" />
  </EntityType>
  <EntityType Name="FmsMaterialPurchaseRequest">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="PurchaseRequestId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="BusinessFieldId" Type="int" Nullable="false" />
    <Property Name="PurchaseRequestId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="PurchaseTypeId" Type="smallint" Nullable="false" />
    <Property Name="RequestDate" Type="datetime" Nullable="false" />
    <Property Name="RequestUserId" Type="nvarchar" MaxLength="24" Nullable="false" />
    <Property Name="PurchaseHopeDate" Type="datetime" />
    <Property Name="Title" Type="nvarchar" MaxLength="256" Nullable="false" />
    <Property Name="Reason" Type="nvarchar" MaxLength="2000" Nullable="false" />
    <Property Name="ProgressId" Type="smallint" Nullable="false" />
    <Property Name="ApprovalDate" Type="datetime" />
    <Property Name="ApprovalUserId" Type="nvarchar" MaxLength="24" />
    <Property Name="bSameOrder" Type="bit" />
  </EntityType>
  <EntityType Name="FmsMaterialPurchaseRequestMaterial">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="PurchaseRequestId" />
      <PropertyRef Name="MaterialId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="BusinessFieldId" Type="int" Nullable="false" />
    <Property Name="PurchaseRequestId" Type="int" Nullable="false" />
    <Property Name="MaterialId" Type="int" Nullable="false" />
    <Property Name="MaterialCount" Type="int" Nullable="false" />
  </EntityType>
  <EntityType Name="FmsMaterialRelease">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="MaterialReleaseId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="BusinessFieldId" Type="int" Nullable="false" />
    <Property Name="ReleaseDate" Type="datetime" Nullable="false" />
    <Property Name="MaterialReleaseId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="ReleaseTypeId" Type="smallint" Nullable="false" />
    <Property Name="WorkRequestId" Type="int" />
    <Property Name="WarehouseId" Type="int" />
    <Property Name="MaterialId" Type="int" />
    <Property Name="MaterialCount" Type="int" />
    <Property Name="StockCountByPoint" Type="int" />
    <Property Name="ReleaseTotalCost" Type="int" />
    <Property Name="AdjustmentTypeId" Type="smallint" Nullable="false" />
    <Property Name="AdjustmentUserId" Type="nvarchar" MaxLength="24" />
    <Property Name="ConfirmedUserId" Type="nvarchar" MaxLength="24" />
    <Property Name="ConfirmedDate" Type="datetime" />
    <Property Name="IsConfirmed" Type="bit" Nullable="false" />
    <Property Name="Comment" Type="nvarchar" MaxLength="1024" />
  </EntityType>
  <EntityType Name="FmsMaterialStored">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="MaterialStoredId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="BusinessFieldId" Type="int" Nullable="false" />
    <Property Name="StoredDate" Type="datetime" Nullable="false" />
    <Property Name="MaterialStoredId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="PurchaseOrderId" Type="int" />
    <Property Name="WarehouseId" Type="int" Nullable="false" />
    <Property Name="MaterialId" Type="int" Nullable="false" />
    <Property Name="StoredCount" Type="int" Nullable="false" />
    <Property Name="RemainStoredCount" Type="int" Nullable="false" />
    <Property Name="UnitCost" Type="int" Nullable="false" />
    <Property Name="StockCount" Type="int" Nullable="false" />
    <Property Name="Note" Type="nvarchar" MaxLength="1024" />
    <Property Name="StoredUserId" Type="nvarchar" MaxLength="24" Nullable="false" />
    <Property Name="ApprovalDate" Type="datetime" />
    <Property Name="ApprovalUserId" Type="nvarchar" MaxLength="24" />
    <Property Name="IsApproval" Type="bit" Nullable="false" />
    <Property Name="LocationInWarehouse" Type="nvarchar" MaxLength="100" />
  </EntityType>
  <EntityType Name="FmsMaterialTradeCompany">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="TradeCompanyId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="TradeCompanyId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="48" Nullable="false" />
    <Property Name="RegistrationNo" Type="nvarchar" MaxLength="24" Nullable="false" />
    <Property Name="RepresentativeName" Type="nvarchar" MaxLength="24" />
    <Property Name="PhoneNo" Type="nvarchar" MaxLength="20" />
    <Property Name="FaxNo" Type="nvarchar" MaxLength="20" />
    <Property Name="SalesName" Type="nvarchar" MaxLength="20" />
    <Property Name="SalesPhoneNo" Type="nvarchar" MaxLength="20" />
    <Property Name="AddressZip1" Type="nchar" MaxLength="5" />
    <Property Name="AddressZip2" Type="nchar" MaxLength="3" />
    <Property Name="Address1" Type="nvarchar" MaxLength="100" />
    <Property Name="Adderss2" Type="nvarchar" MaxLength="100" />
    <Property Name="HomepageUri" Type="nvarchar" MaxLength="200" />
    <Property Name="Note" Type="nvarchar" MaxLength="1024" />
    <Property Name="IsUse" Type="bit" Nullable="false" />
  </EntityType>
  <EntityType Name="FmsMaterialWarehouse">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="WarehouseId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="BusinessFieldId" Type="int" Nullable="false" />
    <Property Name="WarehouseId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="48" Nullable="false" />
    <Property Name="IsUse" Type="bit" Nullable="false" />
  </EntityType>
  <EntityType Name="FmsMonthlyReport">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="MonthlyReportId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="MonthlyReportId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="128" Nullable="false" />
    <Property Name="Contents" Type="nvarchar" MaxLength="1024" Nullable="false" />
    <Property Name="RegisterUserId" Type="nvarchar" MaxLength="24" Nullable="false" />
    <Property Name="AddDate" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="FmsPaymentType">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="PaymentTypeId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="PaymentTypeId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="IsUse" Type="bit" />
  </EntityType>
  <EntityType Name="FmsReport">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="RId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="RId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Title" Type="nvarchar" MaxLength="128" />
    <Property Name="Contents" Type="nvarchar" MaxLength="1024" />
    <Property Name="RegisterUserId" Type="nvarchar" MaxLength="24" />
    <Property Name="FileId" Type="int" />
    <Property Name="MakeDate" Type="datetime" Nullable="false" />
    <Property Name="ConfirmUserId1" Type="nvarchar" MaxLength="24" />
    <Property Name="ConfirmUserId2" Type="nvarchar" MaxLength="24" />
    <Property Name="BusinessFieldId" Type="int" Nullable="false" />
  </EntityType>
  <EntityType Name="FmsWorkCodeCauseClass">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="CauseClassId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="CauseClassId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="ParentId" Type="int" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="IsUse" Type="bit" />
  </EntityType>
  <EntityType Name="FmsWorkCodeCycleUnit">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="CycleUnitId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="CycleUnitId" Type="int" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="24" Nullable="false" />
    <Property Name="Description" Type="nvarchar" MaxLength="200" />
  </EntityType>
  <EntityType Name="FmsWorkCodeEmergency">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="EmergencyId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="EmergencyId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="50" />
    <Property Name="IsUse" Type="bit" />
  </EntityType>
  <EntityType Name="FmsWorkCodeHolidayWorkType">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="HolidayWorkTypeId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="HolidayWorkTypeId" Type="int" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="50" />
    <Property Name="IsUse" Type="bit" />
  </EntityType>
  <EntityType Name="FmsWorkCodeLegalInspectionAgency">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="InspectionAgencyId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="InspectionAgencyId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="24" Nullable="false" />
    <Property Name="IsUse" Type="bit" />
  </EntityType>
  <EntityType Name="FmsWorkCodeProgress">
    <Key>
      <PropertyRef Name="WorkProgressId" />
    </Key>
    <Property Name="WorkProgressId" Type="int" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="24" Nullable="false" />
    <Property Name="Description" Type="nvarchar" MaxLength="512" />
  </EntityType>
  <EntityType Name="FmsWorkCodeType">
    <Key>
      <PropertyRef Name="WorkTypeId" />
    </Key>
    <Property Name="WorkTypeId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="Description" Type="nvarchar" MaxLength="512" />
  </EntityType>
  <EntityType Name="FmsWorkOrder">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="WorkRequestId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="WorkRequestId" Type="int" Nullable="false" />
    <Property Name="BusinessFieldId" Type="int" Nullable="false" />
    <Property Name="EmergencyId" Type="int" />
    <Property Name="OrderUserId" Type="nvarchar" MaxLength="24" Nullable="false" />
    <Property Name="OrderDate" Type="datetime" Nullable="false" />
    <Property Name="StartWorkDate" Type="datetime" Nullable="false" />
    <Property Name="Title" Type="nvarchar" MaxLength="200" Nullable="false" />
    <Property Name="Content" Type="nvarchar" MaxLength="2000" />
  </EntityType>
  <EntityType Name="FmsWorkOrderToFacility">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="WorkRequestId" />
      <PropertyRef Name="FacilityCode" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="WorkRequestId" Type="int" Nullable="false" />
    <Property Name="FacilityCode" Type="int" Nullable="false" />
  </EntityType>
  <EntityType Name="FmsWorkRequest">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="WorkRequestId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="WorkRequestId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="WorkTypeId" Type="int" Nullable="false" />
    <Property Name="BusinessFieldId" Type="int" Nullable="false" />
    <Property Name="WorkScheduleId" Type="int" />
    <Property Name="WorkProgressId" Type="int" Nullable="false" />
    <Property Name="Title" Type="nvarchar" MaxLength="200" Nullable="false" />
    <Property Name="Content" Type="nvarchar" MaxLength="1024" />
    <Property Name="RequestUserId" Type="nvarchar" MaxLength="24" />
    <Property Name="RequestDate" Type="datetime" Nullable="false" />
    <Property Name="StartWorkDate" Type="datetime" Nullable="false" />
    <Property Name="RejectUserId" Type="nvarchar" MaxLength="24" />
    <Property Name="RejectDate" Type="datetime" />
    <Property Name="RejectReason" Type="nvarchar" MaxLength="512" />
    <Property Name="InspectionAgencyId" Type="int" />
  </EntityType>
  <EntityType Name="FmsWorkRequestToFacility">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="WorkRequestId" />
      <PropertyRef Name="FacilityCode" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="WorkRequestId" Type="int" Nullable="false" />
    <Property Name="FacilityCode" Type="int" Nullable="false" />
  </EntityType>
  <EntityType Name="FmsWorkResult">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="WorkRequestId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="WorkRequestId" Type="int" Nullable="false" />
    <Property Name="WorkerUserId" Type="nvarchar" MaxLength="24" Nullable="false" />
    <Property Name="StartDate" Type="datetime" Nullable="false" />
    <Property Name="EndDate" Type="datetime" Nullable="false" />
    <Property Name="CauseClassId" Type="int" />
    <Property Name="Content" Type="nvarchar" MaxLength="1024" />
    <Property Name="ConfirmedDate" Type="datetime" />
    <Property Name="ConfirmedUserId" Type="nvarchar" MaxLength="24" />
    <Property Name="IsConfirmed" Type="bit" Nullable="false" />
    <Property Name="ConfirmDesc" Type="nvarchar" MaxLength="1024" />
  </EntityType>
  <EntityType Name="FmsWorkResultCheckItem">
    <Key>
      <PropertyRef Name="CheckItemId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="WorkRequestId" Type="int" Nullable="false" />
    <Property Name="FacilityCode" Type="int" />
    <Property Name="CheckItemId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="BoolResult" Type="bit" />
    <Property Name="TextResult" Type="nvarchar" MaxLength="1024" />
    <Property Name="CheckDate" Type="datetime" Nullable="false" />
    <Property Name="FileId1" Type="int" />
    <Property Name="FileId2" Type="int" />
  </EntityType>
  <EntityType Name="FmsWorkResultCheckItemMaterial">
    <Key>
      <PropertyRef Name="CheckItemMaterialId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="WorkRequestId" Type="int" Nullable="false" />
    <Property Name="CheckItemId" Type="int" Nullable="false" />
    <Property Name="CheckItemMaterialId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="MaterialId" Type="int" Nullable="false" />
    <Property Name="MaterialCount" Type="int" Nullable="false" />
    <Property Name="MaterialCode" Type="nvarchar" MaxLength="48" />
    <Property Name="Name" Type="nvarchar" MaxLength="48" />
  </EntityType>
  <EntityType Name="FmsWorkResultFile">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="WorkRequestId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="WorkRequestId" Type="int" Nullable="false" />
    <Property Name="FileId" Type="int" Nullable="false" />
  </EntityType>
  <EntityType Name="FmsWorkResultLaw">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="WorkRequestId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="WorkRequestId" Type="int" Nullable="false" />
    <Property Name="CertificationNo" Type="nvarchar" MaxLength="50" />
    <Property Name="CheckCommission" Type="numeric" Precision="10" Scale="0" />
    <Property Name="CheckResult" Type="bit" />
  </EntityType>
  <EntityType Name="FmsWorkResultToFacility">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="WorkRequestId" />
      <PropertyRef Name="FacilityCode" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="WorkRequestId" Type="int" Nullable="false" />
    <Property Name="FacilityCode" Type="int" Nullable="false" />
  </EntityType>
  <EntityType Name="FmsWorkSchedule">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="WorkScheduleId" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="WorkScheduleId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="WorkTypeId" Type="int" Nullable="false" />
    <Property Name="BusinessFieldId" Type="int" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="100" Nullable="false" />
    <Property Name="InspectionAgencyId" Type="int" />
    <Property Name="CycleSize" Type="int" Nullable="false" />
    <Property Name="CycleUnitId" Type="int" Nullable="false" />
    <Property Name="HolidayWorkTypeId" Type="int" Nullable="false" />
    <Property Name="WorkDueDate" Type="datetime" Nullable="false" />
    <Property Name="UpdateUserId" Type="nvarchar" MaxLength="24" Nullable="false" />
    <Property Name="IsUse" Type="bit" Nullable="false" />
    <Property Name="IsAutoOrder" Type="bit" Nullable="false" />
    <Property Name="Content" Type="nvarchar" MaxLength="1024" />
  </EntityType>
  <EntityType Name="FmsWorkScheduleToFacility">
    <Key>
      <PropertyRef Name="SiteId" />
      <PropertyRef Name="WorkScheduleId" />
      <PropertyRef Name="FacilityCode" />
    </Key>
    <Property Name="SiteId" Type="int" Nullable="false" />
    <Property Name="WorkScheduleId" Type="int" Nullable="false" />
    <Property Name="FacilityCode" Type="int" Nullable="false" />
  </EntityType>
  <EntityType Name="sysdiagrams">
    <Key>
      <PropertyRef Name="diagram_id" />
    </Key>
    <Property Name="name" Type="nvarchar" MaxLength="128" Nullable="false" />
    <Property Name="principal_id" Type="int" Nullable="false" />
    <Property Name="diagram_id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="version" Type="int" />
    <Property Name="definition" Type="varbinary(max)" />
  </EntityType>
  <EntityType Name="WeatherDongNaeForecast">
    <Key>
      <PropertyRef Name="BaseTime" />
      <PropertyRef Name="ForecastTime" />
    </Key>
    <Property Name="BaseTime" Type="datetime" Nullable="false" />
    <Property Name="nx" Type="int" />
    <Property Name="ny" Type="int" />
    <Property Name="ForecastTime" Type="datetime" Nullable="false" />
    <Property Name="POP" Type="float" />
    <Property Name="PTY" Type="float" />
    <Property Name="R06" Type="float" />
    <Property Name="REH" Type="float" />
    <Property Name="S06" Type="float" />
    <Property Name="SKY" Type="float" />
    <Property Name="T3H" Type="float" />
    <Property Name="TMN" Type="float" />
    <Property Name="TMX" Type="float" />
    <Property Name="UUU" Type="float" />
    <Property Name="VVV" Type="float" />
    <Property Name="VEC" Type="float" />
    <Property Name="WSD" Type="float" />
    <Property Name="Type" Type="int" />
    <Property Name="DBTime" Type="datetime" />
    <Property Name="Version" Type="int" />
  </EntityType>
  <Association Name="FK__BemsEnerg__SiteI__7954A4F6">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="BemsEnergyConfigPercentMonth" Type="Self.BemsEnergyConfigPercentMonth" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="BemsEnergyConfigPercentMonth">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__BemsEnerg__SiteI__7C3111A1">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="BemsEnergyConfigPercentWeek" Type="Self.BemsEnergyConfigPercentWeek" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="BemsEnergyConfigPercentWeek">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__BemsEnergyDaily__BemsFuelType">
    <End Role="BemsFuelType" Type="Self.BemsFuelType" Multiplicity="1" />
    <End Role="BemsEnergyDaily" Type="Self.BemsEnergyDaily" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="BemsFuelType">
        <PropertyRef Name="FuelTypeId" />
      </Principal>
      <Dependent Role="BemsEnergyDaily">
        <PropertyRef Name="FuelTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__BemsEnergyDaily__BemsServiceType">
    <End Role="BemsServiceType" Type="Self.BemsServiceType" Multiplicity="1" />
    <End Role="BemsEnergyDaily" Type="Self.BemsEnergyDaily" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="BemsServiceType">
        <PropertyRef Name="ServiceTypeId" />
      </Principal>
      <Dependent Role="BemsEnergyDaily">
        <PropertyRef Name="ServiceTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__BemsEnergyDaily__CmBuilding">
    <End Role="CmBuilding" Type="Self.CmBuilding" Multiplicity="1" />
    <End Role="BemsEnergyDaily" Type="Self.BemsEnergyDaily" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmBuilding">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BuildingId" />
      </Principal>
      <Dependent Role="BemsEnergyDaily">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BuildingId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__BemsFactorCo2__BemsFuelType">
    <End Role="BemsFuelType" Type="Self.BemsFuelType" Multiplicity="1" />
    <End Role="BemsFactorCo2" Type="Self.BemsFactorCo2" Multiplicity="0..1" />
    <ReferentialConstraint>
      <Principal Role="BemsFuelType">
        <PropertyRef Name="FuelTypeId" />
      </Principal>
      <Dependent Role="BemsFactorCo2">
        <PropertyRef Name="FuelTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__BemsFactorToe__BemsFuelType">
    <End Role="BemsFuelType" Type="Self.BemsFuelType" Multiplicity="1" />
    <End Role="BemsFactorToe" Type="Self.BemsFactorToe" Multiplicity="0..1" />
    <ReferentialConstraint>
      <Principal Role="BemsFuelType">
        <PropertyRef Name="FuelTypeId" />
      </Principal>
      <Dependent Role="BemsFactorToe">
        <PropertyRef Name="FuelTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__BemsFormula__BemsFormulaBase">
    <End Role="BemsFormulaBase" Type="Self.BemsFormulaBase" Multiplicity="1" />
    <End Role="BemsFormula" Type="Self.BemsFormula" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="BemsFormulaBase">
        <PropertyRef Name="FacilityTypeId" />
        <PropertyRef Name="FormulaId" />
      </Principal>
      <Dependent Role="BemsFormula">
        <PropertyRef Name="FacilityTypeId" />
        <PropertyRef Name="FormulaId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__BemsFormulaParameter__BemsFormula">
    <End Role="BemsFormula" Type="Self.BemsFormula" Multiplicity="1" />
    <End Role="BemsFormulaParameter" Type="Self.BemsFormulaParameter" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="BemsFormula">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FacilityTypeId" />
        <PropertyRef Name="FacilityCode" />
        <PropertyRef Name="FormulaId" />
      </Principal>
      <Dependent Role="BemsFormulaParameter">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FacilityTypeId" />
        <PropertyRef Name="FacilityCode" />
        <PropertyRef Name="FormulaId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__BemsFormulaTableValue__BemsFormulaTable">
    <End Role="BemsFormulaTable" Type="Self.BemsFormulaTable" Multiplicity="1" />
    <End Role="BemsFormulaTableValue" Type="Self.BemsFormulaTableValue" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="BemsFormulaTable">
        <PropertyRef Name="TableId" />
      </Principal>
      <Dependent Role="BemsFormulaTableValue">
        <PropertyRef Name="TableId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__BemsMonitoringPo__1372D2FE">
    <End Role="BemsAnalysisType" Type="Self.BemsAnalysisType" Multiplicity="1" />
    <End Role="BemsMonitoringPointToAnlaysisType" Type="Self.BemsMonitoringPointToAnlaysisType" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="BemsAnalysisType">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="AnalysisType" />
      </Principal>
      <Dependent Role="BemsMonitoringPointToAnlaysisType">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="AnalysisType" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__BemsMonitoringPo__155B1B70">
    <End Role="BemsMonitoringPoint" Type="Self.BemsMonitoringPoint" Multiplicity="1" />
    <End Role="BemsMonitoringPointToAnlaysisType" Type="Self.BemsMonitoringPointToAnlaysisType" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="BemsMonitoringPoint">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FacilityCode" />
        <PropertyRef Name="PropertyId" />
      </Principal>
      <Dependent Role="BemsMonitoringPointToAnlaysisType">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FacilityCode" />
        <PropertyRef Name="PropertyId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__BemsMonitoringPoint__BemsFuelType">
    <End Role="BemsFuelType" Type="Self.BemsFuelType" Multiplicity="0..1" />
    <End Role="BemsMonitoringPoint" Type="Self.BemsMonitoringPoint" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="BemsFuelType">
        <PropertyRef Name="FuelTypeId" />
      </Principal>
      <Dependent Role="BemsMonitoringPoint">
        <PropertyRef Name="FuelTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__BemsMonitoringPoint__BemsServiceType">
    <End Role="BemsServiceType" Type="Self.BemsServiceType" Multiplicity="0..1" />
    <End Role="BemsMonitoringPoint" Type="Self.BemsMonitoringPoint" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="BemsServiceType">
        <PropertyRef Name="ServiceTypeId" />
      </Principal>
      <Dependent Role="BemsMonitoringPoint">
        <PropertyRef Name="ServiceTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__BemsMonitoringPoint__CmBuilding">
    <End Role="CmBuilding" Type="Self.CmBuilding" Multiplicity="0..1" />
    <End Role="BemsMonitoringPoint" Type="Self.BemsMonitoringPoint" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmBuilding">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BuildingId" />
      </Principal>
      <Dependent Role="BemsMonitoringPoint">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BuildingId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__BemsMonitoringPoint__CmFloor">
    <End Role="CmFloor" Type="Self.CmFloor" Multiplicity="0..1" />
    <End Role="BemsMonitoringPoint" Type="Self.BemsMonitoringPoint" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmFloor">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BuildingId" />
        <PropertyRef Name="FloorId" />
      </Principal>
      <Dependent Role="BemsMonitoringPoint">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BuildingId" />
        <PropertyRef Name="FloorId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__BemsMonitoringPoint__CmZone">
    <End Role="CmZone" Type="Self.CmZone" Multiplicity="0..1" />
    <End Role="BemsMonitoringPoint" Type="Self.BemsMonitoringPoint" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmZone">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BuildingId" />
        <PropertyRef Name="FloorId" />
        <PropertyRef Name="ZoneId" />
      </Principal>
      <Dependent Role="BemsMonitoringPoint">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BuildingId" />
        <PropertyRef Name="FloorId" />
        <PropertyRef Name="ZoneId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__BemsMonitoringPointBaseData__BemsFacilityType">
    <End Role="BemsFacilityType" Type="Self.BemsFacilityType" Multiplicity="1" />
    <End Role="BemsMonitoringPointBaseData" Type="Self.BemsMonitoringPointBaseData" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="BemsFacilityType">
        <PropertyRef Name="FacilityTypeId" />
      </Principal>
      <Dependent Role="BemsMonitoringPointBaseData">
        <PropertyRef Name="FacilityTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__BemsMonitoringPointBaseData__BemsFuelType">
    <End Role="BemsFuelType" Type="Self.BemsFuelType" Multiplicity="0..1" />
    <End Role="BemsMonitoringPointBaseData" Type="Self.BemsMonitoringPointBaseData" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="BemsFuelType">
        <PropertyRef Name="FuelTypeId" />
      </Principal>
      <Dependent Role="BemsMonitoringPointBaseData">
        <PropertyRef Name="FuelTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__BemsMonitoringPointBaseData__BemsServiceType">
    <End Role="BemsServiceType" Type="Self.BemsServiceType" Multiplicity="0..1" />
    <End Role="BemsMonitoringPointBaseData" Type="Self.BemsMonitoringPointBaseData" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="BemsServiceType">
        <PropertyRef Name="ServiceTypeId" />
      </Principal>
      <Dependent Role="BemsMonitoringPointBaseData">
        <PropertyRef Name="ServiceTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__BemsMonitoringPointHistory15min__BemsFacilityType">
    <End Role="BemsFacilityType" Type="Self.BemsFacilityType" Multiplicity="1" />
    <End Role="BemsMonitoringPointHistory15min" Type="Self.BemsMonitoringPointHistory15min" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="BemsFacilityType">
        <PropertyRef Name="FacilityTypeId" />
      </Principal>
      <Dependent Role="BemsMonitoringPointHistory15min">
        <PropertyRef Name="FacilityTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__BemsMonitoringPointHistory15min__BemsMonitoringPoint">
    <End Role="BemsMonitoringPoint" Type="Self.BemsMonitoringPoint" Multiplicity="1" />
    <End Role="BemsMonitoringPointHistory15min" Type="Self.BemsMonitoringPointHistory15min" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="BemsMonitoringPoint">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FacilityCode" />
        <PropertyRef Name="PropertyId" />
      </Principal>
      <Dependent Role="BemsMonitoringPointHistory15min">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FacilityCode" />
        <PropertyRef Name="PropertyId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__BemsMonitoringPointHistory15minRawData__BemsFacilityType">
    <End Role="BemsFacilityType" Type="Self.BemsFacilityType" Multiplicity="1" />
    <End Role="BemsMonitoringPointHistory15minRawData" Type="Self.BemsMonitoringPointHistory15minRawData" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="BemsFacilityType">
        <PropertyRef Name="FacilityTypeId" />
      </Principal>
      <Dependent Role="BemsMonitoringPointHistory15minRawData">
        <PropertyRef Name="FacilityTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__BemsMonitoringPointHistory15minRawData__BemsMonitoringPoint">
    <End Role="BemsMonitoringPoint" Type="Self.BemsMonitoringPoint" Multiplicity="1" />
    <End Role="BemsMonitoringPointHistory15minRawData" Type="Self.BemsMonitoringPointHistory15minRawData" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="BemsMonitoringPoint">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FacilityCode" />
        <PropertyRef Name="PropertyId" />
      </Principal>
      <Dependent Role="BemsMonitoringPointHistory15minRawData">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FacilityCode" />
        <PropertyRef Name="PropertyId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__BemsMonitoringPointHistoryDaily__BemsFacilityType">
    <End Role="BemsFacilityType" Type="Self.BemsFacilityType" Multiplicity="1" />
    <End Role="BemsMonitoringPointHistoryDaily" Type="Self.BemsMonitoringPointHistoryDaily" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="BemsFacilityType">
        <PropertyRef Name="FacilityTypeId" />
      </Principal>
      <Dependent Role="BemsMonitoringPointHistoryDaily">
        <PropertyRef Name="FacilityTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__BemsMonitoringPointHistoryDaily__BemsMonitoringPoint">
    <End Role="BemsMonitoringPoint" Type="Self.BemsMonitoringPoint" Multiplicity="1" />
    <End Role="BemsMonitoringPointHistoryDaily" Type="Self.BemsMonitoringPointHistoryDaily" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="BemsMonitoringPoint">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FacilityCode" />
        <PropertyRef Name="PropertyId" />
      </Principal>
      <Dependent Role="BemsMonitoringPointHistoryDaily">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FacilityCode" />
        <PropertyRef Name="PropertyId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__BemsMonitoringPointHistoryHourly__BemsFacilityType">
    <End Role="BemsFacilityType" Type="Self.BemsFacilityType" Multiplicity="1" />
    <End Role="BemsMonitoringPointHistoryHourly" Type="Self.BemsMonitoringPointHistoryHourly" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="BemsFacilityType">
        <PropertyRef Name="FacilityTypeId" />
      </Principal>
      <Dependent Role="BemsMonitoringPointHistoryHourly">
        <PropertyRef Name="FacilityTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__BemsMonitoringPointHistoryHourly__BemsMonitoringPoint">
    <End Role="BemsMonitoringPoint" Type="Self.BemsMonitoringPoint" Multiplicity="1" />
    <End Role="BemsMonitoringPointHistoryHourly" Type="Self.BemsMonitoringPointHistoryHourly" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="BemsMonitoringPoint">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FacilityCode" />
        <PropertyRef Name="PropertyId" />
      </Principal>
      <Dependent Role="BemsMonitoringPointHistoryHourly">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FacilityCode" />
        <PropertyRef Name="PropertyId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__BemsMonitoringPointToAnlaysisType__BemsFacilityType">
    <End Role="BemsFacilityType" Type="Self.BemsFacilityType" Multiplicity="1" />
    <End Role="BemsMonitoringPointToAnlaysisType" Type="Self.BemsMonitoringPointToAnlaysisType" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="BemsFacilityType">
        <PropertyRef Name="FacilityTypeId" />
      </Principal>
      <Dependent Role="BemsMonitoringPointToAnlaysisType">
        <PropertyRef Name="FacilityTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__BemsNoticePriceBase__BemsNoticePriceContractType">
    <End Role="BemsNoticePriceContractType" Type="Self.BemsNoticePriceContractType" Multiplicity="1" />
    <End Role="BemsNoticePriceBase" Type="Self.BemsNoticePriceBase" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="BemsNoticePriceContractType">
        <PropertyRef Name="FuelTypeId" />
        <PropertyRef Name="ContractType" />
      </Principal>
      <Dependent Role="BemsNoticePriceBase">
        <PropertyRef Name="FuelTypeId" />
        <PropertyRef Name="ContractType" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__BemsNoticePriceContractType__BemsFuelType">
    <End Role="BemsFuelType" Type="Self.BemsFuelType" Multiplicity="1" />
    <End Role="BemsNoticePriceContractType" Type="Self.BemsNoticePriceContractType" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="BemsFuelType">
        <PropertyRef Name="FuelTypeId" />
      </Principal>
      <Dependent Role="BemsNoticePriceContractType">
        <PropertyRef Name="FuelTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__BemsNoticePriceDetail__BemsNoticePriceBase">
    <End Role="BemsNoticePriceBase" Type="Self.BemsNoticePriceBase" Multiplicity="1" />
    <End Role="BemsNoticePriceDetail" Type="Self.BemsNoticePriceDetail" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="BemsNoticePriceBase">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FuelTypeId" />
        <PropertyRef Name="ApplyDate" />
        <PropertyRef Name="ContractType" />
      </Principal>
      <Dependent Role="BemsNoticePriceDetail">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FuelTypeId" />
        <PropertyRef Name="ApplyDate" />
        <PropertyRef Name="ContractType" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__CmCompany__345EC57D">
    <End Role="CmCompanyType" Type="Self.CmCompanyType" Multiplicity="1" />
    <End Role="CmCompany" Type="Self.CmCompany" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmCompanyType">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="CompanyTypeId" />
      </Principal>
      <Dependent Role="CmCompany">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="CompanyTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__CmCompany__SiteI__336AA144">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="CmCompany" Type="Self.CmCompany" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="CmCompany">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__CmDepartment__3552E9B6">
    <End Role="CmCompany" Type="Self.CmCompany" Multiplicity="1" />
    <End Role="CmDepartment" Type="Self.CmDepartment" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmCompany">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="CompanyId" />
      </Principal>
      <Dependent Role="CmDepartment">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="CompanyId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__CmFacility__CmFacility">
    <End Role="CmFacility" Type="Self.CmFacility" Multiplicity="0..1" />
    <End Role="CmFacility1" Type="Self.CmFacility" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmFacility">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FacilityCode" />
      </Principal>
      <Dependent Role="CmFacility1">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="ParentFacilityCode" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__CmFacilityFile__7720AD13">
    <End Role="CmFacility" Type="Self.CmFacility" Multiplicity="1" />
    <End Role="CmFacilityFile" Type="Self.CmFacilityFile" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmFacility">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FacilityCode" />
      </Principal>
      <Dependent Role="CmFacilityFile">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FacilityCode" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__CmFacilityFile__CmFile">
    <End Role="CmFile" Type="Self.CmFile" Multiplicity="1" />
    <End Role="CmFacilityFile" Type="Self.CmFacilityFile" Multiplicity="0..1" />
    <ReferentialConstraint>
      <Principal Role="CmFile">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FileId" />
      </Principal>
      <Dependent Role="CmFacilityFile">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FileId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__CmFacilityManual__79FD19BE">
    <End Role="CmFacility" Type="Self.CmFacility" Multiplicity="1" />
    <End Role="FmsFacilityManual" Type="Self.FmsFacilityManual" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmFacility">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FacilityCode" />
      </Principal>
      <Dependent Role="FmsFacilityManual">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FacilityCode" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__CmFacilityManual__7BE56230">
    <End Role="CmBusinessField" Type="Self.CmBusinessField" Multiplicity="1" />
    <End Role="FmsFacilityManual" Type="Self.FmsFacilityManual" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmBusinessField">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BusinessFieldId" />
      </Principal>
      <Dependent Role="FmsFacilityManual">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BusinessFieldId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__CmFile__CmFileCategory">
    <End Role="CmFileCategory" Type="Self.CmFileCategory" Multiplicity="1" />
    <End Role="CmFile" Type="Self.CmFile" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmFileCategory">
        <PropertyRef Name="FileCategoryId" />
      </Principal>
      <Dependent Role="CmFile">
        <PropertyRef Name="FileCategoryId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__CmFile__SiteId__2759D01A">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="CmFile" Type="Self.CmFile" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="CmFile">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__CmFloor__3CF40B7E">
    <End Role="CmBuilding" Type="Self.CmBuilding" Multiplicity="1" />
    <End Role="CmFloor" Type="Self.CmFloor" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmBuilding">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BuildingId" />
      </Principal>
      <Dependent Role="CmFloor">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BuildingId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__CmHoliday__SiteI__0BB1B5A5">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="CmHoliday" Type="Self.CmHoliday" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="CmHoliday">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__CmHoliday__SiteI__0D99FE17">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="CmHolidayWeekend" Type="Self.CmHolidayWeekend" Multiplicity="0..1" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="CmHolidayWeekend">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__CmHoliday__SiteI__10766AC2">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="CmHolidayCustom" Type="Self.CmHolidayCustom" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="CmHolidayCustom">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__CmHoliday__SiteI__65AC084E">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="CmHoliday" Type="Self.CmHoliday" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="CmHoliday">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__CmHoliday__SiteI__66A02C87">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="CmHolidayCustom" Type="Self.CmHolidayCustom" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="CmHolidayCustom">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__CmLocation__3DE82FB7">
    <End Role="CmFloor" Type="Self.CmFloor" Multiplicity="1" />
    <End Role="CmZone" Type="Self.CmZone" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmFloor">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BuildingId" />
        <PropertyRef Name="FloorId" />
      </Principal>
      <Dependent Role="CmZone">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BuildingId" />
        <PropertyRef Name="FloorId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__CmPositio__SiteI__6A70BD6B">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="CmPosition" Type="Self.CmPosition" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="CmPosition">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__CmUserGro__SiteI__53D770D6">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="CmUserGroup" Type="Self.CmUserGroup" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="CmUserGroup">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__CmUserGroupPermission__CmUserGroup">
    <End Role="CmUserGroup" Type="Self.CmUserGroup" Multiplicity="1">
      <OnDelete Action="Cascade" />
    </End>
    <End Role="CmUserGroupPermission" Type="Self.CmUserGroupPermission" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmUserGroup">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="UserGroupId" />
      </Principal>
      <Dependent Role="CmUserGroupPermission">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="UserGroupId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__CmUserPos__SiteI__44952D46">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="CmPosition" Type="Self.CmPosition" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="CmPosition">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__CmUserToLicense__CmUser">
    <End Role="CmUser" Type="Self.CmUser" Multiplicity="1" />
    <End Role="CmUserToLicense" Type="Self.CmUserToLicense" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmUser">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="UserId" />
      </Principal>
      <Dependent Role="CmUserToLicense">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="UserId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__CmUserToLicense__FmsLicense">
    <End Role="FmsLicense" Type="Self.FmsLicense" Multiplicity="1" />
    <End Role="CmUserToLicense" Type="Self.CmUserToLicense" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsLicense">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="LicenseId" />
      </Principal>
      <Dependent Role="CmUserToLicense">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="LicenseId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__CmZone__CmBuilding">
    <End Role="CmBuilding" Type="Self.CmBuilding" Multiplicity="1" />
    <End Role="CmZone" Type="Self.CmZone" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmBuilding">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BuildingId" />
      </Principal>
      <Dependent Role="CmZone">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BuildingId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsDrawin__SiteI__6B79F03D">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="FmsDrawingCodeGroup" Type="Self.FmsDrawingCodeGroup" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="FmsDrawingCodeGroup">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsDrawin__SiteI__6C6E1476">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="FmsDrawingCodeType" Type="Self.FmsDrawingCodeType" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="FmsDrawingCodeType">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsDrawin__SiteI__6D6238AF">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="FmsDrawing" Type="Self.FmsDrawing" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="FmsDrawing">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsDrawin__SiteI__6F357288">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="FmsDrawingCodeGroup" Type="Self.FmsDrawingCodeGroup" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="FmsDrawingCodeGroup">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsDrawin__SiteI__702996C1">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="FmsDrawingCodeType" Type="Self.FmsDrawingCodeType" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="FmsDrawingCodeType">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsDrawing__6E565CE8">
    <End Role="FmsDrawingCodeGroup" Type="Self.FmsDrawingCodeGroup" Multiplicity="1" />
    <End Role="FmsDrawing" Type="Self.FmsDrawing" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsDrawingCodeGroup">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="DrawingGroupId" />
      </Principal>
      <Dependent Role="FmsDrawing">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="DrawingGroupId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsDrawing__6F4A8121">
    <End Role="FmsDrawingCodeType" Type="Self.FmsDrawingCodeType" Multiplicity="1" />
    <End Role="FmsDrawing" Type="Self.FmsDrawing" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsDrawingCodeType">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="DrawingTypeId" />
      </Principal>
      <Dependent Role="FmsDrawing">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="DrawingTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsDrawingHistor__04DA9AE4">
    <End Role="CmFile" Type="Self.CmFile" Multiplicity="0..1" />
    <End Role="FmsDrawingHistory" Type="Self.FmsDrawingHistory" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmFile">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FileId" />
      </Principal>
      <Dependent Role="FmsDrawingHistory">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FileId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsDrawingHistor__7132C993">
    <End Role="FmsDrawing" Type="Self.FmsDrawing" Multiplicity="1">
      <OnDelete Action="Cascade" />
    </End>
    <End Role="FmsDrawingHistory" Type="Self.FmsDrawingHistory" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsDrawing">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="DrawingId" />
      </Principal>
      <Dependent Role="FmsDrawingHistory">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="DrawingId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsDrawingHistory__CmUser">
    <End Role="CmUser" Type="Self.CmUser" Multiplicity="0..1" />
    <End Role="FmsDrawingHistory" Type="Self.FmsDrawingHistory" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmUser">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="UserId" />
      </Principal>
      <Dependent Role="FmsDrawingHistory">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="UpdatedUserId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsFacilityCheckItem__FmsWorkCodeCycleUnit">
    <End Role="FmsWorkCodeCycleUnit" Type="Self.FmsWorkCodeCycleUnit" Multiplicity="1" />
    <End Role="FmsFacilityCheckItem" Type="Self.FmsFacilityCheckItem" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsWorkCodeCycleUnit">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="CycleUnitId" />
      </Principal>
      <Dependent Role="FmsFacilityCheckItem">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="CycleUnitId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsFacilityCheckItem__FmsWorkCodeWorkType">
    <End Role="FmsWorkCodeType" Type="Self.FmsWorkCodeType" Multiplicity="1" />
    <End Role="FmsFacilityCheckItem" Type="Self.FmsFacilityCheckItem" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsWorkCodeType">
        <PropertyRef Name="WorkTypeId" />
      </Principal>
      <Dependent Role="FmsFacilityCheckItem">
        <PropertyRef Name="WorkTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsFacilityCodeClass__CmSite">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1">
      <OnDelete Action="Cascade" />
    </End>
    <End Role="FmsFacilityCodeClass" Type="Self.FmsFacilityCodeClass" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="FmsFacilityCodeClass">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsFacilityCodeClass__FmsFacilityCodeClass">
    <End Role="FmsFacilityCodeClass" Type="Self.FmsFacilityCodeClass" Multiplicity="0..1" />
    <End Role="FmsFacilityCodeClass1" Type="Self.FmsFacilityCodeClass" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsFacilityCodeClass">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FacilityClassId" />
      </Principal>
      <Dependent Role="FmsFacilityCodeClass1">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="ParentFacilityClassId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsFacilityOpera__725BF7F6">
    <End Role="CmFacility" Type="Self.CmFacility" Multiplicity="1" />
    <End Role="FmsFacilityOperationItem" Type="Self.FmsFacilityOperationItem" Multiplicity="0..1" />
    <ReferentialConstraint>
      <Principal Role="CmFacility">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FacilityCode" />
      </Principal>
      <Dependent Role="FmsFacilityOperationItem">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="ItemId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsLicense__CmBusinessField">
    <End Role="CmBusinessField" Type="Self.CmBusinessField" Multiplicity="0..1" />
    <End Role="FmsLicense" Type="Self.FmsLicense" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmBusinessField">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BusinessFieldId" />
      </Principal>
      <Dependent Role="FmsLicense">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BusinessFieldId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsLicense__CmSite">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="FmsLicense" Type="Self.FmsLicense" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="FmsLicense">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsMaterial__FmsMaterialCodeClass_AsFirstClassId">
    <End Role="FmsMaterialCodeClass" Type="Self.FmsMaterialCodeClass" Multiplicity="0..1" />
    <End Role="FmsMaterial" Type="Self.FmsMaterial" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsMaterialCodeClass">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="MaterialClassId" />
      </Principal>
      <Dependent Role="FmsMaterial">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FirstClassId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsMaterial__FmsMaterialCodeClass_AsSecondClassId">
    <End Role="FmsMaterialCodeClass" Type="Self.FmsMaterialCodeClass" Multiplicity="0..1" />
    <End Role="FmsMaterial" Type="Self.FmsMaterial" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsMaterialCodeClass">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="MaterialClassId" />
      </Principal>
      <Dependent Role="FmsMaterial">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="SecondClassId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsMaterial__FmsMaterialCodeClass_AsThirdClassId">
    <End Role="FmsMaterialCodeClass" Type="Self.FmsMaterialCodeClass" Multiplicity="0..1" />
    <End Role="FmsMaterial" Type="Self.FmsMaterial" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsMaterialCodeClass">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="MaterialClassId" />
      </Principal>
      <Dependent Role="FmsMaterial">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="ThirdClassId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsMaterialCarriedForward__CmBusinessField">
    <End Role="CmBusinessField" Type="Self.CmBusinessField" Multiplicity="1" />
    <End Role="FmsMaterialCarriedForward" Type="Self.FmsMaterialCarriedForward" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmBusinessField">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BusinessFieldId" />
      </Principal>
      <Dependent Role="FmsMaterialCarriedForward">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BusinessFieldId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsMaterialCarriedForward__CmSite">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="FmsMaterialCarriedForward" Type="Self.FmsMaterialCarriedForward" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="FmsMaterialCarriedForward">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsMaterialCodeClass__CmSite">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="FmsMaterialCodeClass" Type="Self.FmsMaterialCodeClass" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="FmsMaterialCodeClass">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsMaterialCodeClass__FmsMaterialCodeClass">
    <End Role="FmsMaterialCodeClass" Type="Self.FmsMaterialCodeClass" Multiplicity="0..1" />
    <End Role="FmsMaterialCodeClass1" Type="Self.FmsMaterialCodeClass" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsMaterialCodeClass">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="MaterialClassId" />
      </Principal>
      <Dependent Role="FmsMaterialCodeClass1">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="ParentMaterialClassId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsMaterialCodeLocation__CmBusinessField">
    <End Role="CmBusinessField" Type="Self.CmBusinessField" Multiplicity="1" />
    <End Role="FmsMaterialCodeLocation" Type="Self.FmsMaterialCodeLocation" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmBusinessField">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BusinessFieldId" />
      </Principal>
      <Dependent Role="FmsMaterialCodeLocation">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BusinessFieldId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsMaterialCodeLocation__CmSite">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="FmsMaterialCodeLocation" Type="Self.FmsMaterialCodeLocation" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="FmsMaterialCodeLocation">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsMaterialCodeType__CmSite">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="FmsMaterialCodeType" Type="Self.FmsMaterialCodeType" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="FmsMaterialCodeType">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsMaterialOrder__CmBusinessField">
    <End Role="CmBusinessField" Type="Self.CmBusinessField" Multiplicity="1" />
    <End Role="FmsMaterialPurchaseOrder" Type="Self.FmsMaterialPurchaseOrder" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmBusinessField">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BusinessFieldId" />
      </Principal>
      <Dependent Role="FmsMaterialPurchaseOrder">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BusinessFieldId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsMaterialOrder__CmSite">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="FmsMaterialPurchaseOrder" Type="Self.FmsMaterialPurchaseOrder" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="FmsMaterialPurchaseOrder">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsMaterialOrder__CmUser">
    <End Role="CmUser" Type="Self.CmUser" Multiplicity="1" />
    <End Role="FmsMaterialPurchaseOrder" Type="Self.FmsMaterialPurchaseOrder" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmUser">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="UserId" />
      </Principal>
      <Dependent Role="FmsMaterialPurchaseOrder">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="OrderUserId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsMaterialPurchaseOrder__CmFile">
    <End Role="CmFile" Type="Self.CmFile" Multiplicity="0..1" />
    <End Role="FmsMaterialPurchaseOrder" Type="Self.FmsMaterialPurchaseOrder" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmFile">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FileId" />
      </Principal>
      <Dependent Role="FmsMaterialPurchaseOrder">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FileId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsMaterialPurchaseOrder__FmsMaterialTradeCompany">
    <End Role="FmsMaterialTradeCompany" Type="Self.FmsMaterialTradeCompany" Multiplicity="0..1" />
    <End Role="FmsMaterialPurchaseOrder" Type="Self.FmsMaterialPurchaseOrder" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsMaterialTradeCompany">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="TradeCompanyId" />
      </Principal>
      <Dependent Role="FmsMaterialPurchaseOrder">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="TradeCompanyId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsMaterialPurchaseRequest__CmUser_AsRequestUserId">
    <End Role="CmUser" Type="Self.CmUser" Multiplicity="1" />
    <End Role="FmsMaterialPurchaseRequest" Type="Self.FmsMaterialPurchaseRequest" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmUser">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="UserId" />
      </Principal>
      <Dependent Role="FmsMaterialPurchaseRequest">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="RequestUserId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsMaterialPurchaseRequest__CmUser1_AsApprovalUserId">
    <End Role="CmUser" Type="Self.CmUser" Multiplicity="0..1" />
    <End Role="FmsMaterialPurchaseRequest" Type="Self.FmsMaterialPurchaseRequest" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmUser">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="UserId" />
      </Principal>
      <Dependent Role="FmsMaterialPurchaseRequest">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="ApprovalUserId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsMaterialPurchasingRequest__CmBusinessField">
    <End Role="CmBusinessField" Type="Self.CmBusinessField" Multiplicity="1" />
    <End Role="FmsMaterialPurchaseRequest" Type="Self.FmsMaterialPurchaseRequest" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmBusinessField">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BusinessFieldId" />
      </Principal>
      <Dependent Role="FmsMaterialPurchaseRequest">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BusinessFieldId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsMaterialPurchasingRequest__CmSite">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="FmsMaterialPurchaseRequest" Type="Self.FmsMaterialPurchaseRequest" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="FmsMaterialPurchaseRequest">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsMaterialPurchasingRequest__FmsMaterialCodeProcess">
    <End Role="FmsMaterialCodeProgress" Type="Self.FmsMaterialCodeProgress" Multiplicity="1" />
    <End Role="FmsMaterialPurchaseRequest" Type="Self.FmsMaterialPurchaseRequest" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsMaterialCodeProgress">
        <PropertyRef Name="ProgressId" />
      </Principal>
      <Dependent Role="FmsMaterialPurchaseRequest">
        <PropertyRef Name="ProgressId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsMaterialStored__CmBusinessField">
    <End Role="CmBusinessField" Type="Self.CmBusinessField" Multiplicity="1" />
    <End Role="FmsMaterialStored" Type="Self.FmsMaterialStored" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmBusinessField">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BusinessFieldId" />
      </Principal>
      <Dependent Role="FmsMaterialStored">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BusinessFieldId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsMaterialStored__CmSite">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="FmsMaterialStored" Type="Self.FmsMaterialStored" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="FmsMaterialStored">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsMaterialStored__CmUser_AsStoredUserId">
    <End Role="CmUser" Type="Self.CmUser" Multiplicity="1" />
    <End Role="FmsMaterialStored" Type="Self.FmsMaterialStored" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmUser">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="UserId" />
      </Principal>
      <Dependent Role="FmsMaterialStored">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="StoredUserId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsMaterialStored__CmUser1_AsApprovalUserId">
    <End Role="CmUser" Type="Self.CmUser" Multiplicity="0..1" />
    <End Role="FmsMaterialStored" Type="Self.FmsMaterialStored" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmUser">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="UserId" />
      </Principal>
      <Dependent Role="FmsMaterialStored">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="ApprovalUserId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsMaterialTradeCompany__CmSite">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="FmsMaterialTradeCompany" Type="Self.FmsMaterialTradeCompany" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="FmsMaterialTradeCompany">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsMaterialWarehouse__CmBusinessField">
    <End Role="CmBusinessField" Type="Self.CmBusinessField" Multiplicity="1" />
    <End Role="FmsMaterialWarehouse" Type="Self.FmsMaterialWarehouse" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmBusinessField">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BusinessFieldId" />
      </Principal>
      <Dependent Role="FmsMaterialWarehouse">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BusinessFieldId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsMaterialWarehouse__CmSite">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="FmsMaterialWarehouse" Type="Self.FmsMaterialWarehouse" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="FmsMaterialWarehouse">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsWorkCodeCauseClass__CmSite">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="FmsWorkCodeCauseClass" Type="Self.FmsWorkCodeCauseClass" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="FmsWorkCodeCauseClass">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsWorkCodeCycleUnit__CmSite">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="FmsWorkCodeCycleUnit" Type="Self.FmsWorkCodeCycleUnit" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="FmsWorkCodeCycleUnit">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsWorkCodeEmergency__CmSite">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="FmsWorkCodeEmergency" Type="Self.FmsWorkCodeEmergency" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="FmsWorkCodeEmergency">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsWorkCodeHolidayWorkType__CmSite">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="FmsWorkCodeHolidayWorkType" Type="Self.FmsWorkCodeHolidayWorkType" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="FmsWorkCodeHolidayWorkType">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsWorkCodeLegalInspectionAgency__CmSite">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="FmsWorkCodeLegalInspectionAgency" Type="Self.FmsWorkCodeLegalInspectionAgency" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="FmsWorkCodeLegalInspectionAgency">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsWorkOrder__CmBusinessField">
    <End Role="CmBusinessField" Type="Self.CmBusinessField" Multiplicity="1" />
    <End Role="FmsWorkOrder" Type="Self.FmsWorkOrder" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmBusinessField">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BusinessFieldId" />
      </Principal>
      <Dependent Role="FmsWorkOrder">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BusinessFieldId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsWorkOrder__CmSite">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="FmsWorkOrder" Type="Self.FmsWorkOrder" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="FmsWorkOrder">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsWorkOrder__CmUser">
    <End Role="CmUser" Type="Self.CmUser" Multiplicity="1" />
    <End Role="FmsWorkOrder" Type="Self.FmsWorkOrder" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmUser">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="UserId" />
      </Principal>
      <Dependent Role="FmsWorkOrder">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="OrderUserId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsWorkOrder__FmsWorkCodeEmergency">
    <End Role="FmsWorkCodeEmergency" Type="Self.FmsWorkCodeEmergency" Multiplicity="0..1" />
    <End Role="FmsWorkOrder" Type="Self.FmsWorkOrder" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsWorkCodeEmergency">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="EmergencyId" />
      </Principal>
      <Dependent Role="FmsWorkOrder">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="EmergencyId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsWorkOrder__FmsWorkRequest">
    <End Role="FmsWorkRequest" Type="Self.FmsWorkRequest" Multiplicity="1" />
    <End Role="FmsWorkOrder" Type="Self.FmsWorkOrder" Multiplicity="0..1" />
    <ReferentialConstraint>
      <Principal Role="FmsWorkRequest">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="WorkRequestId" />
      </Principal>
      <Dependent Role="FmsWorkOrder">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="WorkRequestId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsWorkOrderToFacility__FmsWorkOrder">
    <End Role="FmsWorkOrder" Type="Self.FmsWorkOrder" Multiplicity="1">
      <OnDelete Action="Cascade" />
    </End>
    <End Role="FmsWorkOrderToFacility" Type="Self.FmsWorkOrderToFacility" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsWorkOrder">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="WorkRequestId" />
      </Principal>
      <Dependent Role="FmsWorkOrderToFacility">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="WorkRequestId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsWorkRequest__CmBusinessField">
    <End Role="CmBusinessField" Type="Self.CmBusinessField" Multiplicity="1" />
    <End Role="FmsWorkRequest" Type="Self.FmsWorkRequest" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmBusinessField">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BusinessFieldId" />
      </Principal>
      <Dependent Role="FmsWorkRequest">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BusinessFieldId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsWorkRequest__CmSite">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="FmsWorkRequest" Type="Self.FmsWorkRequest" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="FmsWorkRequest">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsWorkRequest__CmUser_AsRequestUserId">
    <End Role="CmUser" Type="Self.CmUser" Multiplicity="0..1" />
    <End Role="FmsWorkRequest" Type="Self.FmsWorkRequest" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmUser">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="UserId" />
      </Principal>
      <Dependent Role="FmsWorkRequest">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="RequestUserId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsWorkRequest__CmUser1_AsRejectUserId">
    <End Role="CmUser" Type="Self.CmUser" Multiplicity="0..1" />
    <End Role="FmsWorkRequest" Type="Self.FmsWorkRequest" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmUser">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="UserId" />
      </Principal>
      <Dependent Role="FmsWorkRequest">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="RejectUserId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsWorkRequest__FmsWorkCodeProgress">
    <End Role="FmsWorkCodeProgress" Type="Self.FmsWorkCodeProgress" Multiplicity="1" />
    <End Role="FmsWorkRequest" Type="Self.FmsWorkRequest" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsWorkCodeProgress">
        <PropertyRef Name="WorkProgressId" />
      </Principal>
      <Dependent Role="FmsWorkRequest">
        <PropertyRef Name="WorkProgressId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsWorkRequest__FmsWorkCodeWorkType">
    <End Role="FmsWorkCodeType" Type="Self.FmsWorkCodeType" Multiplicity="1" />
    <End Role="FmsWorkRequest" Type="Self.FmsWorkRequest" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsWorkCodeType">
        <PropertyRef Name="WorkTypeId" />
      </Principal>
      <Dependent Role="FmsWorkRequest">
        <PropertyRef Name="WorkTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsWorkRequest__FmsWorkSchedule">
    <End Role="FmsWorkSchedule" Type="Self.FmsWorkSchedule" Multiplicity="0..1" />
    <End Role="FmsWorkRequest" Type="Self.FmsWorkRequest" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsWorkSchedule">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="WorkScheduleId" />
      </Principal>
      <Dependent Role="FmsWorkRequest">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="WorkScheduleId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsWorkRequestToFacility__FmsWorkRequest">
    <End Role="FmsWorkRequest" Type="Self.FmsWorkRequest" Multiplicity="1">
      <OnDelete Action="Cascade" />
    </End>
    <End Role="FmsWorkRequestToFacility" Type="Self.FmsWorkRequestToFacility" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsWorkRequest">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="WorkRequestId" />
      </Principal>
      <Dependent Role="FmsWorkRequestToFacility">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="WorkRequestId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsWorkResult__CmUser_AsWorkerUserId">
    <End Role="CmUser" Type="Self.CmUser" Multiplicity="1" />
    <End Role="FmsWorkResult" Type="Self.FmsWorkResult" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmUser">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="UserId" />
      </Principal>
      <Dependent Role="FmsWorkResult">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="WorkerUserId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsWorkResult__CmUser1_AsConfirmedUserId">
    <End Role="CmUser" Type="Self.CmUser" Multiplicity="0..1" />
    <End Role="FmsWorkResult" Type="Self.FmsWorkResult" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmUser">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="UserId" />
      </Principal>
      <Dependent Role="FmsWorkResult">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="ConfirmedUserId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsWorkResult__FmsWorkCodeCauseClass">
    <End Role="FmsWorkCodeCauseClass" Type="Self.FmsWorkCodeCauseClass" Multiplicity="0..1" />
    <End Role="FmsWorkResult" Type="Self.FmsWorkResult" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsWorkCodeCauseClass">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="CauseClassId" />
      </Principal>
      <Dependent Role="FmsWorkResult">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="CauseClassId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsWorkResult__FmsWorkOrder">
    <End Role="FmsWorkOrder" Type="Self.FmsWorkOrder" Multiplicity="1" />
    <End Role="FmsWorkResult" Type="Self.FmsWorkResult" Multiplicity="0..1" />
    <ReferentialConstraint>
      <Principal Role="FmsWorkOrder">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="WorkRequestId" />
      </Principal>
      <Dependent Role="FmsWorkResult">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="WorkRequestId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsWorkResult__FmsWorkRequest">
    <End Role="FmsWorkRequest" Type="Self.FmsWorkRequest" Multiplicity="1" />
    <End Role="FmsWorkResult" Type="Self.FmsWorkResult" Multiplicity="0..1" />
    <ReferentialConstraint>
      <Principal Role="FmsWorkRequest">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="WorkRequestId" />
      </Principal>
      <Dependent Role="FmsWorkResult">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="WorkRequestId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsWorkResultCheckItem__CmFacility">
    <End Role="CmFacility" Type="Self.CmFacility" Multiplicity="0..1" />
    <End Role="FmsWorkResultCheckItem" Type="Self.FmsWorkResultCheckItem" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmFacility">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FacilityCode" />
      </Principal>
      <Dependent Role="FmsWorkResultCheckItem">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FacilityCode" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsWorkResultCheckItem__FmsFacilityCheckItem">
    <End Role="FmsFacilityCheckItem" Type="Self.FmsFacilityCheckItem" Multiplicity="0..1" />
    <End Role="FmsWorkResultCheckItem" Type="Self.FmsWorkResultCheckItem" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsFacilityCheckItem">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FacilityCode" />
        <PropertyRef Name="CheckItemId" />
      </Principal>
      <Dependent Role="FmsWorkResultCheckItem">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FacilityCode" />
        <PropertyRef Name="CheckItemId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsWorkResultCheckItem__FmsWorkResult">
    <End Role="FmsWorkResult" Type="Self.FmsWorkResult" Multiplicity="1">
      <OnDelete Action="Cascade" />
    </End>
    <End Role="FmsWorkResultCheckItem" Type="Self.FmsWorkResultCheckItem" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsWorkResult">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="WorkRequestId" />
      </Principal>
      <Dependent Role="FmsWorkResultCheckItem">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="WorkRequestId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsWorkResultFile__CmFile">
    <End Role="CmFile" Type="Self.CmFile" Multiplicity="1" />
    <End Role="FmsWorkResultFile" Type="Self.FmsWorkResultFile" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmFile">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FileId" />
      </Principal>
      <Dependent Role="FmsWorkResultFile">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FileId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsWorkResultFile__FmsWorkResult">
    <End Role="FmsWorkResult" Type="Self.FmsWorkResult" Multiplicity="1" />
    <End Role="FmsWorkResultFile" Type="Self.FmsWorkResultFile" Multiplicity="0..1" />
    <ReferentialConstraint>
      <Principal Role="FmsWorkResult">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="WorkRequestId" />
      </Principal>
      <Dependent Role="FmsWorkResultFile">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="WorkRequestId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsWorkResultLaw__FmsWorkResult">
    <End Role="FmsWorkResult" Type="Self.FmsWorkResult" Multiplicity="1" />
    <End Role="FmsWorkResultLaw" Type="Self.FmsWorkResultLaw" Multiplicity="0..1" />
    <ReferentialConstraint>
      <Principal Role="FmsWorkResult">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="WorkRequestId" />
      </Principal>
      <Dependent Role="FmsWorkResultLaw">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="WorkRequestId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsWorkResultToFacility__CmFacility">
    <End Role="CmFacility" Type="Self.CmFacility" Multiplicity="1" />
    <End Role="FmsWorkResultToFacility" Type="Self.FmsWorkResultToFacility" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmFacility">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FacilityCode" />
      </Principal>
      <Dependent Role="FmsWorkResultToFacility">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FacilityCode" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsWorkResultToFacility__FmsWorkOrder">
    <End Role="FmsWorkResult" Type="Self.FmsWorkResult" Multiplicity="1">
      <OnDelete Action="Cascade" />
    </End>
    <End Role="FmsWorkResultToFacility" Type="Self.FmsWorkResultToFacility" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsWorkResult">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="WorkRequestId" />
      </Principal>
      <Dependent Role="FmsWorkResultToFacility">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="WorkRequestId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsWorkSchedule__CmBusinessField">
    <End Role="CmBusinessField" Type="Self.CmBusinessField" Multiplicity="1" />
    <End Role="FmsWorkSchedule" Type="Self.FmsWorkSchedule" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmBusinessField">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BusinessFieldId" />
      </Principal>
      <Dependent Role="FmsWorkSchedule">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BusinessFieldId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsWorkSchedule__CmUser">
    <End Role="CmUser" Type="Self.CmUser" Multiplicity="1" />
    <End Role="FmsWorkSchedule" Type="Self.FmsWorkSchedule" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmUser">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="UserId" />
      </Principal>
      <Dependent Role="FmsWorkSchedule">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="UpdateUserId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsWorkSchedule__FmsWorkCodeCycleUnit">
    <End Role="FmsWorkCodeCycleUnit" Type="Self.FmsWorkCodeCycleUnit" Multiplicity="1" />
    <End Role="FmsWorkSchedule" Type="Self.FmsWorkSchedule" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsWorkCodeCycleUnit">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="CycleUnitId" />
      </Principal>
      <Dependent Role="FmsWorkSchedule">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="CycleUnitId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsWorkSchedule__FmsWorkCodeHolidayWorkType">
    <End Role="FmsWorkCodeHolidayWorkType" Type="Self.FmsWorkCodeHolidayWorkType" Multiplicity="1" />
    <End Role="FmsWorkSchedule" Type="Self.FmsWorkSchedule" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsWorkCodeHolidayWorkType">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="HolidayWorkTypeId" />
      </Principal>
      <Dependent Role="FmsWorkSchedule">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="HolidayWorkTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsWorkSchedule__FmsWorkCodeWorkType">
    <End Role="FmsWorkCodeType" Type="Self.FmsWorkCodeType" Multiplicity="1" />
    <End Role="FmsWorkSchedule" Type="Self.FmsWorkSchedule" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsWorkCodeType">
        <PropertyRef Name="WorkTypeId" />
      </Principal>
      <Dependent Role="FmsWorkSchedule">
        <PropertyRef Name="WorkTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__FmsWorkScheduleToFacility__FmsWorkSchedule">
    <End Role="FmsWorkSchedule" Type="Self.FmsWorkSchedule" Multiplicity="1" />
    <End Role="FmsWorkScheduleToFacility" Type="Self.FmsWorkScheduleToFacility" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsWorkSchedule">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="WorkScheduleId" />
      </Principal>
      <Dependent Role="FmsWorkScheduleToFacility">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="WorkScheduleId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_BemsAlarmLog_BemsAlarmSetting">
    <End Role="BemsAlarmSetting" Type="Self.BemsAlarmSetting" Multiplicity="1" />
    <End Role="BemsAlarmLog" Type="Self.BemsAlarmLog" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="BemsAlarmSetting">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FacilityTypeId" />
        <PropertyRef Name="FacilityCode" />
        <PropertyRef Name="PropertyId" />
        <PropertyRef Name="FormulaId" />
      </Principal>
      <Dependent Role="BemsAlarmLog">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FacilityTypeId" />
        <PropertyRef Name="FacilityCode" />
        <PropertyRef Name="PropertyId" />
        <PropertyRef Name="FormulaId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_BemsAlarmSetting_BemsFacilityType">
    <End Role="BemsFacilityType" Type="Self.BemsFacilityType" Multiplicity="1" />
    <End Role="BemsAlarmSetting" Type="Self.BemsAlarmSetting" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="BemsFacilityType">
        <PropertyRef Name="FacilityTypeId" />
      </Principal>
      <Dependent Role="BemsAlarmSetting">
        <PropertyRef Name="FacilityTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_BemsAlarmSetting_CmFacility">
    <End Role="CmFacility" Type="Self.CmFacility" Multiplicity="1" />
    <End Role="BemsAlarmSetting" Type="Self.BemsAlarmSetting" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmFacility">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FacilityCode" />
      </Principal>
      <Dependent Role="BemsAlarmSetting">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FacilityCode" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_BemsAlarmSetting_CmSite1">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="BemsAlarmSetting" Type="Self.BemsAlarmSetting" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="BemsAlarmSetting">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_BemsChartInfo_BemsFacilityType">
    <End Role="BemsFacilityType" Type="Self.BemsFacilityType" Multiplicity="1" />
    <End Role="BemsChartInfo" Type="Self.BemsChartInfo" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="BemsFacilityType">
        <PropertyRef Name="FacilityTypeId" />
      </Principal>
      <Dependent Role="BemsChartInfo">
        <PropertyRef Name="FacilityTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_BemsChartInfo_CmSite">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="BemsChartInfo" Type="Self.BemsChartInfo" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="BemsChartInfo">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_BemsControlPointHistory_BemsFacilityType">
    <End Role="BemsFacilityType" Type="Self.BemsFacilityType" Multiplicity="1" />
    <End Role="BemsControlPointHistory" Type="Self.BemsControlPointHistory" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="BemsFacilityType">
        <PropertyRef Name="FacilityTypeId" />
      </Principal>
      <Dependent Role="BemsControlPointHistory">
        <PropertyRef Name="FacilityTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_BemsControlPointHistory_BemsMonitoringPoint">
    <End Role="BemsMonitoringPoint" Type="Self.BemsMonitoringPoint" Multiplicity="1" />
    <End Role="BemsControlPointHistory" Type="Self.BemsControlPointHistory" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="BemsMonitoringPoint">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FacilityCode" />
        <PropertyRef Name="PropertyId" />
      </Principal>
      <Dependent Role="BemsControlPointHistory">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FacilityCode" />
        <PropertyRef Name="PropertyId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_BemsEnergyCost_CmFacility">
    <End Role="CmFacility" Type="Self.CmFacility" Multiplicity="1" />
    <End Role="BemsEnergyCost" Type="Self.BemsEnergyCost" Multiplicity="0..1" />
    <ReferentialConstraint>
      <Principal Role="CmFacility">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FacilityCode" />
      </Principal>
      <Dependent Role="BemsEnergyCost">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FacilityCode" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_BemsEnergyDailyRegression_CmSite">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="BemsEnergyDailyRegression" Type="Self.BemsEnergyDailyRegression" Multiplicity="0..1" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="BemsEnergyDailyRegression">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_BemsFormulaParameter_CmFacility">
    <End Role="CmFacility" Type="Self.CmFacility" Multiplicity="1" />
    <End Role="BemsFormulaParameter" Type="Self.BemsFormulaParameter" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmFacility">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FacilityCode" />
      </Principal>
      <Dependent Role="BemsFormulaParameter">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FacilityCode" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_BemsMonitoringPoint_BemsFacilityType">
    <End Role="BemsFacilityType" Type="Self.BemsFacilityType" Multiplicity="1" />
    <End Role="BemsMonitoringPoint" Type="Self.BemsMonitoringPoint" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="BemsFacilityType">
        <PropertyRef Name="FacilityTypeId" />
      </Principal>
      <Dependent Role="BemsMonitoringPoint">
        <PropertyRef Name="FacilityTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_BemsMonitoringPoint_CmFacility">
    <End Role="CmFacility" Type="Self.CmFacility" Multiplicity="1" />
    <End Role="BemsMonitoringPoint" Type="Self.BemsMonitoringPoint" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmFacility">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FacilityCode" />
      </Principal>
      <Dependent Role="BemsMonitoringPoint">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FacilityCode" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_BemsMonitoringPointConfig_BemsFacilityType1">
    <End Role="BemsFacilityType" Type="Self.BemsFacilityType" Multiplicity="1" />
    <End Role="BemsMonitoringPointConfig" Type="Self.BemsMonitoringPointConfig" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="BemsFacilityType">
        <PropertyRef Name="FacilityTypeId" />
      </Principal>
      <Dependent Role="BemsMonitoringPointConfig">
        <PropertyRef Name="FacilityTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_BemsMonitoringPointConfig_BemsMonitoringPoint">
    <End Role="BemsMonitoringPoint" Type="Self.BemsMonitoringPoint" Multiplicity="1" />
    <End Role="BemsMonitoringPointConfig" Type="Self.BemsMonitoringPointConfig" Multiplicity="0..1" />
    <ReferentialConstraint>
      <Principal Role="BemsMonitoringPoint">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FacilityCode" />
        <PropertyRef Name="PropertyId" />
      </Principal>
      <Dependent Role="BemsMonitoringPointConfig">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FacilityCode" />
        <PropertyRef Name="PropertyId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_BemsPeakFacility_CmFacility">
    <End Role="CmFacility" Type="Self.CmFacility" Multiplicity="1" />
    <End Role="BemsPeakFacility" Type="Self.BemsPeakFacility" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmFacility">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FacilityCode" />
      </Principal>
      <Dependent Role="BemsPeakFacility">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FacilityCode" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_BemsPeakHIstory_CmSite">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="BemsPeakHistory" Type="Self.BemsPeakHistory" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="BemsPeakHistory">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_BemsPeakInfo_CmSite">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="BemsPeakInfo" Type="Self.BemsPeakInfo" Multiplicity="0..1" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="BemsPeakInfo">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_BemsPeopleIncrease_CmSite">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="BemsPeopleIncrease" Type="Self.BemsPeopleIncrease" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="BemsPeopleIncrease">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_BemsPriceCode_BemsFuelType">
    <End Role="BemsFuelType" Type="Self.BemsFuelType" Multiplicity="1" />
    <End Role="BemsPriceCode" Type="Self.BemsPriceCode" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="BemsFuelType">
        <PropertyRef Name="FuelTypeId" />
      </Principal>
      <Dependent Role="BemsPriceCode">
        <PropertyRef Name="FuelTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_BemsPriceFormula_BemsFormula">
    <End Role="BemsFormula" Type="Self.BemsFormula" Multiplicity="1" />
    <End Role="BemsPriceFormula" Type="Self.BemsPriceFormula" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="BemsFormula">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FacilityTypeId" />
        <PropertyRef Name="FacilityCode" />
        <PropertyRef Name="FormulaId" />
      </Principal>
      <Dependent Role="BemsPriceFormula">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FacilityTypeId" />
        <PropertyRef Name="FacilityCode" />
        <PropertyRef Name="FormulaId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_BemsPriceFormula_BemsPriceType">
    <End Role="BemsPriceType" Type="Self.BemsPriceType" Multiplicity="1" />
    <End Role="BemsPriceFormula" Type="Self.BemsPriceFormula" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="BemsPriceType">
        <PropertyRef Name="PriceTypeId" />
      </Principal>
      <Dependent Role="BemsPriceFormula">
        <PropertyRef Name="PriceTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_BemsPriceMeta_BemsPriceType">
    <End Role="BemsPriceType" Type="Self.BemsPriceType" Multiplicity="1" />
    <End Role="BemsPriceMeta" Type="Self.BemsPriceMeta" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="BemsPriceType">
        <PropertyRef Name="PriceTypeId" />
      </Principal>
      <Dependent Role="BemsPriceMeta">
        <PropertyRef Name="PriceTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_BemsPriceType_BemsFuelType1">
    <End Role="BemsFuelType" Type="Self.BemsFuelType" Multiplicity="1" />
    <End Role="BemsPriceType" Type="Self.BemsPriceType" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="BemsFuelType">
        <PropertyRef Name="FuelTypeId" />
      </Principal>
      <Dependent Role="BemsPriceType">
        <PropertyRef Name="FuelTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_BemsRentalRate_CmSite">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="BemsRentalRate" Type="Self.BemsRentalRate" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="BemsRentalRate">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_BemsSitePrice_BemsFuelType">
    <End Role="BemsFuelType" Type="Self.BemsFuelType" Multiplicity="1" />
    <End Role="BemsSitePrice" Type="Self.BemsSitePrice" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="BemsFuelType">
        <PropertyRef Name="FuelTypeId" />
      </Principal>
      <Dependent Role="BemsSitePrice">
        <PropertyRef Name="FuelTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_BemsSitePrice_BemsPriceCode">
    <End Role="BemsPriceCode" Type="Self.BemsPriceCode" Multiplicity="1" />
    <End Role="BemsSitePrice" Type="Self.BemsSitePrice" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="BemsPriceCode">
        <PropertyRef Name="PriceCode" />
      </Principal>
      <Dependent Role="BemsSitePrice">
        <PropertyRef Name="PriceCode" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_BemsSitePrice_BemsPriceType">
    <End Role="BemsPriceType" Type="Self.BemsPriceType" Multiplicity="1" />
    <End Role="BemsSitePrice" Type="Self.BemsSitePrice" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="BemsPriceType">
        <PropertyRef Name="PriceTypeId" />
      </Principal>
      <Dependent Role="BemsSitePrice">
        <PropertyRef Name="PriceTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_BemsSitePrice_CmSite1">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="BemsSitePrice" Type="Self.BemsSitePrice" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="BemsSitePrice">
        <PropertyRef Name="SiteID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_BemsSitePriceHistory_BemsFuelType">
    <End Role="BemsFuelType" Type="Self.BemsFuelType" Multiplicity="1" />
    <End Role="BemsSitePriceHistory" Type="Self.BemsSitePriceHistory" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="BemsFuelType">
        <PropertyRef Name="FuelTypeId" />
      </Principal>
      <Dependent Role="BemsSitePriceHistory">
        <PropertyRef Name="FuelTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_BemsSitePriceHistory_BemsPriceCode">
    <End Role="BemsPriceCode" Type="Self.BemsPriceCode" Multiplicity="1" />
    <End Role="BemsSitePriceHistory" Type="Self.BemsSitePriceHistory" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="BemsPriceCode">
        <PropertyRef Name="PriceCode" />
      </Principal>
      <Dependent Role="BemsSitePriceHistory">
        <PropertyRef Name="PriceCode" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_BemsSitePriceHistory_BemsPriceType">
    <End Role="BemsPriceType" Type="Self.BemsPriceType" Multiplicity="1" />
    <End Role="BemsSitePriceHistory" Type="Self.BemsSitePriceHistory" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="BemsPriceType">
        <PropertyRef Name="PriceTypeId" />
      </Principal>
      <Dependent Role="BemsSitePriceHistory">
        <PropertyRef Name="PriceTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_BemsSitePriceHistory_CmSite">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="BemsSitePriceHistory" Type="Self.BemsSitePriceHistory" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="BemsSitePriceHistory">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CmAnnouncement_CmBusinessField">
    <End Role="CmBusinessField" Type="Self.CmBusinessField" Multiplicity="1" />
    <End Role="CmAnnouncement" Type="Self.CmAnnouncement" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmBusinessField">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BusinessFieldId" />
      </Principal>
      <Dependent Role="CmAnnouncement">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BusinessFieldId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CmAnnouncement_CmFile">
    <End Role="CmFile" Type="Self.CmFile" Multiplicity="0..1" />
    <End Role="CmAnnouncement" Type="Self.CmAnnouncement" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmFile">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FileId" />
      </Principal>
      <Dependent Role="CmAnnouncement">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FileId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CmAnnouncement_CmUser">
    <End Role="CmUser" Type="Self.CmUser" Multiplicity="1" />
    <End Role="CmAnnouncement" Type="Self.CmAnnouncement" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmUser">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="UserId" />
      </Principal>
      <Dependent Role="CmAnnouncement">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="RegisterUserId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CmFacilityTempSet_CmFacility">
    <End Role="CmFacility" Type="Self.CmFacility" Multiplicity="1" />
    <End Role="CmFacilityTempSet" Type="Self.CmFacilityTempSet" Multiplicity="0..1" />
    <ReferentialConstraint>
      <Principal Role="CmFacility">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FacilityCode" />
      </Principal>
      <Dependent Role="CmFacilityTempSet">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FacilityCode" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CmFacilityTempSet_CmSite">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="CmFacilityTempSet" Type="Self.CmFacilityTempSet" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="CmFacilityTempSet">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CmMenu_CmSite">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="CmMenu" Type="Self.CmMenu" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="CmMenu">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CmPartnerType_CmPartner">
    <End Role="CmPartnerType" Type="Self.CmPartnerType" Multiplicity="1" />
    <End Role="CmPartner" Type="Self.CmPartner" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmPartnerType">
        <PropertyRef Name="PartnerTypeId" />
      </Principal>
      <Dependent Role="CmPartner">
        <PropertyRef Name="PartnerTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CmPatrolCourse_CmSite">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="CmPatrolCourse" Type="Self.CmPatrolCourse" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="CmPatrolCourse">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CmPatrolCoursePos_CmPatrolCourse">
    <End Role="CmPatrolCourse" Type="Self.CmPatrolCourse" Multiplicity="1" />
    <End Role="CmPatrolCoursePos" Type="Self.CmPatrolCoursePos" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmPatrolCourse">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="PatrolCourseId" />
      </Principal>
      <Dependent Role="CmPatrolCoursePos">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="PatrolCourseId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CmPatrolCoursePos_CmSite">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="CmPatrolCoursePos" Type="Self.CmPatrolCoursePos" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="CmPatrolCoursePos">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CmPatrolGroup_CmSite">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="CmPatrolGroup" Type="Self.CmPatrolGroup" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="CmPatrolGroup">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CmPatrolGroupUser_CmPatrolGroup">
    <End Role="CmPatrolGroup" Type="Self.CmPatrolGroup" Multiplicity="1" />
    <End Role="CmPatrolGroupUser" Type="Self.CmPatrolGroupUser" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmPatrolGroup">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="PatrolGroupId" />
      </Principal>
      <Dependent Role="CmPatrolGroupUser">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="PatrolGroupId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CmPatrolGroupUser_CmUser">
    <End Role="CmUser" Type="Self.CmUser" Multiplicity="1" />
    <End Role="CmPatrolGroupUser" Type="Self.CmPatrolGroupUser" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmUser">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="UserId" />
      </Principal>
      <Dependent Role="CmPatrolGroupUser">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="UserId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CmPatrolHistory_CmPatrolSchedule">
    <End Role="CmPatrolSchedule" Type="Self.CmPatrolSchedule" Multiplicity="1" />
    <End Role="CmPatrolHistory" Type="Self.CmPatrolHistory" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmPatrolSchedule">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="ScheduleId" />
      </Principal>
      <Dependent Role="CmPatrolHistory">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="ScheduleId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CmPatrolHistory_CmPatrolType">
    <End Role="CmPatrolType" Type="Self.CmPatrolType" Multiplicity="1" />
    <End Role="CmPatrolHistory" Type="Self.CmPatrolHistory" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmPatrolType">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="PatrolTypeId" />
      </Principal>
      <Dependent Role="CmPatrolHistory">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="resultTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CmPatrolHistory_CmSite">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="CmPatrolHistory" Type="Self.CmPatrolHistory" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="CmPatrolHistory">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CmPatrolHistoryPos_CmPatrolPos">
    <End Role="CmPatrolPos" Type="Self.CmPatrolPos" Multiplicity="1" />
    <End Role="CmPatrolHistoryPos" Type="Self.CmPatrolHistoryPos" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmPatrolPos">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="PosId" />
      </Principal>
      <Dependent Role="CmPatrolHistoryPos">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="PosId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CmPatrolHistoryPos_CmPatrolType">
    <End Role="CmPatrolType" Type="Self.CmPatrolType" Multiplicity="1" />
    <End Role="CmPatrolHistoryPos" Type="Self.CmPatrolHistoryPos" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmPatrolType">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="PatrolTypeId" />
      </Principal>
      <Dependent Role="CmPatrolHistoryPos">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="resultType" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CmPatrolHistoryPos_CmSite">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="CmPatrolHistoryPos" Type="Self.CmPatrolHistoryPos" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="CmPatrolHistoryPos">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CmPatrolPlan_CmPatrolCourse">
    <End Role="CmPatrolCourse" Type="Self.CmPatrolCourse" Multiplicity="1" />
    <End Role="CmPatrolPlan" Type="Self.CmPatrolPlan" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmPatrolCourse">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="PatrolCourseId" />
      </Principal>
      <Dependent Role="CmPatrolPlan">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="CourseId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CmPatrolPlan_CmPatrolGroup">
    <End Role="CmPatrolGroup" Type="Self.CmPatrolGroup" Multiplicity="1" />
    <End Role="CmPatrolPlan" Type="Self.CmPatrolPlan" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmPatrolGroup">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="PatrolGroupId" />
      </Principal>
      <Dependent Role="CmPatrolPlan">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="GroupId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CmPatrolPlan_CmSite">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="CmPatrolPlan" Type="Self.CmPatrolPlan" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="CmPatrolPlan">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CmPatrolPos_CmBuilding">
    <End Role="CmBuilding" Type="Self.CmBuilding" Multiplicity="1" />
    <End Role="CmPatrolPos" Type="Self.CmPatrolPos" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmBuilding">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BuildingId" />
      </Principal>
      <Dependent Role="CmPatrolPos">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BuildingId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CmPatrolPos_CmFloor">
    <End Role="CmFloor" Type="Self.CmFloor" Multiplicity="1" />
    <End Role="CmPatrolPos" Type="Self.CmPatrolPos" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmFloor">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BuildingId" />
        <PropertyRef Name="FloorId" />
      </Principal>
      <Dependent Role="CmPatrolPos">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BuildingId" />
        <PropertyRef Name="FloorId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CmPatrolPos_CmSite">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="CmPatrolPos" Type="Self.CmPatrolPos" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="CmPatrolPos">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CmPatrolSchedule_CmPatrolPlan">
    <End Role="CmPatrolPlan" Type="Self.CmPatrolPlan" Multiplicity="1" />
    <End Role="CmPatrolSchedule" Type="Self.CmPatrolSchedule" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmPatrolPlan">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="PatrolPlanId" />
      </Principal>
      <Dependent Role="CmPatrolSchedule">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="PlanId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CmPatrolSchedule_CmSite">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="CmPatrolSchedule" Type="Self.CmPatrolSchedule" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="CmPatrolSchedule">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CmPatrolType_CmSite">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="CmPatrolType" Type="Self.CmPatrolType" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="CmPatrolType">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CmUser_CmBusinessField">
    <End Role="CmBusinessField" Type="Self.CmBusinessField" Multiplicity="0..1" />
    <End Role="CmUser" Type="Self.CmUser" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmBusinessField">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BusinessFieldId" />
      </Principal>
      <Dependent Role="CmUser">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BusinessFieldId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CmUser_CmCompany">
    <End Role="CmCompany" Type="Self.CmCompany" Multiplicity="0..1" />
    <End Role="CmUser" Type="Self.CmUser" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmCompany">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="CompanyId" />
      </Principal>
      <Dependent Role="CmUser">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="CompanyId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CmUser_CmDepartment">
    <End Role="CmDepartment" Type="Self.CmDepartment" Multiplicity="0..1" />
    <End Role="CmUser" Type="Self.CmUser" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmDepartment">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="CompanyId" />
        <PropertyRef Name="DepartmentId" />
      </Principal>
      <Dependent Role="CmUser">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="CompanyId" />
        <PropertyRef Name="DepartmentId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CmUser_CmPosition">
    <End Role="CmPosition" Type="Self.CmPosition" Multiplicity="0..1" />
    <End Role="CmUser" Type="Self.CmUser" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmPosition">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="PositionId" />
      </Principal>
      <Dependent Role="CmUser">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="PositionId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CmUser_CmUserGroup">
    <End Role="CmUserGroup" Type="Self.CmUserGroup" Multiplicity="0..1" />
    <End Role="CmUser" Type="Self.CmUser" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmUserGroup">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="UserGroupId" />
      </Principal>
      <Dependent Role="CmUser">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="UserGroupId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CmUserLoginHistory_CmUser">
    <End Role="CmUser" Type="Self.CmUser" Multiplicity="1" />
    <End Role="CmUserLoginHistory" Type="Self.CmUserLoginHistory" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmUser">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="UserId" />
      </Principal>
      <Dependent Role="CmUserLoginHistory">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="UserId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CmZoneTempHumiSet_CmBuilding">
    <End Role="CmBuilding" Type="Self.CmBuilding" Multiplicity="1" />
    <End Role="CmZoneTempHumiSet" Type="Self.CmZoneTempHumiSet" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmBuilding">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BuildingId" />
      </Principal>
      <Dependent Role="CmZoneTempHumiSet">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BuildingId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CmZoneTempHumiSet_CmFloor">
    <End Role="CmFloor" Type="Self.CmFloor" Multiplicity="1" />
    <End Role="CmZoneTempHumiSet" Type="Self.CmZoneTempHumiSet" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmFloor">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BuildingId" />
        <PropertyRef Name="FloorId" />
      </Principal>
      <Dependent Role="CmZoneTempHumiSet">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BuildingId" />
        <PropertyRef Name="FloorId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CmZoneTempHumiSet_CmSite">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="CmZoneTempHumiSet" Type="Self.CmZoneTempHumiSet" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="CmZoneTempHumiSet">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CmZoneTempHumiSet_CmZone">
    <End Role="CmZone" Type="Self.CmZone" Multiplicity="1" />
    <End Role="CmZoneTempHumiSet" Type="Self.CmZoneTempHumiSet" Multiplicity="0..1" />
    <ReferentialConstraint>
      <Principal Role="CmZone">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BuildingId" />
        <PropertyRef Name="FloorId" />
        <PropertyRef Name="ZoneId" />
      </Principal>
      <Dependent Role="CmZoneTempHumiSet">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BuildingId" />
        <PropertyRef Name="FloorId" />
        <PropertyRef Name="ZoneId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsAccident_CmCompany">
    <End Role="CmCompany" Type="Self.CmCompany" Multiplicity="0..1" />
    <End Role="FmsAccident" Type="Self.FmsAccident" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmCompany">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="CompanyId" />
      </Principal>
      <Dependent Role="FmsAccident">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="CompanyId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsAccident_CmDepartment">
    <End Role="CmDepartment" Type="Self.CmDepartment" Multiplicity="0..1" />
    <End Role="FmsAccident" Type="Self.FmsAccident" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmDepartment">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="CompanyId" />
        <PropertyRef Name="DepartmentId" />
      </Principal>
      <Dependent Role="FmsAccident">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="CompanyId" />
        <PropertyRef Name="DepartmentId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsAccident_CmFile1">
    <End Role="CmFile" Type="Self.CmFile" Multiplicity="0..1" />
    <End Role="FmsAccident" Type="Self.FmsAccident" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmFile">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FileId" />
      </Principal>
      <Dependent Role="FmsAccident">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FileId1" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsAccident_CmFile2">
    <End Role="CmFile" Type="Self.CmFile" Multiplicity="0..1" />
    <End Role="FmsAccident" Type="Self.FmsAccident" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmFile">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FileId" />
      </Principal>
      <Dependent Role="FmsAccident">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FileId2" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsAccident_CmFile3">
    <End Role="CmFile" Type="Self.CmFile" Multiplicity="0..1" />
    <End Role="FmsAccident" Type="Self.FmsAccident" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmFile">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FileId" />
      </Principal>
      <Dependent Role="FmsAccident">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FileId3" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsAccident_FmsAccidentCodeType">
    <End Role="FmsAccidentCodeType" Type="Self.FmsAccidentCodeType" Multiplicity="1" />
    <End Role="FmsAccident" Type="Self.FmsAccident" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsAccidentCodeType">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="AccidentTypeId" />
      </Principal>
      <Dependent Role="FmsAccident">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="AccidentTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsBudgetDetail_FmsBudget">
    <End Role="FmsBudget" Type="Self.FmsBudget" Multiplicity="1">
      <OnDelete Action="Cascade" />
    </End>
    <End Role="FmsBudgetDetail" Type="Self.FmsBudgetDetail" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsBudget">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="Year" />
      </Principal>
      <Dependent Role="FmsBudgetDetail">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="Year" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsBudgetDetail_FmsBudgetCodeClass">
    <End Role="FmsBudgetCodeClass" Type="Self.FmsBudgetCodeClass" Multiplicity="1" />
    <End Role="FmsBudgetDetail" Type="Self.FmsBudgetDetail" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsBudgetCodeClass">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BudgetClassId" />
      </Principal>
      <Dependent Role="FmsBudgetDetail">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BudgetClassId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsBudgetDetailExecution_FmsBudgetDetail">
    <End Role="FmsBudgetDetail" Type="Self.FmsBudgetDetail" Multiplicity="1" />
    <End Role="FmsBudgetDetailExecution" Type="Self.FmsBudgetDetailExecution" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsBudgetDetail">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="Year" />
        <PropertyRef Name="BudgetClassId" />
        <PropertyRef Name="ParentBudgetClassId" />
      </Principal>
      <Dependent Role="FmsBudgetDetailExecution">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="Year" />
        <PropertyRef Name="BudgetClassId" />
        <PropertyRef Name="ParentBudgetClassId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsConstruction_CmFile1">
    <End Role="CmFile" Type="Self.CmFile" Multiplicity="0..1" />
    <End Role="FmsConstruction" Type="Self.FmsConstruction" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmFile">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FileId" />
      </Principal>
      <Dependent Role="FmsConstruction">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FileId1" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsConstruction_CmFile2">
    <End Role="CmFile" Type="Self.CmFile" Multiplicity="0..1" />
    <End Role="FmsConstruction" Type="Self.FmsConstruction" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmFile">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FileId" />
      </Principal>
      <Dependent Role="FmsConstruction">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FileId2" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsConstruction_CmFile3">
    <End Role="CmFile" Type="Self.CmFile" Multiplicity="0..1" />
    <End Role="FmsConstruction" Type="Self.FmsConstruction" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmFile">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FileId" />
      </Principal>
      <Dependent Role="FmsConstruction">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FileId3" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsConstruction_CmPartner">
    <End Role="CmPartner" Type="Self.CmPartner" Multiplicity="1" />
    <End Role="FmsConstruction" Type="Self.FmsConstruction" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmPartner">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="PartnerId" />
      </Principal>
      <Dependent Role="FmsConstruction">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="PartnerId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsConstruction_FmsConstructionCodeProgress">
    <End Role="FmsConstructionCodeProgress" Type="Self.FmsConstructionCodeProgress" Multiplicity="1" />
    <End Role="FmsConstruction" Type="Self.FmsConstruction" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsConstructionCodeProgress">
        <PropertyRef Name="ProgressId" />
      </Principal>
      <Dependent Role="FmsConstruction">
        <PropertyRef Name="ProgressId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsConstruction_FmsConstructionCodeType">
    <End Role="FmsConstructionCodeType" Type="Self.FmsConstructionCodeType" Multiplicity="1" />
    <End Role="FmsConstruction" Type="Self.FmsConstruction" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsConstructionCodeType">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="ConstructionTypeId" />
      </Principal>
      <Dependent Role="FmsConstruction">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="ConstructionTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsConstructionEstimation_CmUser">
    <End Role="CmUser" Type="Self.CmUser" Multiplicity="1" />
    <End Role="FmsConstructionEstimation" Type="Self.FmsConstructionEstimation" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmUser">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="UserId" />
      </Principal>
      <Dependent Role="FmsConstructionEstimation">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="EstimateUserId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsConstructionEstimation_FmsConstruction">
    <End Role="FmsConstruction" Type="Self.FmsConstruction" Multiplicity="1" />
    <End Role="FmsConstructionEstimation" Type="Self.FmsConstructionEstimation" Multiplicity="0..1" />
    <ReferentialConstraint>
      <Principal Role="FmsConstruction">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="ConstructionId" />
      </Principal>
      <Dependent Role="FmsConstructionEstimation">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="ConstructionId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsContract_CmPartner">
    <End Role="CmPartner" Type="Self.CmPartner" Multiplicity="0..1" />
    <End Role="FmsContract" Type="Self.FmsContract" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmPartner">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="PartnerId" />
      </Principal>
      <Dependent Role="FmsContract">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="PartnerId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsContract_CmPartnerType">
    <End Role="CmPartnerType" Type="Self.CmPartnerType" Multiplicity="0..1" />
    <End Role="FmsContract" Type="Self.FmsContract" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmPartnerType">
        <PropertyRef Name="PartnerTypeId" />
      </Principal>
      <Dependent Role="FmsContract">
        <PropertyRef Name="PartnerTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsContract_FmsContractClass">
    <End Role="FmsContractClass" Type="Self.FmsContractClass" Multiplicity="0..1" />
    <End Role="FmsContract" Type="Self.FmsContract" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsContractClass">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="ContractClassId" />
      </Principal>
      <Dependent Role="FmsContract">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="ContractClassId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsContract_FmsContractMethod">
    <End Role="FmsContractMethod" Type="Self.FmsContractMethod" Multiplicity="0..1" />
    <End Role="FmsContract" Type="Self.FmsContract" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsContractMethod">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="ContractMethodId" />
      </Principal>
      <Dependent Role="FmsContract">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="ContractMethodId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsContract_FmsContractType">
    <End Role="FmsContractType" Type="Self.FmsContractType" Multiplicity="0..1" />
    <End Role="FmsContract" Type="Self.FmsContract" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsContractType">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="ContractTypeId" />
      </Principal>
      <Dependent Role="FmsContract">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="ContractTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsContract_FmsPaymentType">
    <End Role="FmsPaymentType" Type="Self.FmsPaymentType" Multiplicity="0..1" />
    <End Role="FmsContract" Type="Self.FmsContract" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsPaymentType">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="PaymentTypeId" />
      </Principal>
      <Dependent Role="FmsContract">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="PartnerTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsDailyCheckReport_CmUser">
    <End Role="CmUser" Type="Self.CmUser" Multiplicity="1" />
    <End Role="FmsDailyCheckReport" Type="Self.FmsDailyCheckReport" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmUser">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="UserId" />
      </Principal>
      <Dependent Role="FmsDailyCheckReport">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="RegisterUserId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsDailyReport_CmBusinessField">
    <End Role="CmBusinessField" Type="Self.CmBusinessField" Multiplicity="1" />
    <End Role="FmsDailyReport" Type="Self.FmsDailyReport" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmBusinessField">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BusinessFieldId" />
      </Principal>
      <Dependent Role="FmsDailyReport">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BusinessFieldId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsDailyReport_CmUser">
    <End Role="CmUser" Type="Self.CmUser" Multiplicity="1" />
    <End Role="FmsDailyReport" Type="Self.FmsDailyReport" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmUser">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="UserId" />
      </Principal>
      <Dependent Role="FmsDailyReport">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="RegisterUserId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsEquipment_CmUser">
    <End Role="CmUser" Type="Self.CmUser" Multiplicity="1" />
    <End Role="FmsEquipment" Type="Self.FmsEquipment" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmUser">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="UserId" />
      </Principal>
      <Dependent Role="FmsEquipment">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="RegisterUserId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsEquipment_FmsEquipmentCodeType">
    <End Role="FmsEquipmentCodeType" Type="Self.FmsEquipmentCodeType" Multiplicity="1" />
    <End Role="FmsEquipment" Type="Self.FmsEquipment" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsEquipmentCodeType">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="EquipmentTypeId" />
      </Principal>
      <Dependent Role="FmsEquipment">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="EquipmentTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsEquipment_FmsMaterialWarehouse">
    <End Role="FmsMaterialWarehouse" Type="Self.FmsMaterialWarehouse" Multiplicity="0..1" />
    <End Role="FmsEquipment" Type="Self.FmsEquipment" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsMaterialWarehouse">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="WarehouseId" />
      </Principal>
      <Dependent Role="FmsEquipment">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="WarehouseId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsEquipmentHistory_FmsEquipment">
    <End Role="FmsEquipment" Type="Self.FmsEquipment" Multiplicity="1" />
    <End Role="FmsEquipmentHistory" Type="Self.FmsEquipmentHistory" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsEquipment">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="EquipmentId" />
      </Principal>
      <Dependent Role="FmsEquipmentHistory">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="EquipmentId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsEquipmentHistory_FmsEquipmentCodeStateType">
    <End Role="FmsEquipmentCodeStateType" Type="Self.FmsEquipmentCodeStateType" Multiplicity="0..1" />
    <End Role="FmsEquipmentHistory" Type="Self.FmsEquipmentHistory" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsEquipmentCodeStateType">
        <PropertyRef Name="EquipmentStateTypeId" />
      </Principal>
      <Dependent Role="FmsEquipmentHistory">
        <PropertyRef Name="EquipmentStateTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsEquipmentHistory_FmsEquipmentRentInfo">
    <End Role="FmsEquipmentRentInfo" Type="Self.FmsEquipmentRentInfo" Multiplicity="0..1">
      <OnDelete Action="Cascade" />
    </End>
    <End Role="FmsEquipmentHistory" Type="Self.FmsEquipmentHistory" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsEquipmentRentInfo">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="EquipmentRentId" />
      </Principal>
      <Dependent Role="FmsEquipmentHistory">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="EquipmentRentId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsEquipmentRentInfo_CmUser">
    <End Role="CmUser" Type="Self.CmUser" Multiplicity="1" />
    <End Role="FmsEquipmentRentInfo" Type="Self.FmsEquipmentRentInfo" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmUser">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="UserId" />
      </Principal>
      <Dependent Role="FmsEquipmentRentInfo">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="RegisterUserId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsEquipmentRentInfo_CmUser1">
    <End Role="CmUser" Type="Self.CmUser" Multiplicity="0..1" />
    <End Role="FmsEquipmentRentInfo" Type="Self.FmsEquipmentRentInfo" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmUser">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="UserId" />
      </Principal>
      <Dependent Role="FmsEquipmentRentInfo">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="RentUserId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsEquipmentRentInfo_FmsEquipmentCodeStateType">
    <End Role="FmsEquipmentCodeStateType" Type="Self.FmsEquipmentCodeStateType" Multiplicity="0..1" />
    <End Role="FmsEquipmentRentInfo" Type="Self.FmsEquipmentRentInfo" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsEquipmentCodeStateType">
        <PropertyRef Name="EquipmentStateTypeId" />
      </Principal>
      <Dependent Role="FmsEquipmentRentInfo">
        <PropertyRef Name="EquipmentStateTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsFacilityOperationReport_CmUser">
    <End Role="CmUser" Type="Self.CmUser" Multiplicity="1" />
    <End Role="FmsFacilityOperationReport" Type="Self.FmsFacilityOperationReport" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmUser">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="UserId" />
      </Principal>
      <Dependent Role="FmsFacilityOperationReport">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="RegisterUserId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsManual_FmsManualType">
    <End Role="FmsManualType" Type="Self.FmsManualType" Multiplicity="1" />
    <End Role="FmsManual" Type="Self.FmsManual" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsManualType">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="ManualTypeId" />
      </Principal>
      <Dependent Role="FmsManual">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="ManualTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsManualHistory_CmFile">
    <End Role="CmFile" Type="Self.CmFile" Multiplicity="0..1" />
    <End Role="FmsManualHistory" Type="Self.FmsManualHistory" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmFile">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FileId" />
      </Principal>
      <Dependent Role="FmsManualHistory">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FileId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsManualHistory_CmUser">
    <End Role="CmUser" Type="Self.CmUser" Multiplicity="0..1" />
    <End Role="FmsManualHistory" Type="Self.FmsManualHistory" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmUser">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="UserId" />
      </Principal>
      <Dependent Role="FmsManualHistory">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="UpdatedUserId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsManualHistory_FmsManual">
    <End Role="FmsManual" Type="Self.FmsManual" Multiplicity="1" />
    <End Role="FmsManualHistory" Type="Self.FmsManualHistory" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsManual">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="ManualId" />
      </Principal>
      <Dependent Role="FmsManualHistory">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="ManualId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsMaterial_CmBusinessField">
    <End Role="CmBusinessField" Type="Self.CmBusinessField" Multiplicity="1" />
    <End Role="FmsMaterial" Type="Self.FmsMaterial" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmBusinessField">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BusinessFieldId" />
      </Principal>
      <Dependent Role="FmsMaterial">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BusinessFieldId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsMaterial_CmFile">
    <End Role="CmFile" Type="Self.CmFile" Multiplicity="0..1" />
    <End Role="FmsMaterial" Type="Self.FmsMaterial" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmFile">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FileId" />
      </Principal>
      <Dependent Role="FmsMaterial">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="ImageFileId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsMaterial_CmSite">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="FmsMaterial" Type="Self.FmsMaterial" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="FmsMaterial">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsMaterial_FmsMaterialCodeLocation">
    <End Role="FmsMaterialCodeLocation" Type="Self.FmsMaterialCodeLocation" Multiplicity="0..1" />
    <End Role="FmsMaterial" Type="Self.FmsMaterial" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsMaterialCodeLocation">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="LocationId" />
      </Principal>
      <Dependent Role="FmsMaterial">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="LocationId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsMaterial_FmsMaterialCodeType">
    <End Role="FmsMaterialCodeType" Type="Self.FmsMaterialCodeType" Multiplicity="0..1" />
    <End Role="FmsMaterial" Type="Self.FmsMaterial" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsMaterialCodeType">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="MaterialTypeId" />
      </Principal>
      <Dependent Role="FmsMaterial">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="MaterialTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsMaterial_FmsMaterialTradeCompany">
    <End Role="FmsMaterialTradeCompany" Type="Self.FmsMaterialTradeCompany" Multiplicity="0..1" />
    <End Role="FmsMaterial" Type="Self.FmsMaterial" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsMaterialTradeCompany">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="TradeCompanyId" />
      </Principal>
      <Dependent Role="FmsMaterial">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="TradeCompanyId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsMaterial_FmsMaterialWarehouse">
    <End Role="FmsMaterialWarehouse" Type="Self.FmsMaterialWarehouse" Multiplicity="0..1" />
    <End Role="FmsMaterial" Type="Self.FmsMaterial" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsMaterialWarehouse">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="WarehouseId" />
      </Principal>
      <Dependent Role="FmsMaterial">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="WarehouseId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsMaterialPurchaseOrder_FmsMaterialPurchaseRequest">
    <End Role="FmsMaterialPurchaseRequest" Type="Self.FmsMaterialPurchaseRequest" Multiplicity="1" />
    <End Role="FmsMaterialPurchaseOrder" Type="Self.FmsMaterialPurchaseOrder" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsMaterialPurchaseRequest">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="PurchaseRequestId" />
      </Principal>
      <Dependent Role="FmsMaterialPurchaseOrder">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="PurchaseRequestId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsMaterialPurchaseOrderMaterial_FmsMaterial">
    <End Role="FmsMaterial" Type="Self.FmsMaterial" Multiplicity="1" />
    <End Role="FmsMaterialPurchaseOrderMaterial" Type="Self.FmsMaterialPurchaseOrderMaterial" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsMaterial">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="MaterialId" />
      </Principal>
      <Dependent Role="FmsMaterialPurchaseOrderMaterial">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="MaterialId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsMaterialPurchaseOrderMaterial_FmsMaterialPurchaseOrder">
    <End Role="FmsMaterialPurchaseOrder" Type="Self.FmsMaterialPurchaseOrder" Multiplicity="1">
      <OnDelete Action="Cascade" />
    </End>
    <End Role="FmsMaterialPurchaseOrderMaterial" Type="Self.FmsMaterialPurchaseOrderMaterial" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsMaterialPurchaseOrder">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="PurchaseOrderId" />
      </Principal>
      <Dependent Role="FmsMaterialPurchaseOrderMaterial">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="PurchaseOrderId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsMaterialPurchaseRequest_FmsMaterialCodePurchaseType">
    <End Role="FmsMaterialCodePurchaseType" Type="Self.FmsMaterialCodePurchaseType" Multiplicity="1" />
    <End Role="FmsMaterialPurchaseRequest" Type="Self.FmsMaterialPurchaseRequest" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsMaterialCodePurchaseType">
        <PropertyRef Name="PurchaseTypeId" />
      </Principal>
      <Dependent Role="FmsMaterialPurchaseRequest">
        <PropertyRef Name="PurchaseTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsMaterialPurchaseRequestMaterial_FmsMaterial">
    <End Role="FmsMaterial" Type="Self.FmsMaterial" Multiplicity="1" />
    <End Role="FmsMaterialPurchaseRequestMaterial" Type="Self.FmsMaterialPurchaseRequestMaterial" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsMaterial">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="MaterialId" />
      </Principal>
      <Dependent Role="FmsMaterialPurchaseRequestMaterial">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="MaterialId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsMaterialPurchaseRequestMaterial_FmsMaterialPurchaseRequest">
    <End Role="FmsMaterialPurchaseRequest" Type="Self.FmsMaterialPurchaseRequest" Multiplicity="1">
      <OnDelete Action="Cascade" />
    </End>
    <End Role="FmsMaterialPurchaseRequestMaterial" Type="Self.FmsMaterialPurchaseRequestMaterial" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsMaterialPurchaseRequest">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="PurchaseRequestId" />
      </Principal>
      <Dependent Role="FmsMaterialPurchaseRequestMaterial">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="PurchaseRequestId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsMaterialRelease_CmBusinessField">
    <End Role="CmBusinessField" Type="Self.CmBusinessField" Multiplicity="1" />
    <End Role="FmsMaterialRelease" Type="Self.FmsMaterialRelease" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmBusinessField">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BusinessFieldId" />
      </Principal>
      <Dependent Role="FmsMaterialRelease">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BusinessFieldId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsMaterialRelease_CmSite">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="FmsMaterialRelease" Type="Self.FmsMaterialRelease" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="FmsMaterialRelease">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsMaterialRelease_CmUser">
    <End Role="CmUser" Type="Self.CmUser" Multiplicity="0..1" />
    <End Role="FmsMaterialRelease" Type="Self.FmsMaterialRelease" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmUser">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="UserId" />
      </Principal>
      <Dependent Role="FmsMaterialRelease">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="ConfirmedUserId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsMaterialRelease_CmUser1">
    <End Role="CmUser" Type="Self.CmUser" Multiplicity="0..1" />
    <End Role="FmsMaterialRelease" Type="Self.FmsMaterialRelease" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmUser">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="UserId" />
      </Principal>
      <Dependent Role="FmsMaterialRelease">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="AdjustmentUserId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsMaterialRelease_FmsMaterial">
    <End Role="FmsMaterial" Type="Self.FmsMaterial" Multiplicity="0..1" />
    <End Role="FmsMaterialRelease" Type="Self.FmsMaterialRelease" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsMaterial">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="MaterialId" />
      </Principal>
      <Dependent Role="FmsMaterialRelease">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="MaterialId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsMaterialRelease_FmsMaterialCodeAdjustmentType">
    <End Role="FmsMaterialCodeAdjustmentType" Type="Self.FmsMaterialCodeAdjustmentType" Multiplicity="1" />
    <End Role="FmsMaterialRelease" Type="Self.FmsMaterialRelease" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsMaterialCodeAdjustmentType">
        <PropertyRef Name="AdjustmentTypeId" />
      </Principal>
      <Dependent Role="FmsMaterialRelease">
        <PropertyRef Name="AdjustmentTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsMaterialRelease_FmsMaterialCodeReleaseType">
    <End Role="FmsMaterialCodeReleaseType" Type="Self.FmsMaterialCodeReleaseType" Multiplicity="1" />
    <End Role="FmsMaterialRelease" Type="Self.FmsMaterialRelease" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsMaterialCodeReleaseType">
        <PropertyRef Name="ReleaseTypeId" />
      </Principal>
      <Dependent Role="FmsMaterialRelease">
        <PropertyRef Name="ReleaseTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsMaterialRelease_FmsWorkResult">
    <End Role="FmsWorkResult" Type="Self.FmsWorkResult" Multiplicity="0..1" />
    <End Role="FmsMaterialRelease" Type="Self.FmsMaterialRelease" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsWorkResult">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="WorkRequestId" />
      </Principal>
      <Dependent Role="FmsMaterialRelease">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="WorkRequestId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsMaterialStored_FmsMaterial">
    <End Role="FmsMaterial" Type="Self.FmsMaterial" Multiplicity="1" />
    <End Role="FmsMaterialStored" Type="Self.FmsMaterialStored" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsMaterial">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="MaterialId" />
      </Principal>
      <Dependent Role="FmsMaterialStored">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="MaterialId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsMaterialStored_FmsMaterialPurchaseOrder">
    <End Role="FmsMaterialPurchaseOrder" Type="Self.FmsMaterialPurchaseOrder" Multiplicity="0..1" />
    <End Role="FmsMaterialStored" Type="Self.FmsMaterialStored" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsMaterialPurchaseOrder">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="PurchaseOrderId" />
      </Principal>
      <Dependent Role="FmsMaterialStored">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="PurchaseOrderId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsMaterialStored_FmsMaterialWarehouse">
    <End Role="FmsMaterialWarehouse" Type="Self.FmsMaterialWarehouse" Multiplicity="1" />
    <End Role="FmsMaterialStored" Type="Self.FmsMaterialStored" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsMaterialWarehouse">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="WarehouseId" />
      </Principal>
      <Dependent Role="FmsMaterialStored">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="WarehouseId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsMonthlyReport_CmUser">
    <End Role="CmUser" Type="Self.CmUser" Multiplicity="1" />
    <End Role="FmsMonthlyReport" Type="Self.FmsMonthlyReport" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmUser">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="UserId" />
      </Principal>
      <Dependent Role="FmsMonthlyReport">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="RegisterUserId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsReport_CmBusinessField">
    <End Role="CmBusinessField" Type="Self.CmBusinessField" Multiplicity="1" />
    <End Role="FmsReport" Type="Self.FmsReport" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmBusinessField">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BusinessFieldId" />
      </Principal>
      <Dependent Role="FmsReport">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="BusinessFieldId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsReport_CmFile">
    <End Role="CmFile" Type="Self.CmFile" Multiplicity="0..1" />
    <End Role="FmsReport" Type="Self.FmsReport" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmFile">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FileId" />
      </Principal>
      <Dependent Role="FmsReport">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FileId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsReport_CmSite">
    <End Role="CmSite" Type="Self.CmSite" Multiplicity="1" />
    <End Role="FmsReport" Type="Self.FmsReport" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmSite">
        <PropertyRef Name="SiteId" />
      </Principal>
      <Dependent Role="FmsReport">
        <PropertyRef Name="SiteId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsReport_CmUser">
    <End Role="CmUser" Type="Self.CmUser" Multiplicity="0..1" />
    <End Role="FmsReport" Type="Self.FmsReport" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmUser">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="UserId" />
      </Principal>
      <Dependent Role="FmsReport">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="RegisterUserId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsReport_CmUser1">
    <End Role="CmUser" Type="Self.CmUser" Multiplicity="0..1" />
    <End Role="FmsReport" Type="Self.FmsReport" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmUser">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="UserId" />
      </Principal>
      <Dependent Role="FmsReport">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="ConfirmUserId1" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsReport_CmUser2">
    <End Role="CmUser" Type="Self.CmUser" Multiplicity="0..1" />
    <End Role="FmsReport" Type="Self.FmsReport" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmUser">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="UserId" />
      </Principal>
      <Dependent Role="FmsReport">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="ConfirmUserId2" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsWorkOrderToFacility_CmFacility">
    <End Role="CmFacility" Type="Self.CmFacility" Multiplicity="1" />
    <End Role="FmsWorkOrderToFacility" Type="Self.FmsWorkOrderToFacility" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmFacility">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FacilityCode" />
      </Principal>
      <Dependent Role="FmsWorkOrderToFacility">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FacilityCode" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsWorkRequest_CmPartner">
    <End Role="CmPartner" Type="Self.CmPartner" Multiplicity="0..1" />
    <End Role="FmsWorkRequest" Type="Self.FmsWorkRequest" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmPartner">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="PartnerId" />
      </Principal>
      <Dependent Role="FmsWorkRequest">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="InspectionAgencyId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsWorkRequestToFacility_CmFacility">
    <End Role="CmFacility" Type="Self.CmFacility" Multiplicity="1" />
    <End Role="FmsWorkRequestToFacility" Type="Self.FmsWorkRequestToFacility" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmFacility">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FacilityCode" />
      </Principal>
      <Dependent Role="FmsWorkRequestToFacility">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FacilityCode" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsWorkResultCheckItemMaterial_FmsMaterial">
    <End Role="FmsMaterial" Type="Self.FmsMaterial" Multiplicity="1" />
    <End Role="FmsWorkResultCheckItemMaterial" Type="Self.FmsWorkResultCheckItemMaterial" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsMaterial">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="MaterialId" />
      </Principal>
      <Dependent Role="FmsWorkResultCheckItemMaterial">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="MaterialId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsWorkResultCheckItemMaterial_FmsWorkResult">
    <End Role="FmsWorkResult" Type="Self.FmsWorkResult" Multiplicity="1" />
    <End Role="FmsWorkResultCheckItemMaterial" Type="Self.FmsWorkResultCheckItemMaterial" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsWorkResult">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="WorkRequestId" />
      </Principal>
      <Dependent Role="FmsWorkResultCheckItemMaterial">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="WorkRequestId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsWorkResultCheckItemMaterial_FmsWorkResultCheckItem">
    <End Role="FmsWorkResultCheckItem" Type="Self.FmsWorkResultCheckItem" Multiplicity="1" />
    <End Role="FmsWorkResultCheckItemMaterial" Type="Self.FmsWorkResultCheckItemMaterial" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="FmsWorkResultCheckItem">
        <PropertyRef Name="CheckItemId" />
      </Principal>
      <Dependent Role="FmsWorkResultCheckItemMaterial">
        <PropertyRef Name="CheckItemId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsWorkSchedule_CmPartner">
    <End Role="CmPartner" Type="Self.CmPartner" Multiplicity="0..1" />
    <End Role="FmsWorkSchedule" Type="Self.FmsWorkSchedule" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmPartner">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="PartnerId" />
      </Principal>
      <Dependent Role="FmsWorkSchedule">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="InspectionAgencyId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_FmsWorkScheduleToFacility_CmFacility">
    <End Role="CmFacility" Type="Self.CmFacility" Multiplicity="1" />
    <End Role="FmsWorkScheduleToFacility" Type="Self.FmsWorkScheduleToFacility" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CmFacility">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FacilityCode" />
      </Principal>
      <Dependent Role="FmsWorkScheduleToFacility">
        <PropertyRef Name="SiteId" />
        <PropertyRef Name="FacilityCode" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <EntityContainer Name="iBemsModelStoreContainer">
    <EntitySet Name="BemsAlarmGroup" EntityType="Self.BemsAlarmGroup" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsAlarmGroupUser" EntityType="Self.BemsAlarmGroupUser" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsAlarmLog" EntityType="Self.BemsAlarmLog" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsAlarmSetting" EntityType="Self.BemsAlarmSetting" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsAnalysisType" EntityType="Self.BemsAnalysisType" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsChartInfo" EntityType="Self.BemsChartInfo" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsConfigData" EntityType="Self.BemsConfigData" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsControlAHUTempConfig" EntityType="Self.BemsControlAHUTempConfig" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsControlPointHistory" EntityType="Self.BemsControlPointHistory" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsEnergyConfigPercentMonth" EntityType="Self.BemsEnergyConfigPercentMonth" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsEnergyConfigPercentWeek" EntityType="Self.BemsEnergyConfigPercentWeek" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsEnergyCost" EntityType="Self.BemsEnergyCost" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsEnergyDaily" EntityType="Self.BemsEnergyDaily" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsEnergyDailyRegression" EntityType="Self.BemsEnergyDailyRegression" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsFacilityType" EntityType="Self.BemsFacilityType" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsFactorCo2" EntityType="Self.BemsFactorCo2" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsFactorToe" EntityType="Self.BemsFactorToe" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsFloorPlan" EntityType="Self.BemsFloorPlan" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsFloorStatus" EntityType="Self.BemsFloorStatus" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsFormula" EntityType="Self.BemsFormula" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsFormulaBase" EntityType="Self.BemsFormulaBase" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsFormulaParameter" EntityType="Self.BemsFormulaParameter" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsFormulaTable" EntityType="Self.BemsFormulaTable" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsFormulaTableValue" EntityType="Self.BemsFormulaTableValue" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsFuelType" EntityType="Self.BemsFuelType" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsIceThermalStorageSimulation" EntityType="Self.BemsIceThermalStorageSimulation" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsMonitoringPoint" EntityType="Self.BemsMonitoringPoint" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsMonitoringPointBaseData" EntityType="Self.BemsMonitoringPointBaseData" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsMonitoringPointConfig" EntityType="Self.BemsMonitoringPointConfig" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsMonitoringPointForecastingDayAhead" EntityType="Self.BemsMonitoringPointForecastingDayAhead" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsMonitoringPointForecastingHourAhead" EntityType="Self.BemsMonitoringPointForecastingHourAhead" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsMonitoringPointHistory15min" EntityType="Self.BemsMonitoringPointHistory15min" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsMonitoringPointHistory15minRawData" EntityType="Self.BemsMonitoringPointHistory15minRawData" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsMonitoringPointHistoryDaily" EntityType="Self.BemsMonitoringPointHistoryDaily" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsMonitoringPointHistoryHourly" EntityType="Self.BemsMonitoringPointHistoryHourly" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsMonitoringPointToAnlaysisType" EntityType="Self.BemsMonitoringPointToAnlaysisType" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsMonitoringPointWeatherForecasted" EntityType="Self.BemsMonitoringPointWeatherForecasted" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsNoticePriceBase" EntityType="Self.BemsNoticePriceBase" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsNoticePriceContractType" EntityType="Self.BemsNoticePriceContractType" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsNoticePriceDetail" EntityType="Self.BemsNoticePriceDetail" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsPeakFacility" EntityType="Self.BemsPeakFacility" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsPeakHistory" EntityType="Self.BemsPeakHistory" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsPeakHistoryDaily" EntityType="Self.BemsPeakHistoryDaily" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsPeakInfo" EntityType="Self.BemsPeakInfo" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsPeopleIncrease" EntityType="Self.BemsPeopleIncrease" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsPriceCode" EntityType="Self.BemsPriceCode" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsPriceFormula" EntityType="Self.BemsPriceFormula" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsPriceMeta" EntityType="Self.BemsPriceMeta" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsPriceType" EntityType="Self.BemsPriceType" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsRentalRate" EntityType="Self.BemsRentalRate" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsReportFormat" EntityType="Self.BemsReportFormat" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsReportHistory" EntityType="Self.BemsReportHistory" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsServiceType" EntityType="Self.BemsServiceType" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsSitePrice" EntityType="Self.BemsSitePrice" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BemsSitePriceHistory" EntityType="Self.BemsSitePriceHistory" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="CmAlarmAdmin" EntityType="Self.CmAlarmAdmin" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="CmAnnouncement" EntityType="Self.CmAnnouncement" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="CmBuilding" EntityType="Self.CmBuilding" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="CmBusinessField" EntityType="Self.CmBusinessField" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="CmCompany" EntityType="Self.CmCompany" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="CmCompanyType" EntityType="Self.CmCompanyType" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="CmDepartment" EntityType="Self.CmDepartment" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="CmFacility" EntityType="Self.CmFacility" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="CmFacilityFile" EntityType="Self.CmFacilityFile" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="CmFacilityTempSet" EntityType="Self.CmFacilityTempSet" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="CmFile" EntityType="Self.CmFile" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="CmFileCategory" EntityType="Self.CmFileCategory" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="CmFloor" EntityType="Self.CmFloor" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="CmHoliday" EntityType="Self.CmHoliday" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="CmHolidayCustom" EntityType="Self.CmHolidayCustom" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="CmHolidayWeekend" EntityType="Self.CmHolidayWeekend" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="CmMenu" EntityType="Self.CmMenu" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="CmPartner" EntityType="Self.CmPartner" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="CmPartnerType" EntityType="Self.CmPartnerType" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="CmPatrolCourse" EntityType="Self.CmPatrolCourse" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="CmPatrolCoursePos" EntityType="Self.CmPatrolCoursePos" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="CmPatrolGroup" EntityType="Self.CmPatrolGroup" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="CmPatrolGroupUser" EntityType="Self.CmPatrolGroupUser" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="CmPatrolHistory" EntityType="Self.CmPatrolHistory" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="CmPatrolHistoryPos" EntityType="Self.CmPatrolHistoryPos" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="CmPatrolPlan" EntityType="Self.CmPatrolPlan" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="CmPatrolPos" EntityType="Self.CmPatrolPos" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="CmPatrolSchedule" EntityType="Self.CmPatrolSchedule" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="CmPatrolType" EntityType="Self.CmPatrolType" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="CmPosition" EntityType="Self.CmPosition" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="CmServiceEnergyCalcDay" EntityType="Self.CmServiceEnergyCalcDay" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="CmServiceEnergyCalcMonth" EntityType="Self.CmServiceEnergyCalcMonth" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="CmSite" EntityType="Self.CmSite" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="CmUser" EntityType="Self.CmUser" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="CmUserGroup" EntityType="Self.CmUserGroup" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="CmUserGroupPermission" EntityType="Self.CmUserGroupPermission" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="CmUserLoginHistory" EntityType="Self.CmUserLoginHistory" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="CmUserToLicense" EntityType="Self.CmUserToLicense" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="CmZone" EntityType="Self.CmZone" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="CmZoneTempHumiSet" EntityType="Self.CmZoneTempHumiSet" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsAccident" EntityType="Self.FmsAccident" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsAccidentCodeType" EntityType="Self.FmsAccidentCodeType" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsBudget" EntityType="Self.FmsBudget" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsBudgetCodeClass" EntityType="Self.FmsBudgetCodeClass" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsBudgetDetail" EntityType="Self.FmsBudgetDetail" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsBudgetDetailExecution" EntityType="Self.FmsBudgetDetailExecution" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsCompanyEstimationCodeClass" EntityType="Self.FmsCompanyEstimationCodeClass" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsConstruction" EntityType="Self.FmsConstruction" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsConstructionCodeProgress" EntityType="Self.FmsConstructionCodeProgress" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsConstructionCodeType" EntityType="Self.FmsConstructionCodeType" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsConstructionEstimation" EntityType="Self.FmsConstructionEstimation" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsContract" EntityType="Self.FmsContract" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsContractClass" EntityType="Self.FmsContractClass" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsContractMethod" EntityType="Self.FmsContractMethod" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsContractType" EntityType="Self.FmsContractType" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsDailyCheckReport" EntityType="Self.FmsDailyCheckReport" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsDailyReport" EntityType="Self.FmsDailyReport" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsDrawing" EntityType="Self.FmsDrawing" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsDrawingCodeGroup" EntityType="Self.FmsDrawingCodeGroup" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsDrawingCodeType" EntityType="Self.FmsDrawingCodeType" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsDrawingHistory" EntityType="Self.FmsDrawingHistory" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsEquipment" EntityType="Self.FmsEquipment" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsEquipmentCodeStateType" EntityType="Self.FmsEquipmentCodeStateType" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsEquipmentCodeType" EntityType="Self.FmsEquipmentCodeType" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsEquipmentHistory" EntityType="Self.FmsEquipmentHistory" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsEquipmentRentInfo" EntityType="Self.FmsEquipmentRentInfo" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsFacilityCheckItem" EntityType="Self.FmsFacilityCheckItem" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsFacilityCodeClass" EntityType="Self.FmsFacilityCodeClass" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsFacilityManual" EntityType="Self.FmsFacilityManual" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsFacilityOperationItem" EntityType="Self.FmsFacilityOperationItem" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsFacilityOperationReport" EntityType="Self.FmsFacilityOperationReport" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsInvestmentCost" EntityType="Self.FmsInvestmentCost" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsLicense" EntityType="Self.FmsLicense" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsManual" EntityType="Self.FmsManual" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsManualHistory" EntityType="Self.FmsManualHistory" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsManualType" EntityType="Self.FmsManualType" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsMaterial" EntityType="Self.FmsMaterial" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsMaterialCarriedForward" EntityType="Self.FmsMaterialCarriedForward" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsMaterialCodeAdjustmentType" EntityType="Self.FmsMaterialCodeAdjustmentType" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsMaterialCodeClass" EntityType="Self.FmsMaterialCodeClass" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsMaterialCodeLocation" EntityType="Self.FmsMaterialCodeLocation" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsMaterialCodeProgress" EntityType="Self.FmsMaterialCodeProgress" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsMaterialCodePurchaseType" EntityType="Self.FmsMaterialCodePurchaseType" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsMaterialCodeReleaseType" EntityType="Self.FmsMaterialCodeReleaseType" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsMaterialCodeType" EntityType="Self.FmsMaterialCodeType" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsMaterialPurchaseOrder" EntityType="Self.FmsMaterialPurchaseOrder" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsMaterialPurchaseOrderMaterial" EntityType="Self.FmsMaterialPurchaseOrderMaterial" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsMaterialPurchaseRequest" EntityType="Self.FmsMaterialPurchaseRequest" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsMaterialPurchaseRequestMaterial" EntityType="Self.FmsMaterialPurchaseRequestMaterial" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsMaterialRelease" EntityType="Self.FmsMaterialRelease" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsMaterialStored" EntityType="Self.FmsMaterialStored" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsMaterialTradeCompany" EntityType="Self.FmsMaterialTradeCompany" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsMaterialWarehouse" EntityType="Self.FmsMaterialWarehouse" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsMonthlyReport" EntityType="Self.FmsMonthlyReport" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsPaymentType" EntityType="Self.FmsPaymentType" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsReport" EntityType="Self.FmsReport" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsWorkCodeCauseClass" EntityType="Self.FmsWorkCodeCauseClass" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsWorkCodeCycleUnit" EntityType="Self.FmsWorkCodeCycleUnit" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsWorkCodeEmergency" EntityType="Self.FmsWorkCodeEmergency" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsWorkCodeHolidayWorkType" EntityType="Self.FmsWorkCodeHolidayWorkType" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsWorkCodeLegalInspectionAgency" EntityType="Self.FmsWorkCodeLegalInspectionAgency" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsWorkCodeProgress" EntityType="Self.FmsWorkCodeProgress" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsWorkCodeType" EntityType="Self.FmsWorkCodeType" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsWorkOrder" EntityType="Self.FmsWorkOrder" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsWorkOrderToFacility" EntityType="Self.FmsWorkOrderToFacility" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsWorkRequest" EntityType="Self.FmsWorkRequest" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsWorkRequestToFacility" EntityType="Self.FmsWorkRequestToFacility" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsWorkResult" EntityType="Self.FmsWorkResult" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsWorkResultCheckItem" EntityType="Self.FmsWorkResultCheckItem" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsWorkResultCheckItemMaterial" EntityType="Self.FmsWorkResultCheckItemMaterial" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsWorkResultFile" EntityType="Self.FmsWorkResultFile" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsWorkResultLaw" EntityType="Self.FmsWorkResultLaw" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsWorkResultToFacility" EntityType="Self.FmsWorkResultToFacility" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsWorkSchedule" EntityType="Self.FmsWorkSchedule" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="FmsWorkScheduleToFacility" EntityType="Self.FmsWorkScheduleToFacility" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="sysdiagrams" EntityType="Self.sysdiagrams" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="WeatherDongNaeForecast" EntityType="Self.WeatherDongNaeForecast" Schema="dbo" store:Type="Tables" />
    <AssociationSet Name="FK__BemsEnerg__SiteI__7954A4F6" Association="Self.FK__BemsEnerg__SiteI__7954A4F6">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="BemsEnergyConfigPercentMonth" EntitySet="BemsEnergyConfigPercentMonth" />
    </AssociationSet>
    <AssociationSet Name="FK__BemsEnerg__SiteI__7C3111A1" Association="Self.FK__BemsEnerg__SiteI__7C3111A1">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="BemsEnergyConfigPercentWeek" EntitySet="BemsEnergyConfigPercentWeek" />
    </AssociationSet>
    <AssociationSet Name="FK__BemsEnergyDaily__BemsFuelType" Association="Self.FK__BemsEnergyDaily__BemsFuelType">
      <End Role="BemsFuelType" EntitySet="BemsFuelType" />
      <End Role="BemsEnergyDaily" EntitySet="BemsEnergyDaily" />
    </AssociationSet>
    <AssociationSet Name="FK__BemsEnergyDaily__BemsServiceType" Association="Self.FK__BemsEnergyDaily__BemsServiceType">
      <End Role="BemsServiceType" EntitySet="BemsServiceType" />
      <End Role="BemsEnergyDaily" EntitySet="BemsEnergyDaily" />
    </AssociationSet>
    <AssociationSet Name="FK__BemsEnergyDaily__CmBuilding" Association="Self.FK__BemsEnergyDaily__CmBuilding">
      <End Role="CmBuilding" EntitySet="CmBuilding" />
      <End Role="BemsEnergyDaily" EntitySet="BemsEnergyDaily" />
    </AssociationSet>
    <AssociationSet Name="FK__BemsFactorCo2__BemsFuelType" Association="Self.FK__BemsFactorCo2__BemsFuelType">
      <End Role="BemsFuelType" EntitySet="BemsFuelType" />
      <End Role="BemsFactorCo2" EntitySet="BemsFactorCo2" />
    </AssociationSet>
    <AssociationSet Name="FK__BemsFactorToe__BemsFuelType" Association="Self.FK__BemsFactorToe__BemsFuelType">
      <End Role="BemsFuelType" EntitySet="BemsFuelType" />
      <End Role="BemsFactorToe" EntitySet="BemsFactorToe" />
    </AssociationSet>
    <AssociationSet Name="FK__BemsFormula__BemsFormulaBase" Association="Self.FK__BemsFormula__BemsFormulaBase">
      <End Role="BemsFormulaBase" EntitySet="BemsFormulaBase" />
      <End Role="BemsFormula" EntitySet="BemsFormula" />
    </AssociationSet>
    <AssociationSet Name="FK__BemsFormulaParameter__BemsFormula" Association="Self.FK__BemsFormulaParameter__BemsFormula">
      <End Role="BemsFormula" EntitySet="BemsFormula" />
      <End Role="BemsFormulaParameter" EntitySet="BemsFormulaParameter" />
    </AssociationSet>
    <AssociationSet Name="FK__BemsFormulaTableValue__BemsFormulaTable" Association="Self.FK__BemsFormulaTableValue__BemsFormulaTable">
      <End Role="BemsFormulaTable" EntitySet="BemsFormulaTable" />
      <End Role="BemsFormulaTableValue" EntitySet="BemsFormulaTableValue" />
    </AssociationSet>
    <AssociationSet Name="FK__BemsMonitoringPo__1372D2FE" Association="Self.FK__BemsMonitoringPo__1372D2FE">
      <End Role="BemsAnalysisType" EntitySet="BemsAnalysisType" />
      <End Role="BemsMonitoringPointToAnlaysisType" EntitySet="BemsMonitoringPointToAnlaysisType" />
    </AssociationSet>
    <AssociationSet Name="FK__BemsMonitoringPo__155B1B70" Association="Self.FK__BemsMonitoringPo__155B1B70">
      <End Role="BemsMonitoringPoint" EntitySet="BemsMonitoringPoint" />
      <End Role="BemsMonitoringPointToAnlaysisType" EntitySet="BemsMonitoringPointToAnlaysisType" />
    </AssociationSet>
    <AssociationSet Name="FK__BemsMonitoringPoint__BemsFuelType" Association="Self.FK__BemsMonitoringPoint__BemsFuelType">
      <End Role="BemsFuelType" EntitySet="BemsFuelType" />
      <End Role="BemsMonitoringPoint" EntitySet="BemsMonitoringPoint" />
    </AssociationSet>
    <AssociationSet Name="FK__BemsMonitoringPoint__BemsServiceType" Association="Self.FK__BemsMonitoringPoint__BemsServiceType">
      <End Role="BemsServiceType" EntitySet="BemsServiceType" />
      <End Role="BemsMonitoringPoint" EntitySet="BemsMonitoringPoint" />
    </AssociationSet>
    <AssociationSet Name="FK__BemsMonitoringPoint__CmBuilding" Association="Self.FK__BemsMonitoringPoint__CmBuilding">
      <End Role="CmBuilding" EntitySet="CmBuilding" />
      <End Role="BemsMonitoringPoint" EntitySet="BemsMonitoringPoint" />
    </AssociationSet>
    <AssociationSet Name="FK__BemsMonitoringPoint__CmFloor" Association="Self.FK__BemsMonitoringPoint__CmFloor">
      <End Role="CmFloor" EntitySet="CmFloor" />
      <End Role="BemsMonitoringPoint" EntitySet="BemsMonitoringPoint" />
    </AssociationSet>
    <AssociationSet Name="FK__BemsMonitoringPoint__CmZone" Association="Self.FK__BemsMonitoringPoint__CmZone">
      <End Role="CmZone" EntitySet="CmZone" />
      <End Role="BemsMonitoringPoint" EntitySet="BemsMonitoringPoint" />
    </AssociationSet>
    <AssociationSet Name="FK__BemsMonitoringPointBaseData__BemsFacilityType" Association="Self.FK__BemsMonitoringPointBaseData__BemsFacilityType">
      <End Role="BemsFacilityType" EntitySet="BemsFacilityType" />
      <End Role="BemsMonitoringPointBaseData" EntitySet="BemsMonitoringPointBaseData" />
    </AssociationSet>
    <AssociationSet Name="FK__BemsMonitoringPointBaseData__BemsFuelType" Association="Self.FK__BemsMonitoringPointBaseData__BemsFuelType">
      <End Role="BemsFuelType" EntitySet="BemsFuelType" />
      <End Role="BemsMonitoringPointBaseData" EntitySet="BemsMonitoringPointBaseData" />
    </AssociationSet>
    <AssociationSet Name="FK__BemsMonitoringPointBaseData__BemsServiceType" Association="Self.FK__BemsMonitoringPointBaseData__BemsServiceType">
      <End Role="BemsServiceType" EntitySet="BemsServiceType" />
      <End Role="BemsMonitoringPointBaseData" EntitySet="BemsMonitoringPointBaseData" />
    </AssociationSet>
    <AssociationSet Name="FK__BemsMonitoringPointHistory15min__BemsFacilityType" Association="Self.FK__BemsMonitoringPointHistory15min__BemsFacilityType">
      <End Role="BemsFacilityType" EntitySet="BemsFacilityType" />
      <End Role="BemsMonitoringPointHistory15min" EntitySet="BemsMonitoringPointHistory15min" />
    </AssociationSet>
    <AssociationSet Name="FK__BemsMonitoringPointHistory15min__BemsMonitoringPoint" Association="Self.FK__BemsMonitoringPointHistory15min__BemsMonitoringPoint">
      <End Role="BemsMonitoringPoint" EntitySet="BemsMonitoringPoint" />
      <End Role="BemsMonitoringPointHistory15min" EntitySet="BemsMonitoringPointHistory15min" />
    </AssociationSet>
    <AssociationSet Name="FK__BemsMonitoringPointHistory15minRawData__BemsFacilityType" Association="Self.FK__BemsMonitoringPointHistory15minRawData__BemsFacilityType">
      <End Role="BemsFacilityType" EntitySet="BemsFacilityType" />
      <End Role="BemsMonitoringPointHistory15minRawData" EntitySet="BemsMonitoringPointHistory15minRawData" />
    </AssociationSet>
    <AssociationSet Name="FK__BemsMonitoringPointHistory15minRawData__BemsMonitoringPoint" Association="Self.FK__BemsMonitoringPointHistory15minRawData__BemsMonitoringPoint">
      <End Role="BemsMonitoringPoint" EntitySet="BemsMonitoringPoint" />
      <End Role="BemsMonitoringPointHistory15minRawData" EntitySet="BemsMonitoringPointHistory15minRawData" />
    </AssociationSet>
    <AssociationSet Name="FK__BemsMonitoringPointHistoryDaily__BemsFacilityType" Association="Self.FK__BemsMonitoringPointHistoryDaily__BemsFacilityType">
      <End Role="BemsFacilityType" EntitySet="BemsFacilityType" />
      <End Role="BemsMonitoringPointHistoryDaily" EntitySet="BemsMonitoringPointHistoryDaily" />
    </AssociationSet>
    <AssociationSet Name="FK__BemsMonitoringPointHistoryDaily__BemsMonitoringPoint" Association="Self.FK__BemsMonitoringPointHistoryDaily__BemsMonitoringPoint">
      <End Role="BemsMonitoringPoint" EntitySet="BemsMonitoringPoint" />
      <End Role="BemsMonitoringPointHistoryDaily" EntitySet="BemsMonitoringPointHistoryDaily" />
    </AssociationSet>
    <AssociationSet Name="FK__BemsMonitoringPointHistoryHourly__BemsFacilityType" Association="Self.FK__BemsMonitoringPointHistoryHourly__BemsFacilityType">
      <End Role="BemsFacilityType" EntitySet="BemsFacilityType" />
      <End Role="BemsMonitoringPointHistoryHourly" EntitySet="BemsMonitoringPointHistoryHourly" />
    </AssociationSet>
    <AssociationSet Name="FK__BemsMonitoringPointHistoryHourly__BemsMonitoringPoint" Association="Self.FK__BemsMonitoringPointHistoryHourly__BemsMonitoringPoint">
      <End Role="BemsMonitoringPoint" EntitySet="BemsMonitoringPoint" />
      <End Role="BemsMonitoringPointHistoryHourly" EntitySet="BemsMonitoringPointHistoryHourly" />
    </AssociationSet>
    <AssociationSet Name="FK__BemsMonitoringPointToAnlaysisType__BemsFacilityType" Association="Self.FK__BemsMonitoringPointToAnlaysisType__BemsFacilityType">
      <End Role="BemsFacilityType" EntitySet="BemsFacilityType" />
      <End Role="BemsMonitoringPointToAnlaysisType" EntitySet="BemsMonitoringPointToAnlaysisType" />
    </AssociationSet>
    <AssociationSet Name="FK__BemsNoticePriceBase__BemsNoticePriceContractType" Association="Self.FK__BemsNoticePriceBase__BemsNoticePriceContractType">
      <End Role="BemsNoticePriceContractType" EntitySet="BemsNoticePriceContractType" />
      <End Role="BemsNoticePriceBase" EntitySet="BemsNoticePriceBase" />
    </AssociationSet>
    <AssociationSet Name="FK__BemsNoticePriceContractType__BemsFuelType" Association="Self.FK__BemsNoticePriceContractType__BemsFuelType">
      <End Role="BemsFuelType" EntitySet="BemsFuelType" />
      <End Role="BemsNoticePriceContractType" EntitySet="BemsNoticePriceContractType" />
    </AssociationSet>
    <AssociationSet Name="FK__BemsNoticePriceDetail__BemsNoticePriceBase" Association="Self.FK__BemsNoticePriceDetail__BemsNoticePriceBase">
      <End Role="BemsNoticePriceBase" EntitySet="BemsNoticePriceBase" />
      <End Role="BemsNoticePriceDetail" EntitySet="BemsNoticePriceDetail" />
    </AssociationSet>
    <AssociationSet Name="FK__CmCompany__345EC57D" Association="Self.FK__CmCompany__345EC57D">
      <End Role="CmCompanyType" EntitySet="CmCompanyType" />
      <End Role="CmCompany" EntitySet="CmCompany" />
    </AssociationSet>
    <AssociationSet Name="FK__CmCompany__SiteI__336AA144" Association="Self.FK__CmCompany__SiteI__336AA144">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="CmCompany" EntitySet="CmCompany" />
    </AssociationSet>
    <AssociationSet Name="FK__CmDepartment__3552E9B6" Association="Self.FK__CmDepartment__3552E9B6">
      <End Role="CmCompany" EntitySet="CmCompany" />
      <End Role="CmDepartment" EntitySet="CmDepartment" />
    </AssociationSet>
    <AssociationSet Name="FK__CmFacility__CmFacility" Association="Self.FK__CmFacility__CmFacility">
      <End Role="CmFacility" EntitySet="CmFacility" />
      <End Role="CmFacility1" EntitySet="CmFacility" />
    </AssociationSet>
    <AssociationSet Name="FK__CmFacilityFile__7720AD13" Association="Self.FK__CmFacilityFile__7720AD13">
      <End Role="CmFacility" EntitySet="CmFacility" />
      <End Role="CmFacilityFile" EntitySet="CmFacilityFile" />
    </AssociationSet>
    <AssociationSet Name="FK__CmFacilityFile__CmFile" Association="Self.FK__CmFacilityFile__CmFile">
      <End Role="CmFile" EntitySet="CmFile" />
      <End Role="CmFacilityFile" EntitySet="CmFacilityFile" />
    </AssociationSet>
    <AssociationSet Name="FK__CmFacilityManual__79FD19BE" Association="Self.FK__CmFacilityManual__79FD19BE">
      <End Role="CmFacility" EntitySet="CmFacility" />
      <End Role="FmsFacilityManual" EntitySet="FmsFacilityManual" />
    </AssociationSet>
    <AssociationSet Name="FK__CmFacilityManual__7BE56230" Association="Self.FK__CmFacilityManual__7BE56230">
      <End Role="CmBusinessField" EntitySet="CmBusinessField" />
      <End Role="FmsFacilityManual" EntitySet="FmsFacilityManual" />
    </AssociationSet>
    <AssociationSet Name="FK__CmFile__CmFileCategory" Association="Self.FK__CmFile__CmFileCategory">
      <End Role="CmFileCategory" EntitySet="CmFileCategory" />
      <End Role="CmFile" EntitySet="CmFile" />
    </AssociationSet>
    <AssociationSet Name="FK__CmFile__SiteId__2759D01A" Association="Self.FK__CmFile__SiteId__2759D01A">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="CmFile" EntitySet="CmFile" />
    </AssociationSet>
    <AssociationSet Name="FK__CmFloor__3CF40B7E" Association="Self.FK__CmFloor__3CF40B7E">
      <End Role="CmBuilding" EntitySet="CmBuilding" />
      <End Role="CmFloor" EntitySet="CmFloor" />
    </AssociationSet>
    <AssociationSet Name="FK__CmHoliday__SiteI__0BB1B5A5" Association="Self.FK__CmHoliday__SiteI__0BB1B5A5">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="CmHoliday" EntitySet="CmHoliday" />
    </AssociationSet>
    <AssociationSet Name="FK__CmHoliday__SiteI__0D99FE17" Association="Self.FK__CmHoliday__SiteI__0D99FE17">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="CmHolidayWeekend" EntitySet="CmHolidayWeekend" />
    </AssociationSet>
    <AssociationSet Name="FK__CmHoliday__SiteI__10766AC2" Association="Self.FK__CmHoliday__SiteI__10766AC2">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="CmHolidayCustom" EntitySet="CmHolidayCustom" />
    </AssociationSet>
    <AssociationSet Name="FK__CmHoliday__SiteI__65AC084E" Association="Self.FK__CmHoliday__SiteI__65AC084E">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="CmHoliday" EntitySet="CmHoliday" />
    </AssociationSet>
    <AssociationSet Name="FK__CmHoliday__SiteI__66A02C87" Association="Self.FK__CmHoliday__SiteI__66A02C87">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="CmHolidayCustom" EntitySet="CmHolidayCustom" />
    </AssociationSet>
    <AssociationSet Name="FK__CmLocation__3DE82FB7" Association="Self.FK__CmLocation__3DE82FB7">
      <End Role="CmFloor" EntitySet="CmFloor" />
      <End Role="CmZone" EntitySet="CmZone" />
    </AssociationSet>
    <AssociationSet Name="FK__CmPositio__SiteI__6A70BD6B" Association="Self.FK__CmPositio__SiteI__6A70BD6B">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="CmPosition" EntitySet="CmPosition" />
    </AssociationSet>
    <AssociationSet Name="FK__CmUserGro__SiteI__53D770D6" Association="Self.FK__CmUserGro__SiteI__53D770D6">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="CmUserGroup" EntitySet="CmUserGroup" />
    </AssociationSet>
    <AssociationSet Name="FK__CmUserGroupPermission__CmUserGroup" Association="Self.FK__CmUserGroupPermission__CmUserGroup">
      <End Role="CmUserGroup" EntitySet="CmUserGroup" />
      <End Role="CmUserGroupPermission" EntitySet="CmUserGroupPermission" />
    </AssociationSet>
    <AssociationSet Name="FK__CmUserPos__SiteI__44952D46" Association="Self.FK__CmUserPos__SiteI__44952D46">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="CmPosition" EntitySet="CmPosition" />
    </AssociationSet>
    <AssociationSet Name="FK__CmUserToLicense__CmUser" Association="Self.FK__CmUserToLicense__CmUser">
      <End Role="CmUser" EntitySet="CmUser" />
      <End Role="CmUserToLicense" EntitySet="CmUserToLicense" />
    </AssociationSet>
    <AssociationSet Name="FK__CmUserToLicense__FmsLicense" Association="Self.FK__CmUserToLicense__FmsLicense">
      <End Role="FmsLicense" EntitySet="FmsLicense" />
      <End Role="CmUserToLicense" EntitySet="CmUserToLicense" />
    </AssociationSet>
    <AssociationSet Name="FK__CmZone__CmBuilding" Association="Self.FK__CmZone__CmBuilding">
      <End Role="CmBuilding" EntitySet="CmBuilding" />
      <End Role="CmZone" EntitySet="CmZone" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsDrawin__SiteI__6B79F03D" Association="Self.FK__FmsDrawin__SiteI__6B79F03D">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="FmsDrawingCodeGroup" EntitySet="FmsDrawingCodeGroup" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsDrawin__SiteI__6C6E1476" Association="Self.FK__FmsDrawin__SiteI__6C6E1476">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="FmsDrawingCodeType" EntitySet="FmsDrawingCodeType" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsDrawin__SiteI__6D6238AF" Association="Self.FK__FmsDrawin__SiteI__6D6238AF">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="FmsDrawing" EntitySet="FmsDrawing" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsDrawin__SiteI__6F357288" Association="Self.FK__FmsDrawin__SiteI__6F357288">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="FmsDrawingCodeGroup" EntitySet="FmsDrawingCodeGroup" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsDrawin__SiteI__702996C1" Association="Self.FK__FmsDrawin__SiteI__702996C1">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="FmsDrawingCodeType" EntitySet="FmsDrawingCodeType" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsDrawing__6E565CE8" Association="Self.FK__FmsDrawing__6E565CE8">
      <End Role="FmsDrawingCodeGroup" EntitySet="FmsDrawingCodeGroup" />
      <End Role="FmsDrawing" EntitySet="FmsDrawing" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsDrawing__6F4A8121" Association="Self.FK__FmsDrawing__6F4A8121">
      <End Role="FmsDrawingCodeType" EntitySet="FmsDrawingCodeType" />
      <End Role="FmsDrawing" EntitySet="FmsDrawing" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsDrawingHistor__04DA9AE4" Association="Self.FK__FmsDrawingHistor__04DA9AE4">
      <End Role="CmFile" EntitySet="CmFile" />
      <End Role="FmsDrawingHistory" EntitySet="FmsDrawingHistory" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsDrawingHistor__7132C993" Association="Self.FK__FmsDrawingHistor__7132C993">
      <End Role="FmsDrawing" EntitySet="FmsDrawing" />
      <End Role="FmsDrawingHistory" EntitySet="FmsDrawingHistory" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsDrawingHistory__CmUser" Association="Self.FK__FmsDrawingHistory__CmUser">
      <End Role="CmUser" EntitySet="CmUser" />
      <End Role="FmsDrawingHistory" EntitySet="FmsDrawingHistory" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsFacilityCheckItem__FmsWorkCodeCycleUnit" Association="Self.FK__FmsFacilityCheckItem__FmsWorkCodeCycleUnit">
      <End Role="FmsWorkCodeCycleUnit" EntitySet="FmsWorkCodeCycleUnit" />
      <End Role="FmsFacilityCheckItem" EntitySet="FmsFacilityCheckItem" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsFacilityCheckItem__FmsWorkCodeWorkType" Association="Self.FK__FmsFacilityCheckItem__FmsWorkCodeWorkType">
      <End Role="FmsWorkCodeType" EntitySet="FmsWorkCodeType" />
      <End Role="FmsFacilityCheckItem" EntitySet="FmsFacilityCheckItem" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsFacilityCodeClass__CmSite" Association="Self.FK__FmsFacilityCodeClass__CmSite">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="FmsFacilityCodeClass" EntitySet="FmsFacilityCodeClass" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsFacilityCodeClass__FmsFacilityCodeClass" Association="Self.FK__FmsFacilityCodeClass__FmsFacilityCodeClass">
      <End Role="FmsFacilityCodeClass" EntitySet="FmsFacilityCodeClass" />
      <End Role="FmsFacilityCodeClass1" EntitySet="FmsFacilityCodeClass" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsFacilityOpera__725BF7F6" Association="Self.FK__FmsFacilityOpera__725BF7F6">
      <End Role="CmFacility" EntitySet="CmFacility" />
      <End Role="FmsFacilityOperationItem" EntitySet="FmsFacilityOperationItem" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsLicense__CmBusinessField" Association="Self.FK__FmsLicense__CmBusinessField">
      <End Role="CmBusinessField" EntitySet="CmBusinessField" />
      <End Role="FmsLicense" EntitySet="FmsLicense" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsLicense__CmSite" Association="Self.FK__FmsLicense__CmSite">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="FmsLicense" EntitySet="FmsLicense" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsMaterial__FmsMaterialCodeClass_AsFirstClassId" Association="Self.FK__FmsMaterial__FmsMaterialCodeClass_AsFirstClassId">
      <End Role="FmsMaterialCodeClass" EntitySet="FmsMaterialCodeClass" />
      <End Role="FmsMaterial" EntitySet="FmsMaterial" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsMaterial__FmsMaterialCodeClass_AsSecondClassId" Association="Self.FK__FmsMaterial__FmsMaterialCodeClass_AsSecondClassId">
      <End Role="FmsMaterialCodeClass" EntitySet="FmsMaterialCodeClass" />
      <End Role="FmsMaterial" EntitySet="FmsMaterial" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsMaterial__FmsMaterialCodeClass_AsThirdClassId" Association="Self.FK__FmsMaterial__FmsMaterialCodeClass_AsThirdClassId">
      <End Role="FmsMaterialCodeClass" EntitySet="FmsMaterialCodeClass" />
      <End Role="FmsMaterial" EntitySet="FmsMaterial" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsMaterialCarriedForward__CmBusinessField" Association="Self.FK__FmsMaterialCarriedForward__CmBusinessField">
      <End Role="CmBusinessField" EntitySet="CmBusinessField" />
      <End Role="FmsMaterialCarriedForward" EntitySet="FmsMaterialCarriedForward" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsMaterialCarriedForward__CmSite" Association="Self.FK__FmsMaterialCarriedForward__CmSite">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="FmsMaterialCarriedForward" EntitySet="FmsMaterialCarriedForward" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsMaterialCodeClass__CmSite" Association="Self.FK__FmsMaterialCodeClass__CmSite">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="FmsMaterialCodeClass" EntitySet="FmsMaterialCodeClass" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsMaterialCodeClass__FmsMaterialCodeClass" Association="Self.FK__FmsMaterialCodeClass__FmsMaterialCodeClass">
      <End Role="FmsMaterialCodeClass" EntitySet="FmsMaterialCodeClass" />
      <End Role="FmsMaterialCodeClass1" EntitySet="FmsMaterialCodeClass" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsMaterialCodeLocation__CmBusinessField" Association="Self.FK__FmsMaterialCodeLocation__CmBusinessField">
      <End Role="CmBusinessField" EntitySet="CmBusinessField" />
      <End Role="FmsMaterialCodeLocation" EntitySet="FmsMaterialCodeLocation" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsMaterialCodeLocation__CmSite" Association="Self.FK__FmsMaterialCodeLocation__CmSite">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="FmsMaterialCodeLocation" EntitySet="FmsMaterialCodeLocation" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsMaterialCodeType__CmSite" Association="Self.FK__FmsMaterialCodeType__CmSite">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="FmsMaterialCodeType" EntitySet="FmsMaterialCodeType" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsMaterialOrder__CmBusinessField" Association="Self.FK__FmsMaterialOrder__CmBusinessField">
      <End Role="CmBusinessField" EntitySet="CmBusinessField" />
      <End Role="FmsMaterialPurchaseOrder" EntitySet="FmsMaterialPurchaseOrder" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsMaterialOrder__CmSite" Association="Self.FK__FmsMaterialOrder__CmSite">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="FmsMaterialPurchaseOrder" EntitySet="FmsMaterialPurchaseOrder" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsMaterialOrder__CmUser" Association="Self.FK__FmsMaterialOrder__CmUser">
      <End Role="CmUser" EntitySet="CmUser" />
      <End Role="FmsMaterialPurchaseOrder" EntitySet="FmsMaterialPurchaseOrder" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsMaterialPurchaseOrder__CmFile" Association="Self.FK__FmsMaterialPurchaseOrder__CmFile">
      <End Role="CmFile" EntitySet="CmFile" />
      <End Role="FmsMaterialPurchaseOrder" EntitySet="FmsMaterialPurchaseOrder" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsMaterialPurchaseOrder__FmsMaterialTradeCompany" Association="Self.FK__FmsMaterialPurchaseOrder__FmsMaterialTradeCompany">
      <End Role="FmsMaterialTradeCompany" EntitySet="FmsMaterialTradeCompany" />
      <End Role="FmsMaterialPurchaseOrder" EntitySet="FmsMaterialPurchaseOrder" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsMaterialPurchaseRequest__CmUser_AsRequestUserId" Association="Self.FK__FmsMaterialPurchaseRequest__CmUser_AsRequestUserId">
      <End Role="CmUser" EntitySet="CmUser" />
      <End Role="FmsMaterialPurchaseRequest" EntitySet="FmsMaterialPurchaseRequest" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsMaterialPurchaseRequest__CmUser1_AsApprovalUserId" Association="Self.FK__FmsMaterialPurchaseRequest__CmUser1_AsApprovalUserId">
      <End Role="CmUser" EntitySet="CmUser" />
      <End Role="FmsMaterialPurchaseRequest" EntitySet="FmsMaterialPurchaseRequest" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsMaterialPurchasingRequest__CmBusinessField" Association="Self.FK__FmsMaterialPurchasingRequest__CmBusinessField">
      <End Role="CmBusinessField" EntitySet="CmBusinessField" />
      <End Role="FmsMaterialPurchaseRequest" EntitySet="FmsMaterialPurchaseRequest" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsMaterialPurchasingRequest__CmSite" Association="Self.FK__FmsMaterialPurchasingRequest__CmSite">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="FmsMaterialPurchaseRequest" EntitySet="FmsMaterialPurchaseRequest" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsMaterialPurchasingRequest__FmsMaterialCodeProcess" Association="Self.FK__FmsMaterialPurchasingRequest__FmsMaterialCodeProcess">
      <End Role="FmsMaterialCodeProgress" EntitySet="FmsMaterialCodeProgress" />
      <End Role="FmsMaterialPurchaseRequest" EntitySet="FmsMaterialPurchaseRequest" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsMaterialStored__CmBusinessField" Association="Self.FK__FmsMaterialStored__CmBusinessField">
      <End Role="CmBusinessField" EntitySet="CmBusinessField" />
      <End Role="FmsMaterialStored" EntitySet="FmsMaterialStored" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsMaterialStored__CmSite" Association="Self.FK__FmsMaterialStored__CmSite">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="FmsMaterialStored" EntitySet="FmsMaterialStored" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsMaterialStored__CmUser_AsStoredUserId" Association="Self.FK__FmsMaterialStored__CmUser_AsStoredUserId">
      <End Role="CmUser" EntitySet="CmUser" />
      <End Role="FmsMaterialStored" EntitySet="FmsMaterialStored" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsMaterialStored__CmUser1_AsApprovalUserId" Association="Self.FK__FmsMaterialStored__CmUser1_AsApprovalUserId">
      <End Role="CmUser" EntitySet="CmUser" />
      <End Role="FmsMaterialStored" EntitySet="FmsMaterialStored" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsMaterialTradeCompany__CmSite" Association="Self.FK__FmsMaterialTradeCompany__CmSite">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="FmsMaterialTradeCompany" EntitySet="FmsMaterialTradeCompany" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsMaterialWarehouse__CmBusinessField" Association="Self.FK__FmsMaterialWarehouse__CmBusinessField">
      <End Role="CmBusinessField" EntitySet="CmBusinessField" />
      <End Role="FmsMaterialWarehouse" EntitySet="FmsMaterialWarehouse" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsMaterialWarehouse__CmSite" Association="Self.FK__FmsMaterialWarehouse__CmSite">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="FmsMaterialWarehouse" EntitySet="FmsMaterialWarehouse" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsWorkCodeCauseClass__CmSite" Association="Self.FK__FmsWorkCodeCauseClass__CmSite">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="FmsWorkCodeCauseClass" EntitySet="FmsWorkCodeCauseClass" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsWorkCodeCycleUnit__CmSite" Association="Self.FK__FmsWorkCodeCycleUnit__CmSite">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="FmsWorkCodeCycleUnit" EntitySet="FmsWorkCodeCycleUnit" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsWorkCodeEmergency__CmSite" Association="Self.FK__FmsWorkCodeEmergency__CmSite">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="FmsWorkCodeEmergency" EntitySet="FmsWorkCodeEmergency" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsWorkCodeHolidayWorkType__CmSite" Association="Self.FK__FmsWorkCodeHolidayWorkType__CmSite">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="FmsWorkCodeHolidayWorkType" EntitySet="FmsWorkCodeHolidayWorkType" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsWorkCodeLegalInspectionAgency__CmSite" Association="Self.FK__FmsWorkCodeLegalInspectionAgency__CmSite">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="FmsWorkCodeLegalInspectionAgency" EntitySet="FmsWorkCodeLegalInspectionAgency" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsWorkOrder__CmBusinessField" Association="Self.FK__FmsWorkOrder__CmBusinessField">
      <End Role="CmBusinessField" EntitySet="CmBusinessField" />
      <End Role="FmsWorkOrder" EntitySet="FmsWorkOrder" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsWorkOrder__CmSite" Association="Self.FK__FmsWorkOrder__CmSite">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="FmsWorkOrder" EntitySet="FmsWorkOrder" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsWorkOrder__CmUser" Association="Self.FK__FmsWorkOrder__CmUser">
      <End Role="CmUser" EntitySet="CmUser" />
      <End Role="FmsWorkOrder" EntitySet="FmsWorkOrder" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsWorkOrder__FmsWorkCodeEmergency" Association="Self.FK__FmsWorkOrder__FmsWorkCodeEmergency">
      <End Role="FmsWorkCodeEmergency" EntitySet="FmsWorkCodeEmergency" />
      <End Role="FmsWorkOrder" EntitySet="FmsWorkOrder" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsWorkOrder__FmsWorkRequest" Association="Self.FK__FmsWorkOrder__FmsWorkRequest">
      <End Role="FmsWorkRequest" EntitySet="FmsWorkRequest" />
      <End Role="FmsWorkOrder" EntitySet="FmsWorkOrder" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsWorkOrderToFacility__FmsWorkOrder" Association="Self.FK__FmsWorkOrderToFacility__FmsWorkOrder">
      <End Role="FmsWorkOrder" EntitySet="FmsWorkOrder" />
      <End Role="FmsWorkOrderToFacility" EntitySet="FmsWorkOrderToFacility" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsWorkRequest__CmBusinessField" Association="Self.FK__FmsWorkRequest__CmBusinessField">
      <End Role="CmBusinessField" EntitySet="CmBusinessField" />
      <End Role="FmsWorkRequest" EntitySet="FmsWorkRequest" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsWorkRequest__CmSite" Association="Self.FK__FmsWorkRequest__CmSite">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="FmsWorkRequest" EntitySet="FmsWorkRequest" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsWorkRequest__CmUser_AsRequestUserId" Association="Self.FK__FmsWorkRequest__CmUser_AsRequestUserId">
      <End Role="CmUser" EntitySet="CmUser" />
      <End Role="FmsWorkRequest" EntitySet="FmsWorkRequest" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsWorkRequest__CmUser1_AsRejectUserId" Association="Self.FK__FmsWorkRequest__CmUser1_AsRejectUserId">
      <End Role="CmUser" EntitySet="CmUser" />
      <End Role="FmsWorkRequest" EntitySet="FmsWorkRequest" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsWorkRequest__FmsWorkCodeProgress" Association="Self.FK__FmsWorkRequest__FmsWorkCodeProgress">
      <End Role="FmsWorkCodeProgress" EntitySet="FmsWorkCodeProgress" />
      <End Role="FmsWorkRequest" EntitySet="FmsWorkRequest" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsWorkRequest__FmsWorkCodeWorkType" Association="Self.FK__FmsWorkRequest__FmsWorkCodeWorkType">
      <End Role="FmsWorkCodeType" EntitySet="FmsWorkCodeType" />
      <End Role="FmsWorkRequest" EntitySet="FmsWorkRequest" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsWorkRequest__FmsWorkSchedule" Association="Self.FK__FmsWorkRequest__FmsWorkSchedule">
      <End Role="FmsWorkSchedule" EntitySet="FmsWorkSchedule" />
      <End Role="FmsWorkRequest" EntitySet="FmsWorkRequest" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsWorkRequestToFacility__FmsWorkRequest" Association="Self.FK__FmsWorkRequestToFacility__FmsWorkRequest">
      <End Role="FmsWorkRequest" EntitySet="FmsWorkRequest" />
      <End Role="FmsWorkRequestToFacility" EntitySet="FmsWorkRequestToFacility" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsWorkResult__CmUser_AsWorkerUserId" Association="Self.FK__FmsWorkResult__CmUser_AsWorkerUserId">
      <End Role="CmUser" EntitySet="CmUser" />
      <End Role="FmsWorkResult" EntitySet="FmsWorkResult" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsWorkResult__CmUser1_AsConfirmedUserId" Association="Self.FK__FmsWorkResult__CmUser1_AsConfirmedUserId">
      <End Role="CmUser" EntitySet="CmUser" />
      <End Role="FmsWorkResult" EntitySet="FmsWorkResult" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsWorkResult__FmsWorkCodeCauseClass" Association="Self.FK__FmsWorkResult__FmsWorkCodeCauseClass">
      <End Role="FmsWorkCodeCauseClass" EntitySet="FmsWorkCodeCauseClass" />
      <End Role="FmsWorkResult" EntitySet="FmsWorkResult" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsWorkResult__FmsWorkOrder" Association="Self.FK__FmsWorkResult__FmsWorkOrder">
      <End Role="FmsWorkOrder" EntitySet="FmsWorkOrder" />
      <End Role="FmsWorkResult" EntitySet="FmsWorkResult" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsWorkResult__FmsWorkRequest" Association="Self.FK__FmsWorkResult__FmsWorkRequest">
      <End Role="FmsWorkRequest" EntitySet="FmsWorkRequest" />
      <End Role="FmsWorkResult" EntitySet="FmsWorkResult" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsWorkResultCheckItem__CmFacility" Association="Self.FK__FmsWorkResultCheckItem__CmFacility">
      <End Role="CmFacility" EntitySet="CmFacility" />
      <End Role="FmsWorkResultCheckItem" EntitySet="FmsWorkResultCheckItem" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsWorkResultCheckItem__FmsFacilityCheckItem" Association="Self.FK__FmsWorkResultCheckItem__FmsFacilityCheckItem">
      <End Role="FmsFacilityCheckItem" EntitySet="FmsFacilityCheckItem" />
      <End Role="FmsWorkResultCheckItem" EntitySet="FmsWorkResultCheckItem" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsWorkResultCheckItem__FmsWorkResult" Association="Self.FK__FmsWorkResultCheckItem__FmsWorkResult">
      <End Role="FmsWorkResult" EntitySet="FmsWorkResult" />
      <End Role="FmsWorkResultCheckItem" EntitySet="FmsWorkResultCheckItem" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsWorkResultFile__CmFile" Association="Self.FK__FmsWorkResultFile__CmFile">
      <End Role="CmFile" EntitySet="CmFile" />
      <End Role="FmsWorkResultFile" EntitySet="FmsWorkResultFile" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsWorkResultFile__FmsWorkResult" Association="Self.FK__FmsWorkResultFile__FmsWorkResult">
      <End Role="FmsWorkResult" EntitySet="FmsWorkResult" />
      <End Role="FmsWorkResultFile" EntitySet="FmsWorkResultFile" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsWorkResultLaw__FmsWorkResult" Association="Self.FK__FmsWorkResultLaw__FmsWorkResult">
      <End Role="FmsWorkResult" EntitySet="FmsWorkResult" />
      <End Role="FmsWorkResultLaw" EntitySet="FmsWorkResultLaw" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsWorkResultToFacility__CmFacility" Association="Self.FK__FmsWorkResultToFacility__CmFacility">
      <End Role="CmFacility" EntitySet="CmFacility" />
      <End Role="FmsWorkResultToFacility" EntitySet="FmsWorkResultToFacility" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsWorkResultToFacility__FmsWorkOrder" Association="Self.FK__FmsWorkResultToFacility__FmsWorkOrder">
      <End Role="FmsWorkResult" EntitySet="FmsWorkResult" />
      <End Role="FmsWorkResultToFacility" EntitySet="FmsWorkResultToFacility" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsWorkSchedule__CmBusinessField" Association="Self.FK__FmsWorkSchedule__CmBusinessField">
      <End Role="CmBusinessField" EntitySet="CmBusinessField" />
      <End Role="FmsWorkSchedule" EntitySet="FmsWorkSchedule" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsWorkSchedule__CmUser" Association="Self.FK__FmsWorkSchedule__CmUser">
      <End Role="CmUser" EntitySet="CmUser" />
      <End Role="FmsWorkSchedule" EntitySet="FmsWorkSchedule" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsWorkSchedule__FmsWorkCodeCycleUnit" Association="Self.FK__FmsWorkSchedule__FmsWorkCodeCycleUnit">
      <End Role="FmsWorkCodeCycleUnit" EntitySet="FmsWorkCodeCycleUnit" />
      <End Role="FmsWorkSchedule" EntitySet="FmsWorkSchedule" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsWorkSchedule__FmsWorkCodeHolidayWorkType" Association="Self.FK__FmsWorkSchedule__FmsWorkCodeHolidayWorkType">
      <End Role="FmsWorkCodeHolidayWorkType" EntitySet="FmsWorkCodeHolidayWorkType" />
      <End Role="FmsWorkSchedule" EntitySet="FmsWorkSchedule" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsWorkSchedule__FmsWorkCodeWorkType" Association="Self.FK__FmsWorkSchedule__FmsWorkCodeWorkType">
      <End Role="FmsWorkCodeType" EntitySet="FmsWorkCodeType" />
      <End Role="FmsWorkSchedule" EntitySet="FmsWorkSchedule" />
    </AssociationSet>
    <AssociationSet Name="FK__FmsWorkScheduleToFacility__FmsWorkSchedule" Association="Self.FK__FmsWorkScheduleToFacility__FmsWorkSchedule">
      <End Role="FmsWorkSchedule" EntitySet="FmsWorkSchedule" />
      <End Role="FmsWorkScheduleToFacility" EntitySet="FmsWorkScheduleToFacility" />
    </AssociationSet>
    <AssociationSet Name="FK_BemsAlarmLog_BemsAlarmSetting" Association="Self.FK_BemsAlarmLog_BemsAlarmSetting">
      <End Role="BemsAlarmSetting" EntitySet="BemsAlarmSetting" />
      <End Role="BemsAlarmLog" EntitySet="BemsAlarmLog" />
    </AssociationSet>
    <AssociationSet Name="FK_BemsAlarmSetting_BemsFacilityType" Association="Self.FK_BemsAlarmSetting_BemsFacilityType">
      <End Role="BemsFacilityType" EntitySet="BemsFacilityType" />
      <End Role="BemsAlarmSetting" EntitySet="BemsAlarmSetting" />
    </AssociationSet>
    <AssociationSet Name="FK_BemsAlarmSetting_CmFacility" Association="Self.FK_BemsAlarmSetting_CmFacility">
      <End Role="CmFacility" EntitySet="CmFacility" />
      <End Role="BemsAlarmSetting" EntitySet="BemsAlarmSetting" />
    </AssociationSet>
    <AssociationSet Name="FK_BemsAlarmSetting_CmSite1" Association="Self.FK_BemsAlarmSetting_CmSite1">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="BemsAlarmSetting" EntitySet="BemsAlarmSetting" />
    </AssociationSet>
    <AssociationSet Name="FK_BemsChartInfo_BemsFacilityType" Association="Self.FK_BemsChartInfo_BemsFacilityType">
      <End Role="BemsFacilityType" EntitySet="BemsFacilityType" />
      <End Role="BemsChartInfo" EntitySet="BemsChartInfo" />
    </AssociationSet>
    <AssociationSet Name="FK_BemsChartInfo_CmSite" Association="Self.FK_BemsChartInfo_CmSite">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="BemsChartInfo" EntitySet="BemsChartInfo" />
    </AssociationSet>
    <AssociationSet Name="FK_BemsControlPointHistory_BemsFacilityType" Association="Self.FK_BemsControlPointHistory_BemsFacilityType">
      <End Role="BemsFacilityType" EntitySet="BemsFacilityType" />
      <End Role="BemsControlPointHistory" EntitySet="BemsControlPointHistory" />
    </AssociationSet>
    <AssociationSet Name="FK_BemsControlPointHistory_BemsMonitoringPoint" Association="Self.FK_BemsControlPointHistory_BemsMonitoringPoint">
      <End Role="BemsMonitoringPoint" EntitySet="BemsMonitoringPoint" />
      <End Role="BemsControlPointHistory" EntitySet="BemsControlPointHistory" />
    </AssociationSet>
    <AssociationSet Name="FK_BemsEnergyCost_CmFacility" Association="Self.FK_BemsEnergyCost_CmFacility">
      <End Role="CmFacility" EntitySet="CmFacility" />
      <End Role="BemsEnergyCost" EntitySet="BemsEnergyCost" />
    </AssociationSet>
    <AssociationSet Name="FK_BemsEnergyDailyRegression_CmSite" Association="Self.FK_BemsEnergyDailyRegression_CmSite">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="BemsEnergyDailyRegression" EntitySet="BemsEnergyDailyRegression" />
    </AssociationSet>
    <AssociationSet Name="FK_BemsFormulaParameter_CmFacility" Association="Self.FK_BemsFormulaParameter_CmFacility">
      <End Role="CmFacility" EntitySet="CmFacility" />
      <End Role="BemsFormulaParameter" EntitySet="BemsFormulaParameter" />
    </AssociationSet>
    <AssociationSet Name="FK_BemsMonitoringPoint_BemsFacilityType" Association="Self.FK_BemsMonitoringPoint_BemsFacilityType">
      <End Role="BemsFacilityType" EntitySet="BemsFacilityType" />
      <End Role="BemsMonitoringPoint" EntitySet="BemsMonitoringPoint" />
    </AssociationSet>
    <AssociationSet Name="FK_BemsMonitoringPoint_CmFacility" Association="Self.FK_BemsMonitoringPoint_CmFacility">
      <End Role="CmFacility" EntitySet="CmFacility" />
      <End Role="BemsMonitoringPoint" EntitySet="BemsMonitoringPoint" />
    </AssociationSet>
    <AssociationSet Name="FK_BemsMonitoringPointConfig_BemsFacilityType1" Association="Self.FK_BemsMonitoringPointConfig_BemsFacilityType1">
      <End Role="BemsFacilityType" EntitySet="BemsFacilityType" />
      <End Role="BemsMonitoringPointConfig" EntitySet="BemsMonitoringPointConfig" />
    </AssociationSet>
    <AssociationSet Name="FK_BemsMonitoringPointConfig_BemsMonitoringPoint" Association="Self.FK_BemsMonitoringPointConfig_BemsMonitoringPoint">
      <End Role="BemsMonitoringPoint" EntitySet="BemsMonitoringPoint" />
      <End Role="BemsMonitoringPointConfig" EntitySet="BemsMonitoringPointConfig" />
    </AssociationSet>
    <AssociationSet Name="FK_BemsPeakFacility_CmFacility" Association="Self.FK_BemsPeakFacility_CmFacility">
      <End Role="CmFacility" EntitySet="CmFacility" />
      <End Role="BemsPeakFacility" EntitySet="BemsPeakFacility" />
    </AssociationSet>
    <AssociationSet Name="FK_BemsPeakHIstory_CmSite" Association="Self.FK_BemsPeakHIstory_CmSite">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="BemsPeakHistory" EntitySet="BemsPeakHistory" />
    </AssociationSet>
    <AssociationSet Name="FK_BemsPeakInfo_CmSite" Association="Self.FK_BemsPeakInfo_CmSite">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="BemsPeakInfo" EntitySet="BemsPeakInfo" />
    </AssociationSet>
    <AssociationSet Name="FK_BemsPeopleIncrease_CmSite" Association="Self.FK_BemsPeopleIncrease_CmSite">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="BemsPeopleIncrease" EntitySet="BemsPeopleIncrease" />
    </AssociationSet>
    <AssociationSet Name="FK_BemsPriceCode_BemsFuelType" Association="Self.FK_BemsPriceCode_BemsFuelType">
      <End Role="BemsFuelType" EntitySet="BemsFuelType" />
      <End Role="BemsPriceCode" EntitySet="BemsPriceCode" />
    </AssociationSet>
    <AssociationSet Name="FK_BemsPriceFormula_BemsFormula" Association="Self.FK_BemsPriceFormula_BemsFormula">
      <End Role="BemsFormula" EntitySet="BemsFormula" />
      <End Role="BemsPriceFormula" EntitySet="BemsPriceFormula" />
    </AssociationSet>
    <AssociationSet Name="FK_BemsPriceFormula_BemsPriceType" Association="Self.FK_BemsPriceFormula_BemsPriceType">
      <End Role="BemsPriceType" EntitySet="BemsPriceType" />
      <End Role="BemsPriceFormula" EntitySet="BemsPriceFormula" />
    </AssociationSet>
    <AssociationSet Name="FK_BemsPriceMeta_BemsPriceType" Association="Self.FK_BemsPriceMeta_BemsPriceType">
      <End Role="BemsPriceType" EntitySet="BemsPriceType" />
      <End Role="BemsPriceMeta" EntitySet="BemsPriceMeta" />
    </AssociationSet>
    <AssociationSet Name="FK_BemsPriceType_BemsFuelType1" Association="Self.FK_BemsPriceType_BemsFuelType1">
      <End Role="BemsFuelType" EntitySet="BemsFuelType" />
      <End Role="BemsPriceType" EntitySet="BemsPriceType" />
    </AssociationSet>
    <AssociationSet Name="FK_BemsRentalRate_CmSite" Association="Self.FK_BemsRentalRate_CmSite">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="BemsRentalRate" EntitySet="BemsRentalRate" />
    </AssociationSet>
    <AssociationSet Name="FK_BemsSitePrice_BemsFuelType" Association="Self.FK_BemsSitePrice_BemsFuelType">
      <End Role="BemsFuelType" EntitySet="BemsFuelType" />
      <End Role="BemsSitePrice" EntitySet="BemsSitePrice" />
    </AssociationSet>
    <AssociationSet Name="FK_BemsSitePrice_BemsPriceCode" Association="Self.FK_BemsSitePrice_BemsPriceCode">
      <End Role="BemsPriceCode" EntitySet="BemsPriceCode" />
      <End Role="BemsSitePrice" EntitySet="BemsSitePrice" />
    </AssociationSet>
    <AssociationSet Name="FK_BemsSitePrice_BemsPriceType" Association="Self.FK_BemsSitePrice_BemsPriceType">
      <End Role="BemsPriceType" EntitySet="BemsPriceType" />
      <End Role="BemsSitePrice" EntitySet="BemsSitePrice" />
    </AssociationSet>
    <AssociationSet Name="FK_BemsSitePrice_CmSite1" Association="Self.FK_BemsSitePrice_CmSite1">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="BemsSitePrice" EntitySet="BemsSitePrice" />
    </AssociationSet>
    <AssociationSet Name="FK_BemsSitePriceHistory_BemsFuelType" Association="Self.FK_BemsSitePriceHistory_BemsFuelType">
      <End Role="BemsFuelType" EntitySet="BemsFuelType" />
      <End Role="BemsSitePriceHistory" EntitySet="BemsSitePriceHistory" />
    </AssociationSet>
    <AssociationSet Name="FK_BemsSitePriceHistory_BemsPriceCode" Association="Self.FK_BemsSitePriceHistory_BemsPriceCode">
      <End Role="BemsPriceCode" EntitySet="BemsPriceCode" />
      <End Role="BemsSitePriceHistory" EntitySet="BemsSitePriceHistory" />
    </AssociationSet>
    <AssociationSet Name="FK_BemsSitePriceHistory_BemsPriceType" Association="Self.FK_BemsSitePriceHistory_BemsPriceType">
      <End Role="BemsPriceType" EntitySet="BemsPriceType" />
      <End Role="BemsSitePriceHistory" EntitySet="BemsSitePriceHistory" />
    </AssociationSet>
    <AssociationSet Name="FK_BemsSitePriceHistory_CmSite" Association="Self.FK_BemsSitePriceHistory_CmSite">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="BemsSitePriceHistory" EntitySet="BemsSitePriceHistory" />
    </AssociationSet>
    <AssociationSet Name="FK_CmAnnouncement_CmBusinessField" Association="Self.FK_CmAnnouncement_CmBusinessField">
      <End Role="CmBusinessField" EntitySet="CmBusinessField" />
      <End Role="CmAnnouncement" EntitySet="CmAnnouncement" />
    </AssociationSet>
    <AssociationSet Name="FK_CmAnnouncement_CmFile" Association="Self.FK_CmAnnouncement_CmFile">
      <End Role="CmFile" EntitySet="CmFile" />
      <End Role="CmAnnouncement" EntitySet="CmAnnouncement" />
    </AssociationSet>
    <AssociationSet Name="FK_CmAnnouncement_CmUser" Association="Self.FK_CmAnnouncement_CmUser">
      <End Role="CmUser" EntitySet="CmUser" />
      <End Role="CmAnnouncement" EntitySet="CmAnnouncement" />
    </AssociationSet>
    <AssociationSet Name="FK_CmFacilityTempSet_CmFacility" Association="Self.FK_CmFacilityTempSet_CmFacility">
      <End Role="CmFacility" EntitySet="CmFacility" />
      <End Role="CmFacilityTempSet" EntitySet="CmFacilityTempSet" />
    </AssociationSet>
    <AssociationSet Name="FK_CmFacilityTempSet_CmSite" Association="Self.FK_CmFacilityTempSet_CmSite">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="CmFacilityTempSet" EntitySet="CmFacilityTempSet" />
    </AssociationSet>
    <AssociationSet Name="FK_CmMenu_CmSite" Association="Self.FK_CmMenu_CmSite">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="CmMenu" EntitySet="CmMenu" />
    </AssociationSet>
    <AssociationSet Name="FK_CmPartnerType_CmPartner" Association="Self.FK_CmPartnerType_CmPartner">
      <End Role="CmPartnerType" EntitySet="CmPartnerType" />
      <End Role="CmPartner" EntitySet="CmPartner" />
    </AssociationSet>
    <AssociationSet Name="FK_CmPatrolCourse_CmSite" Association="Self.FK_CmPatrolCourse_CmSite">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="CmPatrolCourse" EntitySet="CmPatrolCourse" />
    </AssociationSet>
    <AssociationSet Name="FK_CmPatrolCoursePos_CmPatrolCourse" Association="Self.FK_CmPatrolCoursePos_CmPatrolCourse">
      <End Role="CmPatrolCourse" EntitySet="CmPatrolCourse" />
      <End Role="CmPatrolCoursePos" EntitySet="CmPatrolCoursePos" />
    </AssociationSet>
    <AssociationSet Name="FK_CmPatrolCoursePos_CmSite" Association="Self.FK_CmPatrolCoursePos_CmSite">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="CmPatrolCoursePos" EntitySet="CmPatrolCoursePos" />
    </AssociationSet>
    <AssociationSet Name="FK_CmPatrolGroup_CmSite" Association="Self.FK_CmPatrolGroup_CmSite">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="CmPatrolGroup" EntitySet="CmPatrolGroup" />
    </AssociationSet>
    <AssociationSet Name="FK_CmPatrolGroupUser_CmPatrolGroup" Association="Self.FK_CmPatrolGroupUser_CmPatrolGroup">
      <End Role="CmPatrolGroup" EntitySet="CmPatrolGroup" />
      <End Role="CmPatrolGroupUser" EntitySet="CmPatrolGroupUser" />
    </AssociationSet>
    <AssociationSet Name="FK_CmPatrolGroupUser_CmUser" Association="Self.FK_CmPatrolGroupUser_CmUser">
      <End Role="CmUser" EntitySet="CmUser" />
      <End Role="CmPatrolGroupUser" EntitySet="CmPatrolGroupUser" />
    </AssociationSet>
    <AssociationSet Name="FK_CmPatrolHistory_CmPatrolSchedule" Association="Self.FK_CmPatrolHistory_CmPatrolSchedule">
      <End Role="CmPatrolSchedule" EntitySet="CmPatrolSchedule" />
      <End Role="CmPatrolHistory" EntitySet="CmPatrolHistory" />
    </AssociationSet>
    <AssociationSet Name="FK_CmPatrolHistory_CmPatrolType" Association="Self.FK_CmPatrolHistory_CmPatrolType">
      <End Role="CmPatrolType" EntitySet="CmPatrolType" />
      <End Role="CmPatrolHistory" EntitySet="CmPatrolHistory" />
    </AssociationSet>
    <AssociationSet Name="FK_CmPatrolHistory_CmSite" Association="Self.FK_CmPatrolHistory_CmSite">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="CmPatrolHistory" EntitySet="CmPatrolHistory" />
    </AssociationSet>
    <AssociationSet Name="FK_CmPatrolHistoryPos_CmPatrolPos" Association="Self.FK_CmPatrolHistoryPos_CmPatrolPos">
      <End Role="CmPatrolPos" EntitySet="CmPatrolPos" />
      <End Role="CmPatrolHistoryPos" EntitySet="CmPatrolHistoryPos" />
    </AssociationSet>
    <AssociationSet Name="FK_CmPatrolHistoryPos_CmPatrolType" Association="Self.FK_CmPatrolHistoryPos_CmPatrolType">
      <End Role="CmPatrolType" EntitySet="CmPatrolType" />
      <End Role="CmPatrolHistoryPos" EntitySet="CmPatrolHistoryPos" />
    </AssociationSet>
    <AssociationSet Name="FK_CmPatrolHistoryPos_CmSite" Association="Self.FK_CmPatrolHistoryPos_CmSite">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="CmPatrolHistoryPos" EntitySet="CmPatrolHistoryPos" />
    </AssociationSet>
    <AssociationSet Name="FK_CmPatrolPlan_CmPatrolCourse" Association="Self.FK_CmPatrolPlan_CmPatrolCourse">
      <End Role="CmPatrolCourse" EntitySet="CmPatrolCourse" />
      <End Role="CmPatrolPlan" EntitySet="CmPatrolPlan" />
    </AssociationSet>
    <AssociationSet Name="FK_CmPatrolPlan_CmPatrolGroup" Association="Self.FK_CmPatrolPlan_CmPatrolGroup">
      <End Role="CmPatrolGroup" EntitySet="CmPatrolGroup" />
      <End Role="CmPatrolPlan" EntitySet="CmPatrolPlan" />
    </AssociationSet>
    <AssociationSet Name="FK_CmPatrolPlan_CmSite" Association="Self.FK_CmPatrolPlan_CmSite">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="CmPatrolPlan" EntitySet="CmPatrolPlan" />
    </AssociationSet>
    <AssociationSet Name="FK_CmPatrolPos_CmBuilding" Association="Self.FK_CmPatrolPos_CmBuilding">
      <End Role="CmBuilding" EntitySet="CmBuilding" />
      <End Role="CmPatrolPos" EntitySet="CmPatrolPos" />
    </AssociationSet>
    <AssociationSet Name="FK_CmPatrolPos_CmFloor" Association="Self.FK_CmPatrolPos_CmFloor">
      <End Role="CmFloor" EntitySet="CmFloor" />
      <End Role="CmPatrolPos" EntitySet="CmPatrolPos" />
    </AssociationSet>
    <AssociationSet Name="FK_CmPatrolPos_CmSite" Association="Self.FK_CmPatrolPos_CmSite">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="CmPatrolPos" EntitySet="CmPatrolPos" />
    </AssociationSet>
    <AssociationSet Name="FK_CmPatrolSchedule_CmPatrolPlan" Association="Self.FK_CmPatrolSchedule_CmPatrolPlan">
      <End Role="CmPatrolPlan" EntitySet="CmPatrolPlan" />
      <End Role="CmPatrolSchedule" EntitySet="CmPatrolSchedule" />
    </AssociationSet>
    <AssociationSet Name="FK_CmPatrolSchedule_CmSite" Association="Self.FK_CmPatrolSchedule_CmSite">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="CmPatrolSchedule" EntitySet="CmPatrolSchedule" />
    </AssociationSet>
    <AssociationSet Name="FK_CmPatrolType_CmSite" Association="Self.FK_CmPatrolType_CmSite">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="CmPatrolType" EntitySet="CmPatrolType" />
    </AssociationSet>
    <AssociationSet Name="FK_CmUser_CmBusinessField" Association="Self.FK_CmUser_CmBusinessField">
      <End Role="CmBusinessField" EntitySet="CmBusinessField" />
      <End Role="CmUser" EntitySet="CmUser" />
    </AssociationSet>
    <AssociationSet Name="FK_CmUser_CmCompany" Association="Self.FK_CmUser_CmCompany">
      <End Role="CmCompany" EntitySet="CmCompany" />
      <End Role="CmUser" EntitySet="CmUser" />
    </AssociationSet>
    <AssociationSet Name="FK_CmUser_CmDepartment" Association="Self.FK_CmUser_CmDepartment">
      <End Role="CmDepartment" EntitySet="CmDepartment" />
      <End Role="CmUser" EntitySet="CmUser" />
    </AssociationSet>
    <AssociationSet Name="FK_CmUser_CmPosition" Association="Self.FK_CmUser_CmPosition">
      <End Role="CmPosition" EntitySet="CmPosition" />
      <End Role="CmUser" EntitySet="CmUser" />
    </AssociationSet>
    <AssociationSet Name="FK_CmUser_CmUserGroup" Association="Self.FK_CmUser_CmUserGroup">
      <End Role="CmUserGroup" EntitySet="CmUserGroup" />
      <End Role="CmUser" EntitySet="CmUser" />
    </AssociationSet>
    <AssociationSet Name="FK_CmUserLoginHistory_CmUser" Association="Self.FK_CmUserLoginHistory_CmUser">
      <End Role="CmUser" EntitySet="CmUser" />
      <End Role="CmUserLoginHistory" EntitySet="CmUserLoginHistory" />
    </AssociationSet>
    <AssociationSet Name="FK_CmZoneTempHumiSet_CmBuilding" Association="Self.FK_CmZoneTempHumiSet_CmBuilding">
      <End Role="CmBuilding" EntitySet="CmBuilding" />
      <End Role="CmZoneTempHumiSet" EntitySet="CmZoneTempHumiSet" />
    </AssociationSet>
    <AssociationSet Name="FK_CmZoneTempHumiSet_CmFloor" Association="Self.FK_CmZoneTempHumiSet_CmFloor">
      <End Role="CmFloor" EntitySet="CmFloor" />
      <End Role="CmZoneTempHumiSet" EntitySet="CmZoneTempHumiSet" />
    </AssociationSet>
    <AssociationSet Name="FK_CmZoneTempHumiSet_CmSite" Association="Self.FK_CmZoneTempHumiSet_CmSite">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="CmZoneTempHumiSet" EntitySet="CmZoneTempHumiSet" />
    </AssociationSet>
    <AssociationSet Name="FK_CmZoneTempHumiSet_CmZone" Association="Self.FK_CmZoneTempHumiSet_CmZone">
      <End Role="CmZone" EntitySet="CmZone" />
      <End Role="CmZoneTempHumiSet" EntitySet="CmZoneTempHumiSet" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsAccident_CmCompany" Association="Self.FK_FmsAccident_CmCompany">
      <End Role="CmCompany" EntitySet="CmCompany" />
      <End Role="FmsAccident" EntitySet="FmsAccident" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsAccident_CmDepartment" Association="Self.FK_FmsAccident_CmDepartment">
      <End Role="CmDepartment" EntitySet="CmDepartment" />
      <End Role="FmsAccident" EntitySet="FmsAccident" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsAccident_CmFile1" Association="Self.FK_FmsAccident_CmFile1">
      <End Role="CmFile" EntitySet="CmFile" />
      <End Role="FmsAccident" EntitySet="FmsAccident" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsAccident_CmFile2" Association="Self.FK_FmsAccident_CmFile2">
      <End Role="CmFile" EntitySet="CmFile" />
      <End Role="FmsAccident" EntitySet="FmsAccident" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsAccident_CmFile3" Association="Self.FK_FmsAccident_CmFile3">
      <End Role="CmFile" EntitySet="CmFile" />
      <End Role="FmsAccident" EntitySet="FmsAccident" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsAccident_FmsAccidentCodeType" Association="Self.FK_FmsAccident_FmsAccidentCodeType">
      <End Role="FmsAccidentCodeType" EntitySet="FmsAccidentCodeType" />
      <End Role="FmsAccident" EntitySet="FmsAccident" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsBudgetDetail_FmsBudget" Association="Self.FK_FmsBudgetDetail_FmsBudget">
      <End Role="FmsBudget" EntitySet="FmsBudget" />
      <End Role="FmsBudgetDetail" EntitySet="FmsBudgetDetail" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsBudgetDetail_FmsBudgetCodeClass" Association="Self.FK_FmsBudgetDetail_FmsBudgetCodeClass">
      <End Role="FmsBudgetCodeClass" EntitySet="FmsBudgetCodeClass" />
      <End Role="FmsBudgetDetail" EntitySet="FmsBudgetDetail" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsBudgetDetailExecution_FmsBudgetDetail" Association="Self.FK_FmsBudgetDetailExecution_FmsBudgetDetail">
      <End Role="FmsBudgetDetail" EntitySet="FmsBudgetDetail" />
      <End Role="FmsBudgetDetailExecution" EntitySet="FmsBudgetDetailExecution" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsConstruction_CmFile1" Association="Self.FK_FmsConstruction_CmFile1">
      <End Role="CmFile" EntitySet="CmFile" />
      <End Role="FmsConstruction" EntitySet="FmsConstruction" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsConstruction_CmFile2" Association="Self.FK_FmsConstruction_CmFile2">
      <End Role="CmFile" EntitySet="CmFile" />
      <End Role="FmsConstruction" EntitySet="FmsConstruction" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsConstruction_CmFile3" Association="Self.FK_FmsConstruction_CmFile3">
      <End Role="CmFile" EntitySet="CmFile" />
      <End Role="FmsConstruction" EntitySet="FmsConstruction" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsConstruction_CmPartner" Association="Self.FK_FmsConstruction_CmPartner">
      <End Role="CmPartner" EntitySet="CmPartner" />
      <End Role="FmsConstruction" EntitySet="FmsConstruction" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsConstruction_FmsConstructionCodeProgress" Association="Self.FK_FmsConstruction_FmsConstructionCodeProgress">
      <End Role="FmsConstructionCodeProgress" EntitySet="FmsConstructionCodeProgress" />
      <End Role="FmsConstruction" EntitySet="FmsConstruction" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsConstruction_FmsConstructionCodeType" Association="Self.FK_FmsConstruction_FmsConstructionCodeType">
      <End Role="FmsConstructionCodeType" EntitySet="FmsConstructionCodeType" />
      <End Role="FmsConstruction" EntitySet="FmsConstruction" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsConstructionEstimation_CmUser" Association="Self.FK_FmsConstructionEstimation_CmUser">
      <End Role="CmUser" EntitySet="CmUser" />
      <End Role="FmsConstructionEstimation" EntitySet="FmsConstructionEstimation" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsConstructionEstimation_FmsConstruction" Association="Self.FK_FmsConstructionEstimation_FmsConstruction">
      <End Role="FmsConstruction" EntitySet="FmsConstruction" />
      <End Role="FmsConstructionEstimation" EntitySet="FmsConstructionEstimation" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsContract_CmPartner" Association="Self.FK_FmsContract_CmPartner">
      <End Role="CmPartner" EntitySet="CmPartner" />
      <End Role="FmsContract" EntitySet="FmsContract" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsContract_CmPartnerType" Association="Self.FK_FmsContract_CmPartnerType">
      <End Role="CmPartnerType" EntitySet="CmPartnerType" />
      <End Role="FmsContract" EntitySet="FmsContract" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsContract_FmsContractClass" Association="Self.FK_FmsContract_FmsContractClass">
      <End Role="FmsContractClass" EntitySet="FmsContractClass" />
      <End Role="FmsContract" EntitySet="FmsContract" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsContract_FmsContractMethod" Association="Self.FK_FmsContract_FmsContractMethod">
      <End Role="FmsContractMethod" EntitySet="FmsContractMethod" />
      <End Role="FmsContract" EntitySet="FmsContract" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsContract_FmsContractType" Association="Self.FK_FmsContract_FmsContractType">
      <End Role="FmsContractType" EntitySet="FmsContractType" />
      <End Role="FmsContract" EntitySet="FmsContract" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsContract_FmsPaymentType" Association="Self.FK_FmsContract_FmsPaymentType">
      <End Role="FmsPaymentType" EntitySet="FmsPaymentType" />
      <End Role="FmsContract" EntitySet="FmsContract" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsDailyCheckReport_CmUser" Association="Self.FK_FmsDailyCheckReport_CmUser">
      <End Role="CmUser" EntitySet="CmUser" />
      <End Role="FmsDailyCheckReport" EntitySet="FmsDailyCheckReport" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsDailyReport_CmBusinessField" Association="Self.FK_FmsDailyReport_CmBusinessField">
      <End Role="CmBusinessField" EntitySet="CmBusinessField" />
      <End Role="FmsDailyReport" EntitySet="FmsDailyReport" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsDailyReport_CmUser" Association="Self.FK_FmsDailyReport_CmUser">
      <End Role="CmUser" EntitySet="CmUser" />
      <End Role="FmsDailyReport" EntitySet="FmsDailyReport" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsEquipment_CmUser" Association="Self.FK_FmsEquipment_CmUser">
      <End Role="CmUser" EntitySet="CmUser" />
      <End Role="FmsEquipment" EntitySet="FmsEquipment" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsEquipment_FmsEquipmentCodeType" Association="Self.FK_FmsEquipment_FmsEquipmentCodeType">
      <End Role="FmsEquipmentCodeType" EntitySet="FmsEquipmentCodeType" />
      <End Role="FmsEquipment" EntitySet="FmsEquipment" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsEquipment_FmsMaterialWarehouse" Association="Self.FK_FmsEquipment_FmsMaterialWarehouse">
      <End Role="FmsMaterialWarehouse" EntitySet="FmsMaterialWarehouse" />
      <End Role="FmsEquipment" EntitySet="FmsEquipment" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsEquipmentHistory_FmsEquipment" Association="Self.FK_FmsEquipmentHistory_FmsEquipment">
      <End Role="FmsEquipment" EntitySet="FmsEquipment" />
      <End Role="FmsEquipmentHistory" EntitySet="FmsEquipmentHistory" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsEquipmentHistory_FmsEquipmentCodeStateType" Association="Self.FK_FmsEquipmentHistory_FmsEquipmentCodeStateType">
      <End Role="FmsEquipmentCodeStateType" EntitySet="FmsEquipmentCodeStateType" />
      <End Role="FmsEquipmentHistory" EntitySet="FmsEquipmentHistory" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsEquipmentHistory_FmsEquipmentRentInfo" Association="Self.FK_FmsEquipmentHistory_FmsEquipmentRentInfo">
      <End Role="FmsEquipmentRentInfo" EntitySet="FmsEquipmentRentInfo" />
      <End Role="FmsEquipmentHistory" EntitySet="FmsEquipmentHistory" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsEquipmentRentInfo_CmUser" Association="Self.FK_FmsEquipmentRentInfo_CmUser">
      <End Role="CmUser" EntitySet="CmUser" />
      <End Role="FmsEquipmentRentInfo" EntitySet="FmsEquipmentRentInfo" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsEquipmentRentInfo_CmUser1" Association="Self.FK_FmsEquipmentRentInfo_CmUser1">
      <End Role="CmUser" EntitySet="CmUser" />
      <End Role="FmsEquipmentRentInfo" EntitySet="FmsEquipmentRentInfo" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsEquipmentRentInfo_FmsEquipmentCodeStateType" Association="Self.FK_FmsEquipmentRentInfo_FmsEquipmentCodeStateType">
      <End Role="FmsEquipmentCodeStateType" EntitySet="FmsEquipmentCodeStateType" />
      <End Role="FmsEquipmentRentInfo" EntitySet="FmsEquipmentRentInfo" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsFacilityOperationReport_CmUser" Association="Self.FK_FmsFacilityOperationReport_CmUser">
      <End Role="CmUser" EntitySet="CmUser" />
      <End Role="FmsFacilityOperationReport" EntitySet="FmsFacilityOperationReport" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsManual_FmsManualType" Association="Self.FK_FmsManual_FmsManualType">
      <End Role="FmsManualType" EntitySet="FmsManualType" />
      <End Role="FmsManual" EntitySet="FmsManual" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsManualHistory_CmFile" Association="Self.FK_FmsManualHistory_CmFile">
      <End Role="CmFile" EntitySet="CmFile" />
      <End Role="FmsManualHistory" EntitySet="FmsManualHistory" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsManualHistory_CmUser" Association="Self.FK_FmsManualHistory_CmUser">
      <End Role="CmUser" EntitySet="CmUser" />
      <End Role="FmsManualHistory" EntitySet="FmsManualHistory" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsManualHistory_FmsManual" Association="Self.FK_FmsManualHistory_FmsManual">
      <End Role="FmsManual" EntitySet="FmsManual" />
      <End Role="FmsManualHistory" EntitySet="FmsManualHistory" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsMaterial_CmBusinessField" Association="Self.FK_FmsMaterial_CmBusinessField">
      <End Role="CmBusinessField" EntitySet="CmBusinessField" />
      <End Role="FmsMaterial" EntitySet="FmsMaterial" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsMaterial_CmFile" Association="Self.FK_FmsMaterial_CmFile">
      <End Role="CmFile" EntitySet="CmFile" />
      <End Role="FmsMaterial" EntitySet="FmsMaterial" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsMaterial_CmSite" Association="Self.FK_FmsMaterial_CmSite">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="FmsMaterial" EntitySet="FmsMaterial" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsMaterial_FmsMaterialCodeLocation" Association="Self.FK_FmsMaterial_FmsMaterialCodeLocation">
      <End Role="FmsMaterialCodeLocation" EntitySet="FmsMaterialCodeLocation" />
      <End Role="FmsMaterial" EntitySet="FmsMaterial" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsMaterial_FmsMaterialCodeType" Association="Self.FK_FmsMaterial_FmsMaterialCodeType">
      <End Role="FmsMaterialCodeType" EntitySet="FmsMaterialCodeType" />
      <End Role="FmsMaterial" EntitySet="FmsMaterial" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsMaterial_FmsMaterialTradeCompany" Association="Self.FK_FmsMaterial_FmsMaterialTradeCompany">
      <End Role="FmsMaterialTradeCompany" EntitySet="FmsMaterialTradeCompany" />
      <End Role="FmsMaterial" EntitySet="FmsMaterial" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsMaterial_FmsMaterialWarehouse" Association="Self.FK_FmsMaterial_FmsMaterialWarehouse">
      <End Role="FmsMaterialWarehouse" EntitySet="FmsMaterialWarehouse" />
      <End Role="FmsMaterial" EntitySet="FmsMaterial" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsMaterialPurchaseOrder_FmsMaterialPurchaseRequest" Association="Self.FK_FmsMaterialPurchaseOrder_FmsMaterialPurchaseRequest">
      <End Role="FmsMaterialPurchaseRequest" EntitySet="FmsMaterialPurchaseRequest" />
      <End Role="FmsMaterialPurchaseOrder" EntitySet="FmsMaterialPurchaseOrder" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsMaterialPurchaseOrderMaterial_FmsMaterial" Association="Self.FK_FmsMaterialPurchaseOrderMaterial_FmsMaterial">
      <End Role="FmsMaterial" EntitySet="FmsMaterial" />
      <End Role="FmsMaterialPurchaseOrderMaterial" EntitySet="FmsMaterialPurchaseOrderMaterial" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsMaterialPurchaseOrderMaterial_FmsMaterialPurchaseOrder" Association="Self.FK_FmsMaterialPurchaseOrderMaterial_FmsMaterialPurchaseOrder">
      <End Role="FmsMaterialPurchaseOrder" EntitySet="FmsMaterialPurchaseOrder" />
      <End Role="FmsMaterialPurchaseOrderMaterial" EntitySet="FmsMaterialPurchaseOrderMaterial" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsMaterialPurchaseRequest_FmsMaterialCodePurchaseType" Association="Self.FK_FmsMaterialPurchaseRequest_FmsMaterialCodePurchaseType">
      <End Role="FmsMaterialCodePurchaseType" EntitySet="FmsMaterialCodePurchaseType" />
      <End Role="FmsMaterialPurchaseRequest" EntitySet="FmsMaterialPurchaseRequest" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsMaterialPurchaseRequestMaterial_FmsMaterial" Association="Self.FK_FmsMaterialPurchaseRequestMaterial_FmsMaterial">
      <End Role="FmsMaterial" EntitySet="FmsMaterial" />
      <End Role="FmsMaterialPurchaseRequestMaterial" EntitySet="FmsMaterialPurchaseRequestMaterial" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsMaterialPurchaseRequestMaterial_FmsMaterialPurchaseRequest" Association="Self.FK_FmsMaterialPurchaseRequestMaterial_FmsMaterialPurchaseRequest">
      <End Role="FmsMaterialPurchaseRequest" EntitySet="FmsMaterialPurchaseRequest" />
      <End Role="FmsMaterialPurchaseRequestMaterial" EntitySet="FmsMaterialPurchaseRequestMaterial" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsMaterialRelease_CmBusinessField" Association="Self.FK_FmsMaterialRelease_CmBusinessField">
      <End Role="CmBusinessField" EntitySet="CmBusinessField" />
      <End Role="FmsMaterialRelease" EntitySet="FmsMaterialRelease" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsMaterialRelease_CmSite" Association="Self.FK_FmsMaterialRelease_CmSite">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="FmsMaterialRelease" EntitySet="FmsMaterialRelease" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsMaterialRelease_CmUser" Association="Self.FK_FmsMaterialRelease_CmUser">
      <End Role="CmUser" EntitySet="CmUser" />
      <End Role="FmsMaterialRelease" EntitySet="FmsMaterialRelease" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsMaterialRelease_CmUser1" Association="Self.FK_FmsMaterialRelease_CmUser1">
      <End Role="CmUser" EntitySet="CmUser" />
      <End Role="FmsMaterialRelease" EntitySet="FmsMaterialRelease" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsMaterialRelease_FmsMaterial" Association="Self.FK_FmsMaterialRelease_FmsMaterial">
      <End Role="FmsMaterial" EntitySet="FmsMaterial" />
      <End Role="FmsMaterialRelease" EntitySet="FmsMaterialRelease" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsMaterialRelease_FmsMaterialCodeAdjustmentType" Association="Self.FK_FmsMaterialRelease_FmsMaterialCodeAdjustmentType">
      <End Role="FmsMaterialCodeAdjustmentType" EntitySet="FmsMaterialCodeAdjustmentType" />
      <End Role="FmsMaterialRelease" EntitySet="FmsMaterialRelease" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsMaterialRelease_FmsMaterialCodeReleaseType" Association="Self.FK_FmsMaterialRelease_FmsMaterialCodeReleaseType">
      <End Role="FmsMaterialCodeReleaseType" EntitySet="FmsMaterialCodeReleaseType" />
      <End Role="FmsMaterialRelease" EntitySet="FmsMaterialRelease" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsMaterialRelease_FmsWorkResult" Association="Self.FK_FmsMaterialRelease_FmsWorkResult">
      <End Role="FmsWorkResult" EntitySet="FmsWorkResult" />
      <End Role="FmsMaterialRelease" EntitySet="FmsMaterialRelease" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsMaterialStored_FmsMaterial" Association="Self.FK_FmsMaterialStored_FmsMaterial">
      <End Role="FmsMaterial" EntitySet="FmsMaterial" />
      <End Role="FmsMaterialStored" EntitySet="FmsMaterialStored" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsMaterialStored_FmsMaterialPurchaseOrder" Association="Self.FK_FmsMaterialStored_FmsMaterialPurchaseOrder">
      <End Role="FmsMaterialPurchaseOrder" EntitySet="FmsMaterialPurchaseOrder" />
      <End Role="FmsMaterialStored" EntitySet="FmsMaterialStored" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsMaterialStored_FmsMaterialWarehouse" Association="Self.FK_FmsMaterialStored_FmsMaterialWarehouse">
      <End Role="FmsMaterialWarehouse" EntitySet="FmsMaterialWarehouse" />
      <End Role="FmsMaterialStored" EntitySet="FmsMaterialStored" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsMonthlyReport_CmUser" Association="Self.FK_FmsMonthlyReport_CmUser">
      <End Role="CmUser" EntitySet="CmUser" />
      <End Role="FmsMonthlyReport" EntitySet="FmsMonthlyReport" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsReport_CmBusinessField" Association="Self.FK_FmsReport_CmBusinessField">
      <End Role="CmBusinessField" EntitySet="CmBusinessField" />
      <End Role="FmsReport" EntitySet="FmsReport" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsReport_CmFile" Association="Self.FK_FmsReport_CmFile">
      <End Role="CmFile" EntitySet="CmFile" />
      <End Role="FmsReport" EntitySet="FmsReport" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsReport_CmSite" Association="Self.FK_FmsReport_CmSite">
      <End Role="CmSite" EntitySet="CmSite" />
      <End Role="FmsReport" EntitySet="FmsReport" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsReport_CmUser" Association="Self.FK_FmsReport_CmUser">
      <End Role="CmUser" EntitySet="CmUser" />
      <End Role="FmsReport" EntitySet="FmsReport" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsReport_CmUser1" Association="Self.FK_FmsReport_CmUser1">
      <End Role="CmUser" EntitySet="CmUser" />
      <End Role="FmsReport" EntitySet="FmsReport" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsReport_CmUser2" Association="Self.FK_FmsReport_CmUser2">
      <End Role="CmUser" EntitySet="CmUser" />
      <End Role="FmsReport" EntitySet="FmsReport" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsWorkOrderToFacility_CmFacility" Association="Self.FK_FmsWorkOrderToFacility_CmFacility">
      <End Role="CmFacility" EntitySet="CmFacility" />
      <End Role="FmsWorkOrderToFacility" EntitySet="FmsWorkOrderToFacility" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsWorkRequest_CmPartner" Association="Self.FK_FmsWorkRequest_CmPartner">
      <End Role="CmPartner" EntitySet="CmPartner" />
      <End Role="FmsWorkRequest" EntitySet="FmsWorkRequest" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsWorkRequestToFacility_CmFacility" Association="Self.FK_FmsWorkRequestToFacility_CmFacility">
      <End Role="CmFacility" EntitySet="CmFacility" />
      <End Role="FmsWorkRequestToFacility" EntitySet="FmsWorkRequestToFacility" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsWorkResultCheckItemMaterial_FmsMaterial" Association="Self.FK_FmsWorkResultCheckItemMaterial_FmsMaterial">
      <End Role="FmsMaterial" EntitySet="FmsMaterial" />
      <End Role="FmsWorkResultCheckItemMaterial" EntitySet="FmsWorkResultCheckItemMaterial" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsWorkResultCheckItemMaterial_FmsWorkResult" Association="Self.FK_FmsWorkResultCheckItemMaterial_FmsWorkResult">
      <End Role="FmsWorkResult" EntitySet="FmsWorkResult" />
      <End Role="FmsWorkResultCheckItemMaterial" EntitySet="FmsWorkResultCheckItemMaterial" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsWorkResultCheckItemMaterial_FmsWorkResultCheckItem" Association="Self.FK_FmsWorkResultCheckItemMaterial_FmsWorkResultCheckItem">
      <End Role="FmsWorkResultCheckItem" EntitySet="FmsWorkResultCheckItem" />
      <End Role="FmsWorkResultCheckItemMaterial" EntitySet="FmsWorkResultCheckItemMaterial" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsWorkSchedule_CmPartner" Association="Self.FK_FmsWorkSchedule_CmPartner">
      <End Role="CmPartner" EntitySet="CmPartner" />
      <End Role="FmsWorkSchedule" EntitySet="FmsWorkSchedule" />
    </AssociationSet>
    <AssociationSet Name="FK_FmsWorkScheduleToFacility_CmFacility" Association="Self.FK_FmsWorkScheduleToFacility_CmFacility">
      <End Role="CmFacility" EntitySet="CmFacility" />
      <End Role="FmsWorkScheduleToFacility" EntitySet="FmsWorkScheduleToFacility" />
    </AssociationSet>
  </EntityContainer>
</Schema>