-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
2,230 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,212 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<diagram program="umlet" version="14.2"> | ||
<zoom_level>10</zoom_level> | ||
<element> | ||
<id>UMLClass</id> | ||
<coordinates> | ||
<x>690</x> | ||
<y>50</y> | ||
<w>210</w> | ||
<h>150</h> | ||
</coordinates> | ||
<panel_attributes>Tenant::Ticket | ||
-- | ||
+id: long | ||
+type: string | ||
+subject: string | ||
+description: string | ||
+status: string | ||
+creation_dtime: datetime | ||
+modif_dtime: datetime</panel_attributes> | ||
<additional_attributes/> | ||
</element> | ||
<element> | ||
<id>UMLClass</id> | ||
<coordinates> | ||
<x>110</x> | ||
<y>50</y> | ||
<w>210</w> | ||
<h>160</h> | ||
</coordinates> | ||
<panel_attributes>Core::Tenant | ||
-- | ||
+id: long | ||
+title: string | ||
+description: string | ||
+domain: string | ||
+subdomain: string | ||
+validate: boolean | ||
+creation_dtime: datetime | ||
+modif_dtime: datetime</panel_attributes> | ||
<additional_attributes/> | ||
</element> | ||
<element> | ||
<id>UMLClass</id> | ||
<coordinates> | ||
<x>80</x> | ||
<y>590</y> | ||
<w>120</w> | ||
<h>30</h> | ||
</coordinates> | ||
<panel_attributes>Bank::Payment</panel_attributes> | ||
<additional_attributes/> | ||
</element> | ||
<element> | ||
<id>UMLClass</id> | ||
<coordinates> | ||
<x>220</x> | ||
<y>590</y> | ||
<w>160</w> | ||
<h>30</h> | ||
</coordinates> | ||
<panel_attributes>Discount::Discount</panel_attributes> | ||
<additional_attributes/> | ||
</element> | ||
<element> | ||
<id>UMLClass</id> | ||
<coordinates> | ||
<x>110</x> | ||
<y>310</y> | ||
<w>210</w> | ||
<h>170</h> | ||
</coordinates> | ||
<panel_attributes>Tenant::Invoice | ||
-- | ||
+id: long | ||
+title: string | ||
+description: string | ||
+amount: integer | ||
+due_date: date | ||
+discount_code: string | ||
+status: string | ||
+creation_dtime: datetime | ||
+modif_dtime: datetime</panel_attributes> | ||
<additional_attributes/> | ||
</element> | ||
<element> | ||
<id>Relation</id> | ||
<coordinates> | ||
<x>140</x> | ||
<y>470</y> | ||
<w>80</w> | ||
<h>140</h> | ||
</coordinates> | ||
<panel_attributes>lt=- | ||
m1=1 | ||
m2=1 | ||
payment</panel_attributes> | ||
<additional_attributes>10.0;120.0;10.0;10.0</additional_attributes> | ||
</element> | ||
<element> | ||
<id>Relation</id> | ||
<coordinates> | ||
<x>280</x> | ||
<y>470</y> | ||
<w>80</w> | ||
<h>140</h> | ||
</coordinates> | ||
<panel_attributes>lt=- | ||
m1=1 | ||
m2=1 | ||
discount</panel_attributes> | ||
<additional_attributes>10.0;120.0;10.0;10.0</additional_attributes> | ||
</element> | ||
<element> | ||
<id>UMLClass</id> | ||
<coordinates> | ||
<x>460</x> | ||
<y>400</y> | ||
<w>100</w> | ||
<h>30</h> | ||
</coordinates> | ||
<panel_attributes>User::User</panel_attributes> | ||
<additional_attributes/> | ||
</element> | ||
<element> | ||
<id>Relation</id> | ||
<coordinates> | ||
<x>500</x> | ||
<y>160</y> | ||
<w>210</w> | ||
<h>260</h> | ||
</coordinates> | ||
<panel_attributes>lt=- | ||
m1=1 | ||
m2=* | ||
requester</panel_attributes> | ||
<additional_attributes>10.0;240.0;10.0;10.0;190.0;10.0</additional_attributes> | ||
</element> | ||
<element> | ||
<id>UMLClass</id> | ||
<coordinates> | ||
<x>690</x> | ||
<y>350</y> | ||
<w>210</w> | ||
<h>120</h> | ||
</coordinates> | ||
<panel_attributes>Tenant::Comment | ||
-- | ||
+id: long | ||
+title: string | ||
+description: string | ||
+creation_dtime: datetime | ||
+modif_dtime: datetime</panel_attributes> | ||
<additional_attributes/> | ||
</element> | ||
<element> | ||
<id>Relation</id> | ||
<coordinates> | ||
<x>550</x> | ||
<y>390</y> | ||
<w>160</w> | ||
<h>50</h> | ||
</coordinates> | ||
<panel_attributes>lt=- | ||
m1=* | ||
m2=1 | ||
author</panel_attributes> | ||
<additional_attributes>140.0;20.0;10.0;20.0</additional_attributes> | ||
</element> | ||
<element> | ||
<id>Relation</id> | ||
<coordinates> | ||
<x>780</x> | ||
<y>190</y> | ||
<w>90</w> | ||
<h>180</h> | ||
</coordinates> | ||
<panel_attributes>lt=- | ||
m1=* | ||
m2=1 | ||
comments</panel_attributes> | ||
<additional_attributes>10.0;160.0;10.0;10.0</additional_attributes> | ||
</element> | ||
<element> | ||
<id>Relation</id> | ||
<coordinates> | ||
<x>310</x> | ||
<y>100</y> | ||
<w>400</w> | ||
<h>50</h> | ||
</coordinates> | ||
<panel_attributes>lt=- | ||
m1=* | ||
m2=1 | ||
tickets</panel_attributes> | ||
<additional_attributes>380.0;20.0;10.0;20.0</additional_attributes> | ||
</element> | ||
<element> | ||
<id>Relation</id> | ||
<coordinates> | ||
<x>200</x> | ||
<y>200</y> | ||
<w>80</w> | ||
<h>130</h> | ||
</coordinates> | ||
<panel_attributes>lt=- | ||
m1=* | ||
m2=1 | ||
invoices</panel_attributes> | ||
<additional_attributes>10.0;110.0;10.0;10.0</additional_attributes> | ||
</element> | ||
</diagram> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
<?php | ||
|
||
class Tenant_Comment extends Pluf_Model | ||
{ | ||
|
||
/** | ||
* @brief مدل دادهای را بارگذاری میکند. | ||
* | ||
* @see Pluf_Model::init() | ||
*/ | ||
function init() | ||
{ | ||
$this->_a['table'] = 'tenant_comment'; | ||
$this->_a['verbose'] = 'Tenant Comment'; | ||
$this->_a['cols'] = array( | ||
'id' => array( | ||
'type' => 'Pluf_DB_Field_Sequence', | ||
'blank' => false, | ||
'editable' => false, | ||
'readable' => true | ||
), | ||
'title' => array( | ||
'type' => 'Pluf_DB_Field_Varchar', | ||
'blank' => false, | ||
'is_null' => false, | ||
'size' => 256 | ||
), | ||
'description' => array( | ||
'type' => 'Pluf_DB_Field_Varchar', | ||
'blank' => true, | ||
'is_null' => true, | ||
'size' => 2048 | ||
), | ||
'creation_dtime' => array( | ||
'type' => 'Pluf_DB_Field_Datetime', | ||
'blank' => true, | ||
'is_null' => true, | ||
'editable' => false, | ||
'readable' => true | ||
), | ||
'modif_dtime' => array( | ||
'type' => 'Pluf_DB_Field_Datetime', | ||
'blank' => true, | ||
'is_null' => true, | ||
'editable' => false, | ||
'readable' => true | ||
), | ||
// relations | ||
'author' => array( | ||
'type' => 'Pluf_DB_Field_Foreignkey', | ||
'model' => 'Pluf_User', | ||
'blank' => false, | ||
'is_null' => false, | ||
'editable' => false, | ||
'readable' => true, | ||
'relate_name' => 'author' | ||
), | ||
'ticket' => array( | ||
'type' => 'Pluf_DB_Field_Foreignkey', | ||
'model' => 'Tenant_Ticket', | ||
'blank' => false, | ||
'is_null' => false, | ||
'editable' => false, | ||
'readable' => true, | ||
'relate_name' => 'ticket' | ||
) | ||
); | ||
|
||
// $this->_a['idx'] = array( | ||
// 'comment_tenant_idx' => array( | ||
// 'col' => 'secure_comment', | ||
// 'type' => 'unique', // normal, unique, fulltext, spatial | ||
// 'index_type' => '', // hash, btree | ||
// 'index_option' => '', | ||
// 'algorithm_option' => '', | ||
// 'lock_option' => '' | ||
// ) | ||
// ); | ||
} | ||
|
||
/** | ||
* \brief پیش ذخیره را انجام میدهد | ||
* | ||
* @param boolean $create | ||
* حالت | ||
* ساخت یا به روز رسانی را تعیین میکند | ||
*/ | ||
function preSave($create = false) | ||
{ | ||
if ($this->id == '') { | ||
$this->creation_dtime = gmdate('Y-m-d H:i:s'); | ||
} | ||
$this->modif_dtime = gmdate('Y-m-d H:i:s'); | ||
} | ||
|
||
/** | ||
* حالت کار ایجاد شده را به روز میکند | ||
* | ||
* @see Pluf_Model::postSave() | ||
*/ | ||
function postSave($create = false) | ||
{ | ||
// | ||
} | ||
|
||
} |
Oops, something went wrong.