I just bought a Bafang SWXH6 motor, but I don't have a wiring diagram to hook it up. Is anyone here familiar with the motor, and could please explain to me what each wire does?

If it's hard to see, there are three thick wires, one yellow, one blue and one green, and five thin wires, which are yellow, green, blue, black, and red. I was wondering what wire is what.
Thanks for your help.

If it's hard to see, there are three thick wires, one yellow, one blue and one green, and five thin wires, which are yellow, green, blue, black, and red. I was wondering what wire is what.
Thanks for your help.