/* Options: Date: 2026-08-13 04:10:05 Version: 10.09 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://blazor-gallery.servicestack.net //GlobalNamespace: //MakePropertiesOptional: False //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: CreateInterview.* //ExcludeTypes: //DefaultImports: serde::{Deserialize, Serialize},serde_json::Value,std::collections::HashMap */ #![allow( dead_code, non_camel_case_types, non_snake_case, clippy::upper_case_acronyms )] use serde::{Deserialize, Serialize}; use serde_json::Value; use servicestack::*; use std::collections::HashMap; #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default)] #[serde(default)] pub struct JobApplicationAttachment { pub id: i32, // References(typeof(JobApplication)) #[serde(rename = "jobApplicationId")] pub job_application_id: i32, #[serde(rename = "fileName")] pub file_name: String, #[serde(rename = "filePath")] pub file_path: String, #[serde(rename = "contentType")] pub content_type: String, #[serde(rename = "contentLength")] pub content_length: i64, } #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default)] #[serde(default)] pub struct AppUser { pub id: String, #[serde(rename = "firstName")] #[serde(default, skip_serializing_if = "Option::is_none")] pub first_name: Option, #[serde(rename = "lastName")] #[serde(default, skip_serializing_if = "Option::is_none")] pub last_name: Option, #[serde(rename = "displayName")] #[serde(default, skip_serializing_if = "Option::is_none")] pub display_name: Option, #[serde(rename = "profileUrl")] #[serde(default, skip_serializing_if = "Option::is_none")] pub profile_url: Option, } #[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, Hash, Default)] pub enum EmploymentType { #[default] #[serde(rename = "FullTime")] FullTime, #[serde(rename = "PartTime")] PartTime, #[serde(rename = "Casual")] Casual, #[serde(rename = "Contract")] Contract, } #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default)] #[serde(default)] pub struct Job { #[serde(flatten)] pub audit_base: AuditBase, pub id: i32, pub title: String, #[serde(rename = "employmentType")] pub employment_type: EmploymentType, pub company: String, pub location: String, #[serde(rename = "salaryRangeLower")] pub salary_range_lower: i32, #[serde(rename = "salaryRangeUpper")] pub salary_range_upper: i32, pub description: String, pub applications: Vec, pub closing: String, } #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default)] #[serde(default)] pub struct Contact { pub id: i32, // Computed #[serde(rename = "displayName")] pub display_name: String, #[serde(rename = "profileUrl")] pub profile_url: String, #[serde(rename = "firstName")] pub first_name: String, #[serde(rename = "lastName")] pub last_name: String, #[serde(rename = "salaryExpectation")] #[serde(default, skip_serializing_if = "Option::is_none")] pub salary_expectation: Option, #[serde(rename = "jobType")] pub job_type: String, #[serde(rename = "availabilityWeeks")] pub availability_weeks: i32, #[serde(rename = "preferredWorkType")] pub preferred_work_type: EmploymentType, #[serde(rename = "preferredLocation")] pub preferred_location: String, pub email: String, pub phone: String, #[serde(default, skip_serializing_if = "Option::is_none")] pub skills: Option>, pub about: String, pub applications: Vec, } #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default)] #[serde(default)] pub struct JobApplicationComment { #[serde(flatten)] pub audit_base: AuditBase, pub id: i32, // References(typeof(AppUser)) #[serde(rename = "appUserId")] pub app_user_id: String, #[serde(rename = "appUser")] pub app_user: AppUser, // References(typeof(JobApplication)) #[serde(rename = "jobApplicationId")] pub job_application_id: i32, pub comment: String, } #[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, Hash, Default)] pub enum JobApplicationStatus { #[default] #[serde(rename = "Applied")] Applied, #[serde(rename = "PhoneScreening")] PhoneScreening, #[serde(rename = "PhoneScreeningCompleted")] PhoneScreeningCompleted, #[serde(rename = "Interview")] Interview, #[serde(rename = "InterviewCompleted")] InterviewCompleted, #[serde(rename = "Offer")] Offer, #[serde(rename = "Disqualified")] Disqualified, } #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default)] #[serde(default)] pub struct JobApplicationEvent { #[serde(flatten)] pub audit_base: AuditBase, pub id: i32, // References(typeof(JobApplication)) #[serde(rename = "jobApplicationId")] pub job_application_id: i32, // References(typeof(AppUser)) #[serde(rename = "appUserId")] pub app_user_id: String, #[serde(rename = "appUser")] pub app_user: AppUser, pub description: String, #[serde(default, skip_serializing_if = "Option::is_none")] pub status: Option, #[serde(rename = "eventDate")] pub event_date: String, } #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default)] #[serde(default)] pub struct PhoneScreen { #[serde(flatten)] pub audit_base: AuditBase, pub id: i32, // References(typeof(AppUser)) #[serde(rename = "appUserId")] pub app_user_id: String, #[serde(rename = "appUser")] pub app_user: AppUser, // References(typeof(JobApplication)) #[serde(rename = "jobApplicationId")] pub job_application_id: i32, #[serde(rename = "applicationStatus")] #[serde(default, skip_serializing_if = "Option::is_none")] pub application_status: Option, pub notes: String, } #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default)] #[serde(default)] pub struct Interview { #[serde(flatten)] pub audit_base: AuditBase, pub id: i32, #[serde(rename = "bookingTime")] pub booking_time: String, // References(typeof(JobApplication)) #[serde(rename = "jobApplicationId")] pub job_application_id: i32, // References(typeof(AppUser)) #[serde(rename = "appUserId")] pub app_user_id: String, #[serde(rename = "appUser")] pub app_user: AppUser, #[serde(rename = "applicationStatus")] #[serde(default, skip_serializing_if = "Option::is_none")] pub application_status: Option, pub notes: String, } #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default)] #[serde(default)] pub struct JobOffer { #[serde(flatten)] pub audit_base: AuditBase, pub id: i32, #[serde(rename = "salaryOffer")] pub salary_offer: i32, pub currency: String, // References(typeof(JobApplication)) #[serde(rename = "jobApplicationId")] pub job_application_id: i32, // References(typeof(AppUser)) #[serde(rename = "appUserId")] pub app_user_id: String, #[serde(rename = "appUser")] pub app_user: AppUser, pub notes: String, } #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default)] #[serde(default)] pub struct JobApplication { pub id: i32, // References(typeof(Job)) #[serde(rename = "jobId")] pub job_id: i32, // References(typeof(Contact)) #[serde(rename = "contactId")] pub contact_id: i32, pub position: Job, pub applicant: Contact, pub comments: Vec, #[serde(rename = "appliedDate")] pub applied_date: String, #[serde(rename = "applicationStatus")] pub application_status: JobApplicationStatus, pub attachments: Vec, pub events: Vec, #[serde(rename = "phoneScreen")] pub phone_screen: PhoneScreen, pub interview: Interview, #[serde(rename = "jobOffer")] pub job_offer: JobOffer, } // ValidateRequest(Validator="IsAuthenticated") #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Default)] #[serde(default)] pub struct CreateInterview { // Validate(Validator="NotNull") #[serde(rename = "bookingTime")] pub booking_time: Option, // Validate(Validator="GreaterThan(0)") #[serde(rename = "jobApplicationId")] pub job_application_id: i32, // Validate(Validator="GreaterThan(0)", Message="An employee to perform interview must be selected.") #[serde(rename = "appUserId")] pub app_user_id: String, #[serde(rename = "applicationStatus")] pub application_status: JobApplicationStatus, } impl IRequest for CreateInterview { const NAME: &'static str = "CreateInterview"; const VERB: &'static str = "POST"; } impl IReturn for CreateInterview { type Response = Interview; }