# Declaring your own Noun

URL: /code/learn/declaring-the-lease-noun · Id: `page:code/learn/declaring-the-lease-noun`

> Tutorial 2 of 12 declares Leaseline's own Noun, lease, in one file and reads the API, types and Events it compiles to.

A [Noun](/business/nouns/noun) file declares a record the template does not have. Leaseline declares a `Lease` Noun, and one file gives it an API, types and [events](/business/nouns/event).

## What you build
You write `nouns/Lease.mdx`: a unit, a resident, an end date, a rent, a lifecycle and two [Verbs](/business/nouns/verb), `renew` and `notify`. The body of the file is the Noun's documentation on every [Interface](/business/nouns/interface).

## Steps
1. To declare the Noun, create its file at the project root:

   ```mdx title="nouns/Lease.mdx"
   ---
   extends: [Thing]
   properties:
     unit: string
     resident?: Contact
     endsOn: date
     rent?: money
     status: active | renewing | renewed | ended
   verbs:
     renew: { months: integer, increase?: number }
     notify: {}
   ---
   A Lease is one resident's agreement on one unit, from signing to renewal.
   ```

   A name ending in `?` is optional. `status` holds the states, and only a Verb or an [Event](/business/nouns/event) moves it.

2. To read what the save compiled, print the Verb's schema:

   ```bash
   npx startup-builder schema Lease.renew
   ```

3. To read the generated types, open `.sb/types/Lease.d.ts`:

   ```ts title=".sb/types/Lease.d.ts"
   interface LeaseRenewInput {
     lease: SB.Id
     months: number
     increase?: number
   }
   ```

4. To try the Verb without storing anything, call it with `--try`:

   ```bash
   npx startup-builder do Lease.renew --json '{"lease":"lease_4loEed1JG4","months":12}' --try
   ```

## Result
One file gave `Lease` create, get, list, update and delete, and the Verbs `Lease.renew` and `Lease.notify`. It also gave the Events `Lease.created`, `Lease.renewed` and `Lease.notified`, and typed SDK methods, CLI operations, MCP tools and OpenAPI paths. Checkpoint `leaseline@ch02` (status `planned`) adds `nouns/Lease.mdx`.

## Next steps
- [What compiles](/products/what-compiles): the published artifacts, and what one more Verb changes.
- [Tutorial 3](/code/learn/writing-a-verb-function) says what `renew` does.
- [Nouns](/code/file-conventions/nouns): every key the file takes.