the command pattern is a behavioral design pattern in which an object is used to encapsulate all information needed to perform an action or trigger an event at a later time. This information includes the method name, the object that owns the method and values for the method parameters.
Check out here my post about Command Pattern : https://medium.com/@onurcan1717/command-design-pattern-9ef93f8a7ed0