Capital Lease/Operating Lease - Depreciated over what period?

Asset's useful life? Lease term? Lessor of? Help!