sample code
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace Drupal\daftar_core;
|
||||
|
||||
use Drupal\Core\Entity\EntityChangedInterface;
|
||||
use Drupal\Core\Entity\ContentEntityInterface;
|
||||
use Drupal\daftar_core\Entity\Helper\EntityCreatedInterface;
|
||||
use Drupal\daftar_core\Entity\Helper\EntityKhatuInterface;
|
||||
|
||||
/**
|
||||
* Provides an interface defining an order entity.
|
||||
*
|
||||
* @ingroup daftar
|
||||
*/
|
||||
interface OrderInterface extends
|
||||
ContentEntityInterface,
|
||||
EntityKhatuInterface,
|
||||
EntityCreatedInterface,
|
||||
EntityChangedInterface {
|
||||
|
||||
public const DEFAULT_TYPE = 'mkt';
|
||||
|
||||
public const TYPES = [
|
||||
'mkt' => 'Market',
|
||||
'lmt' => 'Limit',
|
||||
'stp' => 'Stop',
|
||||
'stplmt' => 'Stop Limit',
|
||||
];
|
||||
|
||||
public const ACTIONS = [
|
||||
'buy' => 'Buy',
|
||||
'sell' => 'Sell',
|
||||
];
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user