There is a PHP project with DDD approach, i.e. class entities have AggregateRoot.
The main classes of entities inherit from AggregateRoot and are implemented in the logic of the object.
Is it allowed within the DDD agreement to create inheritors from classes that implement the logic of the object, if these inheritors will have slightly different logic in the class?
For example
abstract class User extends AggregateRoot
class Customer extends User
class Employee extends User
or
class Order extends AggregateRoot
class RegularOrder extends Order
class SubscriptionOrder extends Order
Are inheritors allowed? In which cases?