Skip to content

Commit

Permalink
Initial structure of project
Browse files Browse the repository at this point in the history
  • Loading branch information
hadi committed Jul 15, 2017
0 parents commit 12762f1
Show file tree
Hide file tree
Showing 12 changed files with 1,222 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Eclipse
.project
.settings
/.buildpath

# Composer
/vendor/
composer.lock
composer-setup.php
composer.phar

# Project
storage/tenant

# KDE
.directory
675 changes: 675 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# mall

این پروژه یک ماژول برای سرورهای pluf است که امکانات مربوط به مدیریت مجموعه‌ای از فروشگاه آنلاین ساده (مجموعه‌ای از ماژول‌های pluf/shop) را فراهم می‌کند.

این ماژول امکانات زیر را دارد:

- CRM
- GEO

کارهای اصلی در این ماژول عبارتند از:

- امکان جستجوی محصولات و سرویس‌های تمام فروشگاه‌ها
- امکان جستجوی فروشگاه‌ها

## داده‌ها و مدل داده‌ای

این ماژول روی داده‌های ماژول pluf/shop کار می‌کند و داده‌ای ایجاد و یا تغییر نمی‌دهد

# مدل

مدل سیستم با استفاده از نرم افزار umlet ایجاد شده و در پوشه model ذخیره شده است. برای دانلود ابزار umlet و مشاهده مدل سیستم لینک زیر رو ببینید:

http://www.umlet.com/

53 changes: 53 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"name" : "pluf/mall",
"description" : "A module to work with multiple shop",
"type" : "library",
"license" : "MIT",
"authors" : [{
"name" : "Mostafa Barmshory",
"email" : "[email protected]",
"homepage" : "http://dpq.co.ir",
"role" : "developer"
}, {
"name" : "Mohammad Hadi Mansouri",
"email" : "[email protected]",
"homepage" : "http://dpq.co.ir",
"role" : "developer"
}, {
"name" : "MahdiIsComing",
"role" : "developer",
"email" : "[email protected]"
}
],
"minimum-stability" : "stable",
"require" : {
"pluf/cache" : "^2.1.0",
"pluf/cms" : "^2.1.0",
"pluf/core" : "^2.1.0",
"pluf/bank" : "^2.1.0",
"pluf/assort" : "^2.1.0",
"pluf/geo" : "^2.1",
"pluf/shop" : "^0.1.0"
},
"repositories" : [{
"type" : "path",
"url" : "../shop"
}
],
"include-path" : [
"src/"
],
"homepage" : "https://gitlab.com/microshop/mall",
"support" : {
"email" : "[email protected]",
"issues" : "https://gitlab.com/microshop/mall/issues",
"wiki" : "https://gitlab.com/microshop/mall/wikis/home",
"source" : "https://gitlab.com/microshop/mall"
},
"keywords" : [
"pluf",
"shop",
"sell",
"service"
]
}
35 changes: 35 additions & 0 deletions src/Mall/Agency.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php

/**
* ساختار داده‌ای شعب یک فروشگاه را تعیین می‌کند.
*
* @author hadi <[email protected]>
*
*/
class Mall_Agency extends Shop_Agency
{

/**
* @brief مدل داده‌ای را بارگذاری می‌کند.
*
* تمام فیلدهای مورد نیاز برای این مدل داده‌ای در این متد تعیین شده و به
* صورت کامل ساختار دهی می‌شود.
*
* @see Pluf_Model::init()
*/
function init()
{
parent::init();
$this->_a['multitenant'] = false;
$this->_a['cols'] = array_merge($this->_a['cols'], array(
'tenant' => array(
'type' => 'Pluf_DB_Field_Foreignkey',
'model' => 'Pluf_Tenant',
'blank' => false,
'unique' => true,
'editable' => false
)
));
}

}
27 changes: 27 additions & 0 deletions src/Mall/Product.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

class Mall_Product extends Shop_Product
{

/**
* @brief مدل داده‌ای را بارگذاری می‌کند.
*
* @see Pluf_Model::init()
*/
function init()
{
parent::init();
$this->_a['multitenant'] = false;
// Merge parent columns with new columns
$this->_a['cols'] = array_merge($this->_a['cols'], array(
'tenant' => array(
'type' => 'Pluf_DB_Field_Foreignkey',
'model' => 'Pluf_Tenant',
'blank' => false,
'unique' => true,
'editable' => false
)
));
}

}
26 changes: 26 additions & 0 deletions src/Mall/Service.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

class Mall_Service extends Shop_Service
{

/**
* @brief مدل داده‌ای را بارگذاری می‌کند.
*
* @see Pluf_Model::init()
*/
function init()
{
parent::init();
$this->_a['multitenant'] = false;
// Merge parent columns with new columns
$this->_a['cols'] = array_merge($this->_a['cols'], array(
'tenant' => array(
'type' => 'Pluf_DB_Field_Foreignkey',
'model' => 'Pluf_Tenant',
'blank' => false,
'unique' => true,
'editable' => false
)
));
}
}
7 changes: 7 additions & 0 deletions src/Mall/module.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "Mall",
"version": "0.1.0",
"title": "Module to manage multiple shop",
"model": [ ],
"permisson": []
}
39 changes: 39 additions & 0 deletions src/Mall/relations.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php
return array(
// 'Shop_Product' => array(
// 'relate_to_many' => array(
// 'Shop_TaxClass',
// 'Assort_Category',
// 'Assort_Tag'
// )
// ),
// 'Shop_Service' => array(
// 'relate_to_many' => array(
// 'Shop_TaxClass',
// 'Assort_Category',
// 'Assort_Tag'
// )
// ),
// 'Shop_ProductItem' => array(
// 'relate_to' => array(
// 'Shop_Product',
// 'Shop_Order'
// )
// ),
// 'Shop_ServiceItem' => array(
// 'relate_to' => array(
// 'Shop_Service',
// 'Shop_Order'
// )
// ),
// 'Shop_Order' => array(
// 'relate_to' => array(
// 'Pluf_User'
// )
// ),
// 'Shop_Agency' => array(
// 'relate_to_many' => array(
// 'Pluf_User'
// )
// ),
);
Loading

0 comments on commit 12762f1

Please sign in to comment.