In which dynasty did Mulan join the army?

Hua Mulan is from the Northern Wei Dynasty, and northerners like to practice martial arts. Mulan's father used to be a soldier and raised Mulan as a boy since she was a child. When Mulan was ten years old, he often took her to the small river outside the village to practice martial arts, riding horses, archery, sword dancing, and using sticks. In her spare time, Mulan also likes to read her father's old military books.

After the Northern Wei Dynasty moved its capital to Luoyang, and after Emperor Xiaowen's reforms, the social economy developed and people's lives became relatively stable. However, at that time, the Rouran tribe, a nomadic tribe in the north, continued to harass them southward, and the Northern Wei regime stipulated that one man from each family should go to the front line.

Mulan's father was too old to go to the battlefield, and her brother at home was too young, so Mulan decided to join the army in her father's place, and she began her many years of military life. Going to the border to fight is a difficult task for many men, not to mention that Mulan has to hide her identity and kill the enemy with her friends. But Hua Mulan finally completed her mission and returned home in triumph after more than ten years (Mulan's words of 12 years are a false reference). Because of her great contributions, the emperor believed that she could serve in the court and be given an official position. However, Hua Mulan refused. She asked the emperor to let her go home to compensate and honor her parents.