ENHANCEMENT: adding document type one to many relation to specific EA extension of the DMS

This commit is contained in:
Julian Seidenberg 2012-07-25 18:08:49 +12:00
parent ac826784f1
commit 51f477a88c
2 changed files with 16 additions and 2 deletions

View File

@ -2,8 +2,10 @@
class DMSDocument extends DataObject implements DMSDocumentInterface {
static $db = array(
"Filename" => "Text",
"Folder" => "Text"
"Filename" => "Varchar(255)",
"Folder" => "Varchar(255)",
"Title" => 'Varchar(1024)',
"Description" => 'Text',
);
static $many_many = array(
@ -46,6 +48,7 @@ class DMSDocument extends DataObject implements DMSDocumentInterface {
$this->Pages()->removeAll();
}
/**
* Adds a metadata tag to the Document. The tag has a category and a value.
* Each category can have multiple values by default. So: addTag("fruit","banana") addTag("fruit", "apple") will add two items.

View File

@ -0,0 +1,11 @@
<?php
class DocumentType extends DataObject {
static $db = array(
'Name' => 'Varchar(255)'
);
static $has_many = array(
'Documents' => 'EADocument'
);
}