p7m_appointment/models/
list_wrapper_service_data_inner.rs

1/*
2 * Appointments Backend
3 *
4 * # API for appointment scheduling related data  This is the API of the service at P7M that manages the scheduling and management of appointments. It is used by the booking widget (see the **WidgetApi** tag) with functions that are public and don't require the user to be authenticated.  For endpoints in other tags the caller has to be authenticated with the system and provide a JWT token in the Authorization header of the HTTP request. When using the API you typically get this token by authenticating first with OAuth 2.0.  When you are trying this API using the Swagger interface, you need to click the `Authorize` button and then again the Authorize button in the pop-up that gets opened.
5 *
6 * The version of the OpenAPI document: 0.13.5
7 * Contact: tech@p7m.de
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ListWrapperServiceDataInner {
16    /// ID of the service
17    #[serde(rename = "serviceId")]
18    pub service_id: uuid::Uuid,
19    /// tenant this service is assocciated with
20    #[serde(rename = "tenantId")]
21    pub tenant_id: uuid::Uuid,
22    /// name of the offered service
23    #[serde(rename = "name")]
24    pub name: String,
25    /// how many minutes have to be reserved for this service
26    #[serde(rename = "expenditureMinutes")]
27    pub expenditure_minutes: i32,
28    /// which tags should get added automatically to a reservation generated for this service
29    #[serde(rename = "defaultTags")]
30    pub default_tags: Vec<uuid::Uuid>,
31    /// which questions should be asked to the patient if he selects this service
32    #[serde(rename = "questions")]
33    pub questions: Vec<models::ExtraQuestion>,
34    /// which color shall be used to show reservations for this service in the calendar
35    #[serde(rename = "color", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
36    pub color: Option<Option<String>>,
37    /// when has this service be updated for the last time
38    #[serde(rename = "lastChange")]
39    pub last_change: String,
40}
41
42impl ListWrapperServiceDataInner {
43    pub fn new(service_id: uuid::Uuid, tenant_id: uuid::Uuid, name: String, expenditure_minutes: i32, default_tags: Vec<uuid::Uuid>, questions: Vec<models::ExtraQuestion>, last_change: String) -> ListWrapperServiceDataInner {
44        ListWrapperServiceDataInner {
45            service_id,
46            tenant_id,
47            name,
48            expenditure_minutes,
49            default_tags,
50            questions,
51            color: None,
52            last_change,
53        }
54    }
55}
56