<?php
namespace App\AtechNet\CoreBundle\Entity;
use Doctrine\ORM\Mapping\Column;
use Doctrine\ORM\Mapping\Entity;
use Doctrine\ORM\Mapping\HasLifecycleCallbacks;
use Doctrine\ORM\Mapping\JoinColumn;
use Doctrine\ORM\Mapping\ManyToOne;
use Doctrine\ORM\Mapping\Table as Table;
/**
* ClaimStatus
*
* @Table(name="claim_statuses")
* @Entity()
* @HasLifecycleCallbacks
*/
class ClaimStatus extends AbstractSignedEntity
{
public const int STATUS_TYPE_REGISTERED = 1;
public const int STATUS_TYPE_PARCEL_ORDERED = 2;
public const int STATUS_TYPE_ACCEPTED_ITEM_ARRIVED = 3;
public const int STATUS_TYPE_IN_PROGRESS = 4;
public const int STATUS_TYPE_ACCEPTED = 5;
public const int STATUS_TYPE_ACCEPTED_ITEM_SENT = 6;
public const int STATUS_TYPE_REJECTED = 7;
public const int STATUS_TYPE_REJECTED_ITEM_SENT = 8;
public const int STATUS_TYPE_CANCELED_BY_CUSTOMER = 9;
public const int STATUS_TYPE_CANCELED = 20;
public const int STATUS_TYPE_RETURNED = 10;
public const int STATUS_TYPE_WAITING_FOR_SALES = 11;
public const int STATUS_TYPE_WAITING_FOR_SERVIS = 12;
public const int STATUS_TYPE_WAITING_FOR_PARTS = 13;
public const int STATUS_TYPE_WAITING_FOR_AIKEN = 16;
public const int STATUS_TYPE_ACCEPTED_CREDIT_NOTE = 14;
public const int STATUS_TYPE_SEND_BACK = 15;
public const int STATUS_TYPE_WAITING_FOR_PARTNER = 17;
public const int STATUS_TYPE_WAITING_FOR_RMA = 18;
public const int STATUS_TYPE_WAITING_FOR_REFUND = 19;
public const int STATUS_TYPE_WAITING_FOR_EXCHANGE = 21;
public const int STATUS_TYPE_UNSOLVED = 30;
public const int STATUS_TYPE_WAITING_FOR_CUSTOMER = 31;
public const int STATUS_TYPE_WAITING_FOR_MARKETPLACE = 32;
public const int STATUS_TYPE_WAITING_FOR_CUSTOMER_SERVICE = 33;
public const int STATUS_TYPE_WAITING_FOR_DECISION = 34;
public const int STATUS_TYPE_WAITING_FOR_LEGAL_RESOLUTION = 35;
/**
* @return array
*/
public static function getStatusChoices(): array
{
return [
self::STATUS_TYPE_REGISTERED => 'Registered',
self::STATUS_TYPE_PARCEL_ORDERED => 'Parcel ordered',
self::STATUS_TYPE_ACCEPTED_ITEM_ARRIVED => 'Accepted, item arrived',
self::STATUS_TYPE_SEND_BACK => 'Send back',
self::STATUS_TYPE_IN_PROGRESS => 'In progress',
self::STATUS_TYPE_WAITING_FOR_SALES => 'Waiting for sales',
self::STATUS_TYPE_WAITING_FOR_SERVIS => 'Waiting for servis',
self::STATUS_TYPE_WAITING_FOR_PARTS => 'Waiting for parts',
self::STATUS_TYPE_WAITING_FOR_AIKEN => 'Waiting for AIKEN',
self::STATUS_TYPE_WAITING_FOR_RMA => 'Waiting for RMA',
self::STATUS_TYPE_WAITING_FOR_PARTNER => 'Waiting for Partner',
self::STATUS_TYPE_WAITING_FOR_EXCHANGE => 'Waiting for exchange',
self::STATUS_TYPE_ACCEPTED => 'Accepted',
self::STATUS_TYPE_ACCEPTED_CREDIT_NOTE => 'Accepted, credit note',
self::STATUS_TYPE_WAITING_FOR_REFUND => 'Waiting for refund',
self::STATUS_TYPE_ACCEPTED_ITEM_SENT => 'Accepted, item sent',
self::STATUS_TYPE_REJECTED => 'Rejected',
self::STATUS_TYPE_REJECTED_ITEM_SENT => 'Rejected, item sent',
self::STATUS_TYPE_CANCELED => 'Canceled',
self::STATUS_TYPE_CANCELED_BY_CUSTOMER => 'Canceled by customer',
self::STATUS_TYPE_RETURNED => 'Returned claim',
self::STATUS_TYPE_UNSOLVED => 'Unsolved',
self::STATUS_TYPE_WAITING_FOR_CUSTOMER => 'Waiting for customer',
self::STATUS_TYPE_WAITING_FOR_MARKETPLACE => 'Waiting for marketplace',
self::STATUS_TYPE_WAITING_FOR_CUSTOMER_SERVICE => 'Waiting for customer service',
self::STATUS_TYPE_WAITING_FOR_DECISION => 'Waiting for decision',
self::STATUS_TYPE_WAITING_FOR_LEGAL_RESOLUTION => 'Waiting for legal resolution',
];
}
public const int STATUS_GROUP_REGISTERED = 10;
public const int STATUS_GROUP_PARCEL_ORDERED = 20;
public const int STATUS_GROUP_ACCEPTED_ITEM_ARRIVED = 30;
public const int STATUS_GROUP_SEND_BACK = 35;
public const int STATUS_GROUP_IN_PROGRESS = 40;
public const int STATUS_GROUP_WAITING = 50;
public const int STATUS_GROUP_ACCEPTED = 60;
public const int STATUS_GROUP_REJECTED = 70;
public const int STATUS_GROUP_RETURNED = 80;
public const int STATUS_GROUP_UNSOLVED = 90;
public static function getGroupedStatusChoices(): array
{
return [
self::STATUS_GROUP_REGISTERED => 'Registered',
self::STATUS_GROUP_PARCEL_ORDERED => 'Carrier ordered',
self::STATUS_GROUP_ACCEPTED_ITEM_ARRIVED => 'Item arrived',
self::STATUS_GROUP_SEND_BACK => 'Send back',
self::STATUS_GROUP_IN_PROGRESS => 'In progress',
self::STATUS_GROUP_WAITING => 'Waiting',
self::STATUS_GROUP_ACCEPTED => 'Accepted',
self::STATUS_GROUP_REJECTED => 'Rejected',
self::STATUS_GROUP_RETURNED => 'Returned.short',
self::STATUS_GROUP_UNSOLVED => 'Unsolved',
];
}
/**
* @return \int[][]
*/
public static function getGroupedStatusChoiceStructure(): array
{
return [
self::STATUS_GROUP_REGISTERED => [
self::STATUS_TYPE_REGISTERED,
],
self::STATUS_GROUP_PARCEL_ORDERED => [
self::STATUS_TYPE_PARCEL_ORDERED,
],
self::STATUS_GROUP_ACCEPTED_ITEM_ARRIVED => [
self::STATUS_TYPE_ACCEPTED_ITEM_ARRIVED,
],
self::STATUS_GROUP_SEND_BACK => [
self::STATUS_TYPE_SEND_BACK,
],
self::STATUS_GROUP_IN_PROGRESS => [
self::STATUS_TYPE_IN_PROGRESS,
],
self::STATUS_GROUP_WAITING => [
self::STATUS_TYPE_WAITING_FOR_SALES,
self::STATUS_TYPE_WAITING_FOR_SERVIS,
self::STATUS_TYPE_WAITING_FOR_PARTS,
self::STATUS_TYPE_WAITING_FOR_AIKEN,
self::STATUS_TYPE_WAITING_FOR_PARTNER,
self::STATUS_TYPE_WAITING_FOR_RMA,
self::STATUS_TYPE_WAITING_FOR_REFUND,
self::STATUS_TYPE_WAITING_FOR_EXCHANGE
],
self::STATUS_GROUP_ACCEPTED => [
self::STATUS_TYPE_ACCEPTED,
self::STATUS_TYPE_ACCEPTED_CREDIT_NOTE,
self::STATUS_TYPE_ACCEPTED_ITEM_SENT,
],
self::STATUS_GROUP_REJECTED => [
self::STATUS_TYPE_REJECTED,
self::STATUS_TYPE_REJECTED_ITEM_SENT,
self::STATUS_TYPE_CANCELED_BY_CUSTOMER,
],
self::STATUS_GROUP_RETURNED => [
self::STATUS_TYPE_RETURNED,
],
self::STATUS_GROUP_UNSOLVED => [
self::STATUS_TYPE_UNSOLVED,
self::STATUS_TYPE_WAITING_FOR_CUSTOMER,
self::STATUS_TYPE_WAITING_FOR_MARKETPLACE,
self::STATUS_TYPE_WAITING_FOR_CUSTOMER_SERVICE,
self::STATUS_TYPE_WAITING_FOR_DECISION,
self::STATUS_TYPE_WAITING_FOR_LEGAL_RESOLUTION,
],
];
}
/**
* @return array
*/
public static function getNotifiableStatuses(): array
{
return [
self::STATUS_TYPE_REGISTERED,
self::STATUS_TYPE_PARCEL_ORDERED,
self::STATUS_TYPE_ACCEPTED_ITEM_ARRIVED,
self::STATUS_GROUP_SEND_BACK,
self::STATUS_TYPE_IN_PROGRESS,
self::STATUS_TYPE_ACCEPTED,
self::STATUS_TYPE_ACCEPTED_CREDIT_NOTE,
self::STATUS_TYPE_ACCEPTED_ITEM_SENT,
self::STATUS_TYPE_REJECTED,
self::STATUS_TYPE_REJECTED_ITEM_SENT,
self::STATUS_TYPE_RETURNED,
];
}
/**
* @var Claim
*
* @ManyToOne(targetEntity="Claim", inversedBy="statuses")
* @JoinColumn(name="claim_id", referencedColumnName="id")
*/
private Claim $claim;
/**
* @var int
*
* @Column(name="status_type", type="integer")
*/
private int $statusType;
/**
* @return Claim
*/
public function getClaim(): Claim
{
return $this->claim;
}
/**
* @param Claim $claim
*/
public function setClaim(Claim $claim): void
{
$this->claim = $claim;
}
/**
* @return int
*/
public function getStatusType(): int
{
return $this->statusType;
}
/**
* @param int $statusType
*/
public function setStatusType(int $statusType): void
{
$this->statusType = $statusType;
}
}