<?xml version="1.0" encoding="utf-8" ?>
<update tel="danduoduo120 QQ：2365887471 528549311">
  <tables>
    <table name="HousePostTable">
      <![CDATA[CREATE TABLE [HousePostTable] (
[HouseId] INTEGER  NOT NULL,
[SiteId] INTEGER  NULL,
[PostTime] DATE  NULL,
[Title] VARCHAR(100)  NULL,
[Url] VARCHAR(100)  NULL
); ]]>
    </table>
    <table name="HouseRefreshTable">
      <![CDATA[CREATE TABLE [HouseRefreshTable] (
[HouseId] INTEGER  NOT NULL,
[SiteId] INTEGER  NULL,
[PostTime] DATE  NULL,
[Title] VARCHAR(100)  NULL,
[AccountName] VARCHAR(100)  NULL,
[SuccType] INTEGER  NULL,
[Hint] VARCHAR(100)  NULL,
[RefreshCount] INTEGER  NULL
); ]]>
    </table>
    <table name="HouseDeleteTable">
      <![CDATA[CREATE TABLE [HouseDeleteTable] (
[HouseId] INTEGER  NOT NULL,
[SiteId] INTEGER  NULL,
[PostTime] DATE  NULL,
[Title] VARCHAR(100)  NULL,
[AccountName] VARCHAR(100)  NULL,
[SuccType] INTEGER  NULL,
[Hint] VARCHAR(100)  NULL
); ]]>
    </table>
    <table name="Villa">
      <![CDATA[CREATE TABLE [Villa] (
[HouseId] INTEGER  NOT NULL PRIMARY KEY,
[BuildeType] VARCHAR(20)  NULL,
[RoomType] VARCHAR(20)  NULL,
[BasementSize] FLOAT  NULL,
[BasementType] VARCHAR(20)  NULL,
[GardenSize] FLOAT  NULL,
[CarStoreCount] INTEGER  NULL,
[CarParkingPlace] INTEGER  NULL,
[HaveList] VARCHAR(50)  NULL
);]]>
    </table>
    <table name="HouseList">
      <![CDATA[CREATE TABLE [HouseList] (
[Id] INTEGER  NOT NULL,
[DataType] INTEGER  NULL,
[UserId] INTEGER  NULL,
[Title] VARCHAR(100)  NULL,
[Content] TEXT  NULL,
[RoomCount] INTEGER  NULL,
[OfficeCount] INTEGER  NULL,
[ToiletCount] INTEGER  NULL,
[BalconyCount] INTEGER  NULL,
[CookromCount] INTEGER  NULL,
[AreaName] VARCHAR(50)  NULL,
[CommName] VARCHAR(50)  NULL,
[UserDefineCode] VARCHAR(50)  NULL,
[Wymc] VARCHAR(50)  NULL,
[HouseOri] VARCHAR(10)  NULL,
[Price] FLOAT  NULL,
[HouseAge] INTEGER  NULL,
[BuildArea] FLOAT  NULL,
[UseArea] FLOAT  NULL,
[ProFloor] INTEGER  NULL,
[FloorNum] INTEGER  NULL,
[FitmentType] VARCHAR(30)  NULL,
[Privilege] VARCHAR(30)  NULL,
[BuildType] VARCHAR(50)  NULL,
[Jyxz] VARCHAR(50)  NULL,
[IsRent] VARCHAR(10)  NULL,
[JZWX] VARCHAR(50)  NULL,
[HeatingCharge] FLOAT  NULL,
[ServiceCharge] FLOAT  NULL,
[Traffic] VARCHAR(1000)  NULL,
[Address] VARCHAR(200)  NULL,
[HouseHave] VARCHAR(200)  NULL,
[RentPaymentType] INTEGER  NULL,
[RentType] INTEGER  NULL,
[RentPayNum] INTEGER  NULL,
[RentDepositNum] INTEGER  NULL,
[RentRoom] VARCHAR(20)  NULL,
[Orientation] VARCHAR(20)  NULL,
[Restrict] VARCHAR(20)  NULL,
[CreateDate] DATE  NULL,
[ShortPy] VARCHAR(30)  NULL,
[Py] VARCHAR(200)  NULL,
[HouseCode] VARCHAR (12)  NULL,
[RootType] INTEGER  NULL,
[PropFee] FLOAT  NULL,
[PropCompany] VARCHAR (80)  NULL,
[IsDivisi] BOOLEAN  NULL,
[HouseStatus] VARCHAR (30)  NULL,
[IsOverFiveYear] BOOLEAN  NULL,
[IsResidence] BOOLEAN  NULL,
[Jzjg] VARCHAR (20)  NULL,
[HouseCreateDate] DATE  NULL,
[IsHaveKey] BOOLEAN NULL,
[IsOtherAgent] BOOLEAN NULL, 
[YjhTitle] VARCHAR (70) NULL,
[HouseAction] INTEGER  NULL,
[HasPosted] BOOLEAN  NULL,
[FromPageUrl] VARCHAR(200) NULL,
[HouseExpType] INTEGER  NULL,
[MapInfo] VARCHAR (30)  NULL,
[School] VARCHAR (100)  NULL,
[MiddleSchool] VARCHAR (100)  NULL,
[TCName] VARCHAR (20)  NULL,
[TCTel] VARCHAR (60)  NULL,
[ErpType]  INTEGER  NULL,
[yeZhuXingTai] VARCHAR (500)  NULL,
[xiaoQuPeiTao] VARCHAR (500)  NULL,
[fuWuJieShao] VARCHAR (500)  NULL,
[VideoGuid] VARCHAR (36) NULL,
HouseBuilderType VARCHAR (10) NULL,
[QrCode] VARCHAR (36) NULL,
[CheckCode] VARCHAR (30) NULL,
[CheckCompany] VARCHAR (70) NULL
);
]]>
    </table>
    <table name="Shop">
      <![CDATA[CREATE TABLE [Shop] (
[HouseId] INTEGER  NOT NULL PRIMARY KEY,
[ShopType] VARCHAR(30)  NULL,
[ShopSubType] VARCHAR(20)  NULL,
[BaseService] VARCHAR(100)  NULL,
[AimOperastion] VARCHAR(160)  NULL,
[TransferPrcie]  FLOAT  NULL,
[Hitsory] VARCHAR(50)  NULL,
[Restrict] INTEGER NULL,
[RestrictOther] VARCHAR(50) NULL,
[State] VARCHAR(20) NULL,
[Width] FLOAT  NULL,
[Height] FLOAT  NULL,
[Deep] FLOAT  NULL,
[ShopIndustry] VARCHAR(30) NULL,
[ShopIndustry1] VARCHAR(30) NULL,
[RentalIncome] FLOAT  NULL
);]]>
    </table>
    <table name="Office">
      <![CDATA[CREATE TABLE [Office] (
[HouseId] INTEGER  NOT NULL PRIMARY KEY,
[OfficeType] VARCHAR(20)  NULL,
[BaseService] VARCHAR(60)  NULL,
[PropertyGrade] VARCHAR(20)  NULL
);]]>
    </table>
    <table name="CustomerInfo">
      <![CDATA[CREATE TABLE [CustomerInfo] (
[HouseId] INTEGER  NULL PRIMARY KEY,
[Customer] VARCHAR(40)  NULL,
[CustomerTel] VARCHAR(50)  NULL,
[CKey] VARCHAR(40)  NULL,
[HouseAddress] VARCHAR(100)  NULL,
[Remark] VARCHAR(4000)  NULL,
[CustomerTelImgUrl] VARCHAR(200)  NULL,
[CustomerTelImgBytes] BLOB(4000) NULL
);]]>
    </table>
    <table name="HouseUnit">
      <![CDATA[CREATE TABLE [HouseUnit] (
[HouseId] INTEGER  NULL PRIMARY KEY,
[BuildingValue] VARCHAR(20)  NULL,
[BuildingType] VARCHAR(8)  NULL,
[Unit] VARCHAR(20)  NULL,
[UnitType] VARCHAR(8)  NULL,
[Housenumber] VARCHAR(20)  NULL
);]]>
    </table>
    <table name="HouseImagesNet">
      <![CDATA[CREATE TABLE [HouseImagesNet] 
(
    [HouseId] INT,
    [ImageId] INT,
    [ImageType] INT,
    [Title] VARCHAR
    (
        50
    ),
    [ImageMD5] VARCHAR
    (
        50
    ),ServerId INT
);CREATE INDEX [idx_HouseImagesNet_HouseId_ImageId] ON [HouseImagesNet] ([HouseId] ASC,[ImageId] ASC);]]>
    </table>
    <table name="ImageMD5Info">
      <![CDATA[CREATE TABLE [ImageMD5Info] (
[ImageCrc] VARCHAR(50)  NULL PRIMARY KEY,
[CDate] VARCHAR(6),
[ServerId] INTEGER
);]]>
    </table>
    <table name="HasRentedHouse">
      <![CDATA[CREATE TABLE [HasRentedHouse] (
  [HasRentedHouseId] INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, 
  [HouseId] INT, 
  [RentTime] DATETIME, 
  [MaturityTime] DATETIME, 
  [PayCycleOfMonth] INT, 
  [Advance] INT, 
  [AdvanceType] INT, 
  [Remarks] TEXT, 
  [AddTime] DATETIME, 
  [LastRemindTime] DATETIME);]]>
    </table>
    <table name="HouseFollowUp">
      <![CDATA[CREATE TABLE [HouseFollowUp] (
  [HouseFollowUpId] INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, 
  [HouseId] INT, 
  [UserId] INT, 
  [Type] TEXT, 
  [Content] TEXT, 
  [Time] DATETIME);
  CREATE INDEX [idx_HouseFollowUp_HouseId] ON [HouseFollowUp] ([HouseId] ASC);]]>
    </table>
    <table name="HouseFollowInfo">
      <![CDATA[CREATE TABLE [HouseFollowInfo] (
  [HouseId] INT, 
  [FlowCount] INT, 
  [DaikanCount] INT);]]>
    </table>
  </tables>
  <sqls>
    <item>
      <![CDATA[UPDATE HouseList SET RootType=0 WHERE RootType IS NULL;UPDATE HouseList SET HouseStatus='有效' WHERE HouseStatus IS NULL;
      UPDATE HouseList SET HouseCreateDate=CreateDate WHERE HouseCreateDate IS NULL;
      UPDATE HouseList SET IsHaveKey=0 WHERE IsHaveKey IS NULL;
      UPDATE HouseList SET IsOtherAgent=0 WHERE IsOtherAgent IS NULL;
      UPDATE HouseList SET HouseAction=0 WHERE HouseAction IS NULL;
      UPDATE HouseList SET HasPosted=1 WHERE HasPosted IS NULL;
      UPDATE HousePostTable SET SuccType=1 WHERE SuccType IS NULL;]]>
    </item>
  </sqls>
  <columns>
    <table name="HousePostTable">
      <column name="RefreshTime" type="DATE" />
      <column name="RefreshCount" type="INTEGER" defValue="0" />
      <column name="DataId" type="VARCHAR" length="50" />
      <column name="AccountName" type="VARCHAR" length="50" />
      <column name="SuccType" type="INTEGER" defValue="1" />
    </table>
    <table name="Shop">
      <column name="TransferPrcie" type="FLOAT" defValue="0" />
      <column name="Hitsory" type="VARCHAR" length="50"  />
      <column name="Restrict" type="INTEGER" defValue="0" />
      <column name="RestrictOther" type="VARCHAR" length="50" />
      <column name="State" type="VARCHAR" length="50" />
      <column name="Width" type="FLOAT" defValue="0" />
      <column name="Height" type="FLOAT" defValue="0" />
      <column name="Deep" type="FLOAT" defValue="0" />
      <column name="ShopIndustry" type="VARCHAR" length="30" />
      <column name="ShopIndustry1" type="VARCHAR" length="30" />
      <column name="RentalIncome" type="FLOAT" defValue="0" />
    </table>
    <table name="CustomerInfo">
      <column name="CustomerTelImgUrl" type="VARCHAR" length="200" />
      <column name="CustomerTelImgBytes" type="BLOB" length="4000" />
      <column name="BuildingNo" type="VARCHAR" length="20" />
      <column name="HouseUnit" type="VARCHAR" length="20" />
      <column name="HouseNo" type="VARCHAR" length="20" />
    </table>
    <table name="HouseRefreshTable">
      <column name="Hint" type="VARCHAR" length="100" />
    </table>
    <table name="HouseDeleteTable">
      <column name="Hint" type="VARCHAR" length="100" />
    </table>
    <table name="HouseImages">
      <column name="ImageMD5" type="VARCHAR" length="50" />
    </table>
    <table name="HouseImagesNet">
      <column name="ServerId" type="INTEGER" defValue="0" />
    </table>
    <table name="HouseList">
      <column name="HouseCode" type="VARCHAR" length="12" />
      <column name="RootType" type="INTEGER" />
      <column name="PropFee" type="FLOAT" />
      <column name="PropCompany" type="VARCHAR" length="80" />
      <column name="IsDivisi" type="BOOLEAN" />
      <column name="HouseStatus" type="VARCHAR" length="30" />
      <column name="IsOverFiveYear" type="BOOLEAN" />
      <column name="IsResidence" type="BOOLEAN" />
      <column name="Jzjg" type="VARCHAR" length="20" />
      <column name="HouseCreateDate" type="DATE" />
      <column name="IsHaveKey" type="BOOLEAN" />
      <column name="IsOtherAgent" type="BOOLEAN" />
      <column name="YjhTitle" type="VARCHAR" length="70" />
      <column name="HouseAction" type="INTEGER" />
      <column name="HasPosted" type="BOOLEAN" />
      <column name="FromPageUrl" type="VARCHAR" length="200" />
      <column name="HouseExpType" type="INTEGER" />
      <column name="MapInfo" type="VARCHAR" length="30" />
      <column name="School" type="VARCHAR" length="100" />
      <column name="MiddleSchool" type="VARCHAR" length="100" />
      <column name="TCName" type="VARCHAR" length="20" />
      <column name="TCTel" type="VARCHAR" length="60" />
      <column name="ErpType" type="INTEGER" />
      <column name="yeZhuXingTai" type="VARCHAR" length="500" />
      <column name="xiaoQuPeiTao" type="VARCHAR" length="500" />
      <column name="fuWuJieShao" type="VARCHAR" length="500" />
      <column name="VideoGuid" type="VARCHAR" length="36" />
      <column name="HouseBuilderType" type="VARCHAR" length="10" />
      <column name="QrCode" type="VARCHAR" length="36" />
      <column name="CheckCode" type="VARCHAR" length="30" />
      <column name="CheckCompany" type="VARCHAR" length="70" />
    </table>
  </columns>
  <indexs>
    <item tabelName="HousePostTable" columnName="RefreshTime" />
    <item tabelName="HousePostTable" columnName="SiteId" />
    <item tabelName="HousePostTable" columnName="HouseId" />
    <item tabelName="HousePostTable" columnName="PostTime" />
    <item tabelName="HouseRefreshTable" columnName="HouseId" />
    <item tabelName="HouseRefreshTable" columnName="SiteId" />
    <item tabelName="HouseRefreshTable" columnName="PostTime" />
    <item tabelName="HouseDeleteTable" columnName="HouseId" />
    <item tabelName="HouseDeleteTable" columnName="SiteId" />
    <item tabelName="HouseDeleteTable" columnName="PostTime" />
    <item tabelName="HouseList" columnName="DataType" />
    <item tabelName="HouseList" columnName="RootType" />
    <item tabelName="HouseList" columnName="HouseStatus" />
    <item tabelName="HouseList" columnName="Id" />
    <item tabelName="HouseFollowInfo" columnName="HouseId" />
    <item tabelName="HasRentedHouse" columnName="HouseId" />
    <item tabelName="HasRentedHouse" columnName="MaturityTime" />
    <item tabelName="HasRentedHouse" columnName="RentTime" />
  </indexs>
</update>