<?xml version="1.0" encoding="utf-8"?>
<Database Name="myPetShop" Class="myShopDataContext" xmlns="http://schemas.microsoft.com/linqtosql/dbml/2007">
  <Connection Mode="WebSettings" ConnectionString="Data Source=.;Initial Catalog=myPetShop;Integrated Security=True" SettingsObjectName="System.Configuration.ConfigurationManager.ConnectionStrings" SettingsPropertyName="myPetShopConnectionString2" Provider="System.Data.SqlClient" />
  <Table Name="dbo.Category" Member="Category">
    <Type Name="Category">
      <Column Name="CategoryId" Type="System.Int32" DbType="Int NOT NULL IDENTITY" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" />
      <Column Name="Name" Type="System.String" DbType="VarChar(80)" CanBeNull="true" />
      <Column Name="Descn" Type="System.String" DbType="VarChar(255)" CanBeNull="true" />
      <Column Name="ImageFile" Type="System.String" DbType="VarChar(50)" CanBeNull="true" />
      <Association Name="Category_Product" Member="Product" OtherKey="CategoryId" Type="Product" />
    </Type>
  </Table>
  <Table Name="dbo.[Order]" Member="Order">
    <Type Name="Order">
      <Column Name="OrderId" Type="System.Int32" DbType="Int NOT NULL IDENTITY" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" />
      <Column Name="uid" Type="System.String" DbType="VarChar(20) NOT NULL" CanBeNull="false" />
      <Column Name="UserName" Type="System.String" DbType="VarChar(80) NOT NULL" CanBeNull="false" />
      <Column Name="OrderDate" Type="System.DateTime" DbType="DateTime NOT NULL" CanBeNull="false" />
      <Column Name="Addr1" Type="System.String" DbType="VarChar(80)" CanBeNull="true" />
      <Column Name="Addr2" Type="System.String" DbType="VarChar(80)" CanBeNull="true" />
      <Column Name="City" Type="System.String" DbType="VarChar(80)" CanBeNull="true" />
      <Column Name="State" Type="System.String" DbType="VarChar(80)" CanBeNull="true" />
      <Column Name="Zip" Type="System.String" DbType="VarChar(5)" CanBeNull="true" />
      <Column Name="Phone" Type="System.String" DbType="VarChar(40)" CanBeNull="true" />
      <Column Name="Status" Type="System.String" DbType="VarChar(10)" CanBeNull="true" />
      <Association Name="Order_OrderItem" Member="OrderItem" OtherKey="OrderId" Type="OrderItem" />
      <Association Name="User_Order" Member="User" ThisKey="uid" Type="User" IsForeignKey="true" />
    </Type>
  </Table>
  <Table Name="dbo.OrderItem" Member="OrderItem">
    <Type Name="OrderItem">
      <Column Name="ItemId" Type="System.Int32" DbType="Int NOT NULL IDENTITY" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" />
      <Column Name="OrderId" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" />
      <Column Name="ProName" Type="System.String" DbType="VarChar(80)" CanBeNull="true" />
      <Column Name="ListPrice" Type="System.Decimal" DbType="Decimal(10,2)" CanBeNull="true" />
      <Column Name="Qty" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" />
      <Column Name="TotalPrice" Type="System.Decimal" DbType="Decimal(10,2)" CanBeNull="true" />
      <Column Name="productId" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" />
      <Association Name="Order_OrderItem" Member="Order" ThisKey="OrderId" Type="Order" IsForeignKey="true" />
      <Association Name="Product_OrderItem" Member="Product" ThisKey="productId" Type="Product" IsForeignKey="true" />
    </Type>
  </Table>
  <Table Name="dbo.Product" Member="Product">
    <Type Name="Product">
      <Column Name="ProductId" Type="System.Int32" DbType="Int NOT NULL IDENTITY" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" />
      <Column Name="CategoryId" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" />
      <Column Name="ListPrice" Type="System.Decimal" DbType="Decimal(10,2)" CanBeNull="true" />
      <Column Name="SuppId" Type="System.Int32" DbType="Int" CanBeNull="true" />
      <Column Name="Name" Type="System.String" DbType="VarChar(80)" CanBeNull="true" />
      <Column Name="Descn" Type="System.String" DbType="VarChar(MAX)" CanBeNull="true" />
      <Column Name="Image" Type="System.String" DbType="VarChar(80)" CanBeNull="true" />
      <Column Name="Qty" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" />
      <Association Name="Product_OrderItem" Member="OrderItem" OtherKey="productId" Type="OrderItem" />
      <Association Name="Category_Product" Member="Category" ThisKey="CategoryId" Type="Category" IsForeignKey="true" />
      <Association Name="Supplier_Product" Member="Supplier" ThisKey="SuppId" Type="Supplier" IsForeignKey="true" />
    </Type>
  </Table>
  <Table Name="dbo.Supplier" Member="Supplier">
    <Type Name="Supplier">
      <Column Name="SuppId" Type="System.Int32" DbType="Int NOT NULL IDENTITY" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" />
      <Column Name="Name" Type="System.String" DbType="VarChar(80)" CanBeNull="true" />
      <Column Name="Addr1" Type="System.String" DbType="VarChar(80)" CanBeNull="true" />
      <Column Name="Zip" Type="System.String" DbType="VarChar(6)" CanBeNull="true" />
      <Column Name="Phone" Type="System.String" DbType="VarChar(40)" CanBeNull="true" />
      <Column Name="city" Type="System.String" DbType="VarChar(50)" CanBeNull="true" />
      <Column Name="state" Type="System.String" DbType="VarChar(50)" CanBeNull="true" />
      <Association Name="Supplier_Product" Member="Product" OtherKey="SuppId" Type="Product" />
    </Type>
  </Table>
  <Table Name="dbo.[User]" Member="User">
    <Type Name="User">
      <Column Name="uid" Type="System.String" DbType="VarChar(20) NOT NULL" IsPrimaryKey="true" CanBeNull="false" />
      <Column Name="pwd" Type="System.String" DbType="VarChar(20) NOT NULL" CanBeNull="false" />
      <Column Name="role" Type="System.String" DbType="Char(10) NOT NULL" CanBeNull="false" />
      <Association Name="User_Order" Member="Order" OtherKey="uid" Type="Order" />
      <Association Name="User_UserInfo" Member="UserInfo" OtherKey="uid" Type="UserInfo" Cardinality="One" />
    </Type>
  </Table>
  <Table Name="dbo.UserInfo" Member="UserInfo">
    <Type Name="UserInfo">
      <Column Name="uid" Type="System.String" DbType="VarChar(20) NOT NULL" IsPrimaryKey="true" CanBeNull="false" />
      <Column Name="uname" Type="System.String" DbType="VarChar(20)" CanBeNull="true" />
      <Column Name="sex" Type="System.String" DbType="NChar(2) NOT NULL" CanBeNull="false" />
      <Column Name="email" Type="System.String" DbType="VarChar(50) NOT NULL" CanBeNull="false" />
      <Column Name="addr1" Type="System.String" DbType="VarChar(50)" CanBeNull="true" />
      <Column Name="code" Type="System.String" DbType="NChar(6)" CanBeNull="true" />
      <Column Name="phone" Type="System.String" DbType="NVarChar(50)" CanBeNull="true" />
      <Column Name="xueli" Type="System.String" DbType="VarChar(50) NOT NULL" CanBeNull="false" />
      <Column Name="userImage" Type="System.String" DbType="NVarChar(MAX)" CanBeNull="true" />
      <Association Name="User_UserInfo" Member="User" ThisKey="uid" Type="User" IsForeignKey="true" />
    </Type>
  </Table>
</Database>