In 1995, Donald Trump's first and only initial public offering raised $140 million from public investors under the ticker symbol DJT. A decade later, Trump Hotels & Casino Resorts, filed for bankruptcy.

The casino company posted losses every year it was public -- more than $600 million in total between 1995 and 2004 -- a CNNMoney analysis of 10 years of corporate filings shows.

DJT paid Trump handsomely each year. His salary, bonus and options totaled about $20 million.

An additional $18.5 million came from what the filings called "other" compensation. That includes a web of inventive deals:

-- complex consulting contracts that paid Trump for consulting with his own company;

-- licensing deals under which DJT paid Trump to use the Trump name;

-- reimbursement for the times the company used his personal jet or golf courses for VIPs.

In other words, a company that Trump controlled was paying Trump to use other stuff he owned, including his name.

The Trump campaign did not respond to a request for comment for this article.

Related: Buffett: Monkey could outperform those who bet on Trump stock

Consulting gigs

One example of the consulting arrangements between DJT and Trump: Between 1999 and 2002, the company paid Trump $10.2 million for the "Castle Services Agreement," filings show.

Under this deal, an entity called TCI-II provided marketing, advertising and promotional services to a limited partnership called Castle Associates.

Trump was listed as the sole director and shareholder of TCI-II. He was also the chairman of Castle Associates, a partnership that owned the Trump Marina Hotel. The deal was terminated after 2002.

DJT also paid Trump for other gigs.

In 1995, Trump earned $1.7 million for providing consulting services to Taj Associates. That group owned the Trump Taj Mahal casino, which at the time was majority owned by Trump. Translation: The public company paid Trump for providing expertise to a casino that he owned a stake in.

Then there was what was known as the "TPM Services Agreement." This required Trump Plaza Management, a company wholly owned by Trump, to provide consulting services for marketing and advertising as well as license the Trump name to a DJT subsidiary. Trump received $1.3 million for these services in 1995 alone.

Related: AC's Trump Taj Mahal to close

Trump jets, golf courses

Starting in late 1997, DJT compensated Trump for using some of his facilities to "entertain high-end customers."

DJT explained: "Management believes that the ability to utilize these facilities enhances" its revenue. The "management" here meant Trump himself, since he was the chairman.

In 2002, DJT paid Trump $300,000 for the services of a pilot who flew Trump's personal airplane for VIP customers. And in 2005, the company incurred $337,000 for using Trump's plane as well as his golf courses.

Expert: Deals need extra scrutiny

Business deals between a company and a major shareholder are common and can be totally legit. "Lots of companies have these -- some of them are small and some of them are quite more complex," said David Becher, a finance professor at Drexel University.

However, the onus is on the company to explain these transactions very clearly to the public.

These deals "need to be scrutinized very carefully" because they have "an inherent conflict of interest," said Ralph Walkling, a corporate governance professor, also at Drexel University.

This conflict has to be resolved before a transaction is approved, typically by removing the conflicted party from the decision-making process.

Indeed, DJT had a special committee that approved deals in which the mogul had a personal interest. Trump did not sit on the special committee.

Related: Billionaire Trump supporter: Economy at a 'precipice'

DJT's investors get crushed

Meanwhile, DJT was posting losses every year and investors were being decimated.

Filings show that someone who invested $100 in DJT in 1995 would have lost 90% of their money by 2000 -- and been left with just $8.72.

By comparison, the same amount invested in the S&P 500 would have risen to $232.

DJT filed for bankruptcy in 2004, wiping out the holdings of all shareholders, including Trump.

But soon after, the company emerged from bankruptcy and Trump continued to reap benefits from it. He earned another $6.1 million from the company, now called Trump Entertainment Resorts.

This company had the ticker symbol TRMP. It didn't fare any better. TRMP lost nearly $2 billion from mid-2005 through mid-2010 and filed for bankruptcy in 2009.