<Config>
  <Entry>
    <Query>select zoneoid, zonetype, title, systemtitle, description, systemdescription, urlpicture, urlmap, urlfloorplan, islisted, capacity, zonelocation, region, entrypermissiontype, permissionbits, requiresclubassociation from zones where zoneoid = :oid</Query>
    <ResultFormat>  %D       %D      %65s    %65s          %65s        %65s               %193s      %193s    %193s            %d        %D       %193s          %193s   %d                   %D              %d</ResultFormat>
    <Create>
       <Service>Zone</Service>
       <Command>AddZone</Command>
       <Arg>
          <Key>ZoneOid</Key>
          <Value>:d</Value>
       </Arg>
       <Arg>
          <Key>ZoneType</Key>
          <Value>:2</Value>
       </Arg>
       <Arg>
          <Key>Title</Key>
          <Value>:3</Value>
       </Arg>
       <Arg>
          <Key>SystemTitle</Key>
          <Value>:4</Value>
       </Arg>
       <Arg>
          <Key>Description</Key>
          <Value>:5</Value>
       </Arg>
       <Arg>
          <Key>SystemDescription</Key>
          <Value>:6</Value>
       </Arg>
       <Arg>
          <Key>UrlPicture</Key>
          <Value>:7</Value>
       </Arg>
       <Arg>
          <Key>UrlMap</Key>
          <Value>:8</Value>
       </Arg>
       <Arg>
          <Key>UrlFloorPlan</Key>
          <Value>:9</Value>
       </Arg>
       <Arg>
          <Key>Islisted</Key>
          <Value>:10</Value>
       </Arg>
       <Arg>
          <Key>UserCapacity</Key>
          <Value>:11</Value>
       </Arg>
       <Arg>
          <Key>ZoneLocation</Key>
          <Value>:12</Value>
       </Arg>
       <Arg>
          <Key>Region</Key>
          <Value>:13</Value>
       </Arg>
       <Arg>
          <Key>EntryPermission</Key>
          <Value>:14</Value>
       </Arg>
       <Arg>
          <Key>PermissionBits</Key>
          <Value>:15</Value>
       </Arg>
       <Arg>
          <Key>RequiresClub</Key>
          <Value>:16</Value>
       </Arg>
    </Create>
    <Delete>
       <Service>Zone</Service>
       <Command>RemoveZone</Command>
       <Arg>
          <Key>ZoneOid</Key>
          <Value>:d</Value>
       </Arg>
    </Delete>
  </Entry>
  <Entry>
    <Query>select rentaloid, rentaltype, leasetype, rate, period from rentals where rentaloid = :oid</Query>
    <ResultFormat>  %D       %D            %D       %D      %D</ResultFormat>
    <Create>
       <Service>Rental</Service>
       <Command>AddRental</Command>
       <Arg>
          <Key>Oid</Key>
          <Value>:d</Value>
       </Arg>
       <Arg>
          <Key>RentalType</Key>
          <Value>:2</Value>
       </Arg>
       <Arg>
          <Key>LeaseType</Key>
          <Value>:3</Value>
       </Arg>
       <Arg>
          <Key>Rate</Key>
          <Value>:4</Value>
       </Arg>
       <Arg>
          <Key>Period</Key>
          <Value>:5</Value>
       </Arg>
    </Create>
    <Delete>
       <Service>Rental</Service>
       <Command>RemoveRental</Command>
       <Arg>
          <Key>Oid</Key>
          <Value>:d</Value>
       </Arg>
    </Delete>
  </Entry>
  <Entry>
    <Query>select zonecategories_id from zonecategoryassignments where zones_zoneoid = :oid</Query>
    <ResultFormat>  %D   </ResultFormat>    
    <ResultMaxRows>4</ResultMaxRows>
    <Create>
      <Service>Zone</Service>
      <Command>SetZoneCat</Command>
      <Arg>
        <Key>zoneoid</Key>
        <Value>:d</Value>
      </Arg>
      <Arg>
        <Key>Cat1</Key>
        <Value>!1:1</Value>   
      </Arg>
      <Arg>
        <Key>Cat2</Key>
        <Value>!2:1</Value>
      </Arg>
      <Arg>
        <Key>Cat3</Key>
        <Value>!3:1</Value>
      </Arg>
      <Arg>
        <Key>Cat4</Key>
        <Value>!4:1</Value>
      </Arg>
    </Create>
    <Delete>
       <Service>Zone</Service>
       <Command>SetZoneCat</Command>
       <Arg>
          <Key>zoneoid</Key>
          <Value>:d</Value>
       </Arg>
    </Delete>
  </Entry>
</Config>
