---
title: "Appointments"
description: "Varattavat resurssit. Jokainen sovellus on moduuli samalla tietomallilla."
canonical: "https://obop.dev/fi/apps/appointments/"
lang: "fi"
---

# Appointments

## Mihin se on tarkoitettu

Describe bookable people, rooms and equipment and record appointments with a date, start and end. Overlaps are not prevented automatically.

## Mitä paketti tekee ja mitä ei

Bookable resources (people, rooms, equipment) and appointments with a date, start and end time and a status flow. Overlaps are not prevented automatically.

## Mallit

### `appointments_resource`

Something or someone that can be booked

Lukuryhmä: `appointments.user`. Kirjoitusryhmä: `appointments.manager`.

| Kenttä | Tyyppi | Tietoluokka | Henkilötieto | Ryhmä | Agentit näkevät | Kuvaus |
|---|---|---|---|---|---|---|
| `name` | text | `none` | ei | `appointments.user` | selkoisena | Name of the resource, for example Meeting room 2 |
| `kind` | select (person, room, equipment) | `none` | ei | `appointments.user` | selkoisena | What kind of resource it is: person, room, equipment |
| `capacity` | number | `none` | ei | `appointments.user` | selkoisena | How many people it can serve at once |
| `active` | bool | `none` | ei | `appointments.user` | selkoisena | Whether the resource can be booked |

### `appointments_appointment`

A booking of a resource at a time

Lukuryhmä: `appointments.user`. Kirjoitusryhmä: `appointments.user`.

| Kenttä | Tyyppi | Tietoluokka | Henkilötieto | Ryhmä | Agentit näkevät | Kuvaus |
|---|---|---|---|---|---|---|
| `resource_id` | ref → appointments_resource | `none` | ei | `appointments.user` | selkoisena | The resource booked |
| `title` | text | `none` | ei | `appointments.user` | selkoisena | What the appointment is for |
| `day` | date | `none` | ei | `appointments.user` | selkoisena | Date of the appointment (YYYY-MM-DD) |
| `start_minute` | number | `none` | ei | `appointments.user` | selkoisena | Start time as minutes since midnight, for example 540 for 09:00 |
| `end_minute` | number | `none` | ei | `appointments.user` | selkoisena | End time as minutes since midnight, for example 600 for 10:00 |
| `attendee_name` | text | `internal` | kyllä | `appointments.user` | maskattu | Name of the person attending |
| `attendee_email` | text | `internal` | kyllä | `appointments.user` | maskattu | Email address of the attendee |
| `attendee_phone` | text | `internal` | kyllä | `appointments.user` | maskattu | Phone number of the attendee |
| `notes` | longtext | `none` | ei | `appointments.user` | selkoisena | Anything the host should know beforehand |
| `state` | select (scheduled, confirmed, done, cancelled, no_show) | `none` | ei | `appointments.user` | selkoisena | Booking status: scheduled, confirmed, done, cancelled, no_show |

## Työnkulut

### `appointments_appointment`

| Toiminto | Siirtää | Kuka voi suorittaa | Hyväksyntä |
|---|---|---|---|
| `appointments_appointment.confirm` | state: scheduled → confirmed | `appointments.user` | ei |
| `appointments_appointment.complete` | state: confirmed → done | `appointments.user` | ei |
| `appointments_appointment.cancel` | state: scheduled → cancelled | `appointments.user` | ei |
| `appointments_appointment.mark_no_show` | state: confirmed → no_show | `appointments.user` | ei |

## Käyttöoikeusryhmät

Tämän sovelluksen käyttämät ryhmät:

- `appointments.manager`
- `appointments.user`

## Hyväksyntävaiheet

Mikään tämän sovelluksen vaihe ei vaadi hyväksyntää tietueiden poistamista lukuun ottamatta.

## Mitä agentit voivat ja eivät voi tehdä

Agentti voi lukea, hakea, luoda ja päivittää tämän sovelluksen tietueita sekä suorittaa toiminnot, jotka eivät vaadi hyväksyntää, tunnisteensa käyttöoikeusryhmien rajoissa.

Se voi vain ehdottaa näitä vaiheita, ja ihmisen on hyväksyttävä ne: `appointments_resource.delete`, `appointments_appointment.delete`.

Henkilötiedot maskataan paikkamerkeiksi: `appointments_appointment.attendee_name`, `appointments_appointment.attendee_email`, `appointments_appointment.attendee_phone`.

## Riippuvuudet

Ei ole.

## Asennus

Asenna se Customize-sovelluksesta (Marketplace) tai komentoriviltä:

```bash
obop modules install-from appointments
```

Vaatii tietokannan ja ylläpitäjän oikeudet.

## Tee oma

[Moduulioppaassa näytetään, miten tällaiset sovellukset kirjoitetaan](/fi/docs/reference/module-manifest/)
