The legal system of Mexico follows the pattern of codified law based on the Napoleonic Civil Code. The laws are generally contained in codes, both at federal and state level. Most of the provisions which are relevant to a foreign investor, such as commerce, corporations, foreign investment, labor, intellectual property, tax and maritime matters are regulated by federal statutes.