Files
code_samples/StockPortfolioManagement/daftar/src/OrderInterface.php
T

37 lines
714 B
PHP
Raw Normal View History

2022-10-13 11:55:19 -04:00
<?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',
];
}