Skip to content

Commit

Permalink
Merge pull request #4720 from izayoi256/feature/master-entity-exists
Browse files Browse the repository at this point in the history
マスタEntityでclass_existsをチェックするよう変更
  • Loading branch information
Kiyotaka Oku authored Dec 18, 2020
2 parents ece7185 + 720fc8e commit b60b4e8
Show file tree
Hide file tree
Showing 21 changed files with 522 additions and 480 deletions.
40 changes: 21 additions & 19 deletions src/Eccube/Entity/Master/Authority.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,27 @@

use Doctrine\ORM\Mapping as ORM;

/**
* Authority
*
* @ORM\Table(name="mtb_authority")
* @ORM\InheritanceType("SINGLE_TABLE")
* @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255)
* @ORM\HasLifecycleCallbacks()
* @ORM\Entity(repositoryClass="Eccube\Repository\Master\AuthorityRepository")
* @ORM\Cache(usage="NONSTRICT_READ_WRITE")
*/
class Authority extends \Eccube\Entity\Master\AbstractMasterEntity
{
if (!class_exists(Authority::class, false)) {
/**
* システム管理者
* Authority
*
* @ORM\Table(name="mtb_authority")
* @ORM\InheritanceType("SINGLE_TABLE")
* @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255)
* @ORM\HasLifecycleCallbacks()
* @ORM\Entity(repositoryClass="Eccube\Repository\Master\AuthorityRepository")
* @ORM\Cache(usage="NONSTRICT_READ_WRITE")
*/
const ADMIN = 0;
class Authority extends \Eccube\Entity\Master\AbstractMasterEntity
{
/**
* システム管理者
*/
const ADMIN = 0;

/**
* 店舗オーナー
*/
const OWNER = 1;
}
/**
* 店舗オーナー
*/
const OWNER = 1;
}
}
26 changes: 14 additions & 12 deletions src/Eccube/Entity/Master/Country.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,18 @@

use Doctrine\ORM\Mapping as ORM;

/**
* Country
*
* @ORM\Table(name="mtb_country")
* @ORM\InheritanceType("SINGLE_TABLE")
* @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255)
* @ORM\HasLifecycleCallbacks()
* @ORM\Entity(repositoryClass="Eccube\Repository\Master\CountryRepository")
* @ORM\Cache(usage="NONSTRICT_READ_WRITE")
*/
class Country extends \Eccube\Entity\Master\AbstractMasterEntity
{
if (!class_exists(Country::class, false)) {
/**
* Country
*
* @ORM\Table(name="mtb_country")
* @ORM\InheritanceType("SINGLE_TABLE")
* @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255)
* @ORM\HasLifecycleCallbacks()
* @ORM\Entity(repositoryClass="Eccube\Repository\Master\CountryRepository")
* @ORM\Cache(usage="NONSTRICT_READ_WRITE")
*/
class Country extends \Eccube\Entity\Master\AbstractMasterEntity
{
}
}
70 changes: 36 additions & 34 deletions src/Eccube/Entity/Master/CsvType.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,40 +15,42 @@

use Doctrine\ORM\Mapping as ORM;

/**
* CsvType
*
* @ORM\Table(name="mtb_csv_type")
* @ORM\InheritanceType("SINGLE_TABLE")
* @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255)
* @ORM\HasLifecycleCallbacks()
* @ORM\Entity(repositoryClass="Eccube\Repository\Master\CsvTypeRepository")
* @ORM\Cache(usage="NONSTRICT_READ_WRITE")
*/
class CsvType extends \Eccube\Entity\Master\AbstractMasterEntity
{
/**
* @var integer
*/
const CSV_TYPE_PRODUCT = 1;

/**
* @var integer
*/
const CSV_TYPE_CUSTOMER = 2;

/**
* @var integer
*/
const CSV_TYPE_ORDER = 3;

/**
* @var integer
*/
const CSV_TYPE_SHIPPING = 4;

if (!class_exists(CsvType::class, false)) {
/**
* @var integer
* CsvType
*
* @ORM\Table(name="mtb_csv_type")
* @ORM\InheritanceType("SINGLE_TABLE")
* @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255)
* @ORM\HasLifecycleCallbacks()
* @ORM\Entity(repositoryClass="Eccube\Repository\Master\CsvTypeRepository")
* @ORM\Cache(usage="NONSTRICT_READ_WRITE")
*/
const CSV_TYPE_CATEGORY = 5;
class CsvType extends \Eccube\Entity\Master\AbstractMasterEntity
{
/**
* @var integer
*/
const CSV_TYPE_PRODUCT = 1;

/**
* @var integer
*/
const CSV_TYPE_CUSTOMER = 2;

/**
* @var integer
*/
const CSV_TYPE_ORDER = 3;

/**
* @var integer
*/
const CSV_TYPE_SHIPPING = 4;

/**
* @var integer
*/
const CSV_TYPE_CATEGORY = 5;
}
}
26 changes: 14 additions & 12 deletions src/Eccube/Entity/Master/CustomerOrderStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,18 @@

use Doctrine\ORM\Mapping as ORM;

/**
* CustomerOrderStatus
*
* @ORM\Table(name="mtb_customer_order_status")
* @ORM\InheritanceType("SINGLE_TABLE")
* @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255)
* @ORM\HasLifecycleCallbacks()
* @ORM\Entity(repositoryClass="Eccube\Repository\Master\CustomerOrderStatusRepository")
* @ORM\Cache(usage="NONSTRICT_READ_WRITE")
*/
class CustomerOrderStatus extends \Eccube\Entity\Master\AbstractMasterEntity
{
if (!class_exists(CustomerOrderStatus::class, false)) {
/**
* CustomerOrderStatus
*
* @ORM\Table(name="mtb_customer_order_status")
* @ORM\InheritanceType("SINGLE_TABLE")
* @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255)
* @ORM\HasLifecycleCallbacks()
* @ORM\Entity(repositoryClass="Eccube\Repository\Master\CustomerOrderStatusRepository")
* @ORM\Cache(usage="NONSTRICT_READ_WRITE")
*/
class CustomerOrderStatus extends \Eccube\Entity\Master\AbstractMasterEntity
{
}
}
78 changes: 40 additions & 38 deletions src/Eccube/Entity/Master/CustomerStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,44 +15,46 @@

use Doctrine\ORM\Mapping as ORM;

/**
* CustomerStatus
*
* @ORM\Table(name="mtb_customer_status")
* @ORM\InheritanceType("SINGLE_TABLE")
* @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255)
* @ORM\HasLifecycleCallbacks()
* @ORM\Entity(repositoryClass="Eccube\Repository\Master\CustomerStatusRepository")
* @ORM\Cache(usage="NONSTRICT_READ_WRITE")
*/
class CustomerStatus extends \Eccube\Entity\Master\AbstractMasterEntity
{
/**
* 仮会員.
*
* @deprecated
*/
const NONACTIVE = 1;

if (!class_exists(CustomerStatus::class, false)) {
/**
* 本会員.
* CustomerStatus
*
* @deprecated
*/
const ACTIVE = 2;

/**
* 仮会員.
*/
const PROVISIONAL = 1;

/**
* 本会員
*/
const REGULAR = 2;

/**
* 退会
* @ORM\Table(name="mtb_customer_status")
* @ORM\InheritanceType("SINGLE_TABLE")
* @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255)
* @ORM\HasLifecycleCallbacks()
* @ORM\Entity(repositoryClass="Eccube\Repository\Master\CustomerStatusRepository")
* @ORM\Cache(usage="NONSTRICT_READ_WRITE")
*/
const WITHDRAWING = 3;
}
class CustomerStatus extends \Eccube\Entity\Master\AbstractMasterEntity
{
/**
* 仮会員.
*
* @deprecated
*/
const NONACTIVE = 1;

/**
* 本会員.
*
* @deprecated
*/
const ACTIVE = 2;

/**
* 仮会員.
*/
const PROVISIONAL = 1;

/**
* 本会員
*/
const REGULAR = 2;

/**
* 退会
*/
const WITHDRAWING = 3;
}
}
32 changes: 17 additions & 15 deletions src/Eccube/Entity/Master/DeviceType.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,21 @@

use Doctrine\ORM\Mapping as ORM;

/**
* DeviceType
*
* @ORM\Table(name="mtb_device_type")
* @ORM\InheritanceType("SINGLE_TABLE")
* @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255)
* @ORM\HasLifecycleCallbacks()
* @ORM\Entity(repositoryClass="Eccube\Repository\Master\DeviceTypeRepository")
* @ORM\Cache(usage="NONSTRICT_READ_WRITE")
*/
class DeviceType extends \Eccube\Entity\Master\AbstractMasterEntity
{
const DEVICE_TYPE_MB = 2;
// const DEVICE_TYPE_TABLET = 3;
const DEVICE_TYPE_PC = 10;
if (!class_exists(DeviceType::class, false)) {
/**
* DeviceType
*
* @ORM\Table(name="mtb_device_type")
* @ORM\InheritanceType("SINGLE_TABLE")
* @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255)
* @ORM\HasLifecycleCallbacks()
* @ORM\Entity(repositoryClass="Eccube\Repository\Master\DeviceTypeRepository")
* @ORM\Cache(usage="NONSTRICT_READ_WRITE")
*/
class DeviceType extends \Eccube\Entity\Master\AbstractMasterEntity
{
const DEVICE_TYPE_MB = 2;
// const DEVICE_TYPE_TABLET = 3;
const DEVICE_TYPE_PC = 10;
}
}
26 changes: 14 additions & 12 deletions src/Eccube/Entity/Master/Job.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,18 @@

use Doctrine\ORM\Mapping as ORM;

/**
* Job
*
* @ORM\Table(name="mtb_job")
* @ORM\InheritanceType("SINGLE_TABLE")
* @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255)
* @ORM\HasLifecycleCallbacks()
* @ORM\Entity(repositoryClass="Eccube\Repository\Master\JobRepository")
* @ORM\Cache(usage="NONSTRICT_READ_WRITE")
*/
class Job extends \Eccube\Entity\Master\AbstractMasterEntity
{
if (!class_exists(Job::class, false)) {
/**
* Job
*
* @ORM\Table(name="mtb_job")
* @ORM\InheritanceType("SINGLE_TABLE")
* @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255)
* @ORM\HasLifecycleCallbacks()
* @ORM\Entity(repositoryClass="Eccube\Repository\Master\JobRepository")
* @ORM\Cache(usage="NONSTRICT_READ_WRITE")
*/
class Job extends \Eccube\Entity\Master\AbstractMasterEntity
{
}
}
Loading

0 comments on commit b60b4e8

Please sign in to comment.