<?xml version="1.0" encoding="UTF-8"?>
<!--
  XML Data Model Dump

  Model:   Newsletter
  Author:  Ondrej Jirman
  Date:    2008-11-11 07:54

  Generated by GENiE 0.3 (build date: 2008-09-06 10:47) (http://megous.com)
-->
<genieDataModel>
  <name>Newsletter</name>
  <author>Ondrej Jirman</author>
  <description></description>
  <entities>
    <entity>
      <name>news_item</name>
      <title>News item</title>
      <comment>Site news item.</comment>
      <table>
        <name>news_items</name>
        <pkey>
          <name>news_item_id</name>
          <comment></comment>
          <notnull>0</notnull>
          <autoinc>1</autoinc>
          <defval></defval>
          <pkey>1</pkey>
          <maxlen>0</maxlen>
        </pkey>
      </table>
      <attrs>
        <attr>
          <name>title</name>
          <title>Title</title>
          <type>text</type>
          <comment>Mail subject, rss feed title, ...</comment>
          <optional>0</optional>
          <readonly>0</readonly>
          <opts>
            <list/>
          </opts>
          <column>
            <name>title</name>
            <comment>Mail subject, rss feed title, ...</comment>
            <notnull>1</notnull>
            <autoinc>0</autoinc>
            <defval></defval>
            <pkey>0</pkey>
            <maxlen>0</maxlen>
          </column>
        </attr>
        <attr>
          <name>content</name>
          <title>Content</title>
          <type>text</type>
          <comment>Repeats info from the title with more detail.</comment>
          <optional>0</optional>
          <readonly>0</readonly>
          <opts>
            <list/>
          </opts>
          <column>
            <name>content</name>
            <comment>Repeats info from the title with more detail.</comment>
            <notnull>1</notnull>
            <autoinc>0</autoinc>
            <defval></defval>
            <pkey>0</pkey>
            <maxlen>0</maxlen>
          </column>
        </attr>
      </attrs>
      <rels>
        <rel>
          <name>category</name>
          <title>Category</title>
          <entity>news_category</entity>
          <linkto></linkto>
          <comment>News category this item belongs to.</comment>
          <owned>0</owned>
          <shared>1</shared>
          <primary>1</primary>
          <min>1</min>
          <max>1</max>
          <opts>
            <list>
              <integer key="shared">1</integer>
            </list>
          </opts>
          <fkey>
            <name>category_news_category_id</name>
            <comment>relation N:1 news_item.category --&gt; news_category</comment>
            <notnull>0</notnull>
            <autoinc>0</autoinc>
            <defval></defval>
            <pkey>0</pkey>
            <maxlen>0</maxlen>
          </fkey>
        </rel>
      </rels>
      <opts>
        <list>
          <integer key="auto_timestamps">1</integer>
        </list>
      </opts>
    </entity>
    <entity>
      <name>news_subscriber</name>
      <title>News subscriber</title>
      <comment>Newsletter subscriber.</comment>
      <table>
        <name>news_subscribers</name>
        <pkey>
          <name>news_subscriber_id</name>
          <comment></comment>
          <notnull>0</notnull>
          <autoinc>1</autoinc>
          <defval></defval>
          <pkey>1</pkey>
          <maxlen>0</maxlen>
        </pkey>
      </table>
      <attrs>
        <attr>
          <name>email</name>
          <title>Email</title>
          <type>text</type>
          <comment>Subscriber's e-mail.</comment>
          <optional>0</optional>
          <readonly>0</readonly>
          <opts>
            <list/>
          </opts>
          <column>
            <name>email</name>
            <comment>Subscriber's e-mail.</comment>
            <notnull>1</notnull>
            <autoinc>0</autoinc>
            <defval></defval>
            <pkey>0</pkey>
            <maxlen>0</maxlen>
          </column>
        </attr>
        <attr>
          <name>realname</name>
          <title>Realname</title>
          <type>text</type>
          <comment>Subscriber's real name.</comment>
          <optional>1</optional>
          <readonly>0</readonly>
          <opts>
            <list/>
          </opts>
          <column>
            <name>realname</name>
            <comment>Subscriber's real name.</comment>
            <notnull>0</notnull>
            <autoinc>0</autoinc>
            <defval></defval>
            <pkey>0</pkey>
            <maxlen>0</maxlen>
          </column>
        </attr>
      </attrs>
      <rels>
        <rel>
          <name>categories</name>
          <title>Categories</title>
          <entity>news_category</entity>
          <linkto></linkto>
          <comment>Categories subscriber wants to receive.</comment>
          <owned>0</owned>
          <shared>1</shared>
          <primary>1</primary>
          <min>0</min>
          <max>0</max>
          <opts>
            <list>
              <integer key="shared">1</integer>
            </list>
          </opts>
        </rel>
      </rels>
      <opts>
        <list>
          <integer key="auto_timestamps">1</integer>
        </list>
      </opts>
    </entity>
    <entity>
      <name>news_category</name>
      <title>News category</title>
      <comment>News item category.</comment>
      <table>
        <name>news_categories</name>
        <pkey>
          <name>news_category_id</name>
          <comment></comment>
          <notnull>0</notnull>
          <autoinc>1</autoinc>
          <defval></defval>
          <pkey>1</pkey>
          <maxlen>0</maxlen>
        </pkey>
      </table>
      <attrs>
        <attr>
          <name>name</name>
          <title>Name</title>
          <type>text</type>
          <comment>Category name.</comment>
          <optional>0</optional>
          <readonly>0</readonly>
          <opts>
            <list/>
          </opts>
          <column>
            <name>name</name>
            <comment>Category name.</comment>
            <notnull>1</notnull>
            <autoinc>0</autoinc>
            <defval></defval>
            <pkey>0</pkey>
            <maxlen>0</maxlen>
          </column>
        </attr>
        <attr>
          <name>description</name>
          <title>Description</title>
          <type>text</type>
          <comment>Category description.</comment>
          <optional>0</optional>
          <readonly>0</readonly>
          <opts>
            <list/>
          </opts>
          <column>
            <name>description</name>
            <comment>Category description.</comment>
            <notnull>1</notnull>
            <autoinc>0</autoinc>
            <defval></defval>
            <pkey>0</pkey>
            <maxlen>0</maxlen>
          </column>
        </attr>
      </attrs>
      <rels/>
      <opts>
        <list/>
      </opts>
    </entity>
  </entities>
</genieDataModel>
