Location: PHPKode > projects > DIY Blog > diy-blog/schema.xml
<?xml version="1.0" encoding="UTF-8"?>
<database name="diy-blog" defaultIdMethod="native" defaultPhpNamingMethod="phpname">
	<table name="FrontEndResource" phpName="FrontEndResource" baseClass="lib.diy-framework.classes.diy-framework.controller.Resource">
		<column name="URI" type="varchar" size="225" required="true" primaryKey="true"/>
		<column name="Type" required="true" type="varchar" size="45" inheritance="single">
			<inheritance key="PostListResource" class="PostListResource" extends="diy-blog.model.FrontEndResource"/>
			<inheritance key="YearlyPostListResource" class="YearlyPostListResource" extends="diy-blog.model.FrontEndResource"/>
			<inheritance key="MonthlyPostListResource" class="MonthlyPostListResource" extends="diy-blog.model.FrontEndResource"/>
			<inheritance key="PostResource" class="PostResource" extends="diy-blog.model.FrontEndResource"/>
			<inheritance key="PageResource" class="PageResource" extends="diy-blog.model.FrontEndResource"/>
		</column>
		<index>
			<index-column name="Type"/>
		</index>
	</table>
	<table name="BackEndResource" phpName="BackEndResource" baseClass="lib.diy-framework.classes.diy-framework.controller.Resource">
		<column name="URI" type="varchar" size="225" required="true" primaryKey="true"/>
		<column name="Type" required="true" type="varchar" size="45" inheritance="single">
			<inheritance key="AdminResource" class="AdminResource" extends="diy-blog.model.BackEndResource"/>
			<inheritance key="AdminPostListResource" class="AdminPostListResource" extends="diy-blog.model.BackEndResource"/>
			<inheritance key="AdminPostResource" class="AdminPostResource" extends="diy-blog.model.BackEndResource"/>
			<inheritance key="AdminPageResource" class="AdminPageResource" extends="diy-blog.model.BackEndResource"/>
			<inheritance key="AdminPageListResource" class="AdminPageListResource" extends="diy-blog.model.BackEndResource"/>
			<inheritance key="AdminUserListResource" class="AdminUserListResource" extends="diy-blog.model.BackEndResource"/>
			<inheritance key="AdminUserResource" class="AdminUserResource" extends="diy-blog.model.BackEndResource"/>
			<inheritance key="AdminCommentsResource" class="AdminCommentsResource" extends="diy-blog.model.BackEndResource"/>
			<inheritance key="AdminFilesResource" class="AdminFilesResource" extends="diy-blog.model.BackEndResource"/>
		</column>
		<index>
			<index-column name="Type"/>
		</index>
	</table>
	<table name="Page" phpName="Page">
		<column name="ID" type="integer" required="true" primaryKey="true" autoIncrement="true"/>
		<column name="Title" required="true" type="varchar" size="225"/>
		<column name="Content" required="true" type="longvarchar"/>
		<column name="DateTime" required="true" type="timestamp"/>
		<column name="UserName" required="true" type="varchar" size="45"/>
		<column name="FrontEndURI" required="true" type="varchar" size="225"/>
		<column name="BackEndURI" type="varchar" size="225"/>
		<column name="Type" required="true" type="varchar" size="45" inheritance="single" default="Page">
		  <inheritance key="PostPage" class="PostPage" extends="diy-blog.model.Page"/>
		</column>
		<foreign-key foreignTable="FrontEndResource">
			<reference local="FrontEndURI" foreign="URI"/>
		</foreign-key>
		<foreign-key foreignTable="BackEndResource">
			<reference local="BackEndURI" foreign="URI"/>
		</foreign-key>
		<foreign-key foreignTable="User">
			<reference local="UserName" foreign="Name"/>
		</foreign-key>
		<unique>
			<unique-column name="FrontEndURI"/>
		</unique>
		<unique>
			<unique-column name="BackEndURI"/>
		</unique>
		<index>
			<index-column name="Title"/>
		</index>
		<!--
		<index>
			<index-column name="Content" size="300"/>
		</index>
		-->
		<index>
			<index-column name="DateTime"/>
		</index>
		<index>
			<index-column name="Type"/>
		</index>
	</table>
	<table name="Comment" phpName="Comment">
		<column name="ID" required="true" type="integer" primaryKey="true" autoIncrement="true"/>
		<column name="Title" type="varchar" size="45"/>
		<column name="Name" type="varchar" size="45"/>
		<column name="Website" type="varchar" size="45"/>
		<column name="Content" type="longvarchar" required="true"/>
		<column name="PageID" required="true" type="integer"/>
		<column name="DateTime" required="true" type="timestamp"/>
		<foreign-key foreignTable="Page" name="Post">
			<reference local="PageID" foreign="ID"/>
		</foreign-key>
		<index>
			<index-column name="PageID"/>
		</index>
	</table>
	<table name="User" phpName="User" abstract="true">
		<!-- <column name="ID" required="true" type="integer" primaryKey="true" autoIncrement="true"/> -->
		<column name="Name" required="true" type="varchar" size="45" primaryKey="true"/>
		<column name="Password" required="true" type="varchar" size="45"/>
		<column name="Type" required="true" type="varchar" size="45" inheritance="single">
		  <inheritance key="AdminUser" class="AdminUser" extends="diy-blog.model.User"/>
		  <inheritance key="LimitedUser" class="LimitedUser" extends="diy-blog.model.User"/>
		  <inheritance key="GuestUser" class="GuestUser" extends="diy-blog.model.User"/>
		</column>
		<column name="BackEndURI" required="true" type="varchar" size="225"/>
		<foreign-key foreignTable="BackEndResource">
			<reference local="BackEndURI" foreign="URI"/>
		</foreign-key>
		<index>
			<index-column name="BackEndURI"/>
		</index>
		<index>
			<index-column name="Password"/>
		</index>
		<index>
			<index-column name="Type"/>
		</index>
	</table>
</database>
Return current item: DIY Blog