Hired directly by the company, with an end date. After 5 years of renewals at the same company, you can ask for a contract with no end date (無期転換).
In the contract, in the length field.
Write down the date of each renewal. If the company does not renew against your wishes, this counts for unemployment benefits.
General explanation, for guidance. Rules and amounts change: confirm with the responsible office.