The adapter accepts one type and generates an interface for other types. Adapter is a type of packaging for the original interface, that is, wrapper.
It is a dual mode, with two types of schema and schema object. See the following illustration in two cases.
The adapter mode is mainly used to solve the mismatch between two existing interfaces. It does not consider how these interfaces are implemented or how they may evolve. In this way, you do not need to redesign any of the two independently designed classes to make them work together.
One of the most common application scenarios that I think of most is packaging the third-party tool library Lib, which is easy to use in projects. Programming interfaces provided by hardware such as attendance machines, scanning guns, and computer scales.
Note the difference between facade and adapter: facade defines a new interface, while the adapter reuses an original interface to make the two existing interfaces work together.