Here's the lower reaches of the pinnacle of Chinese joinery - the mortise and tenoned triple miter joint, with integral tenons for attaching the top. One way to cut the joint is shown - step by step. I don't know if this is how it should be done - but this is how it could be done.