First-principles study on the mechanical, electronic and magnetic properties of Fe3C