pub struct TicketResponse {
pub id: i32,
pub category: String,
pub betreff: String,
pub description: String,
pub room: i16,
pub status: String,
pub date: DateTime<Utc>,
pub user_id: i16,
pub user_first_name: String,
pub user_last_name: String,
}Expand description
API response for a ticket with user information.
Returned by ticket endpoints. Includes denormalized user data for easier frontend rendering.
Created via TicketCreateScheme.
§Fields
id: Unique ticket identifiercategory: Ticket category/typebetreff: Ticket subject linedescription: Detailed ticket descriptionroom: Room number associated with the issuestatus: Current ticket status (e.g., “open”, “in_progress”, “resolved”)date: When the ticket was created (UTC timestamp)user_id: ID of the user who created the ticket (referencesUser)user_first_name,user_last_name: User’s name (denormalized for convenience)
§Example
{
"id": 1,
"category": "maintenance",
"betreff": "Broken light in room 101",
"description": "The ceiling light is not working",
"room": 101,
"status": "open",
"date": "2024-01-15T10:30:00Z",
"user_id": 5,
"user_first_name": "John",
"user_last_name": "Doe"
}Fields§
§id: i32Unique ticket identifier
category: StringTicket category/type (e.g., “maintenance”, “support”)
betreff: StringTicket subject line
description: StringDetailed ticket description
room: i16Room number associated with the issue
status: StringCurrent ticket status (e.g., “open”, “in_progress”, “resolved”, “archived”)
date: DateTime<Utc>When the ticket was created (UTC timestamp)
user_id: i16ID of the user who created the ticket
user_first_name: StringFirst name of the ticket creator (denormalized from User)
user_last_name: StringLast name of the ticket creator (denormalized from User)
Trait Implementations§
Source§impl Debug for TicketResponse
impl Debug for TicketResponse
Source§impl<'de> Deserialize<'de> for TicketResponse
impl<'de> Deserialize<'de> for TicketResponse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for TicketResponse
impl PartialEq for TicketResponse
Source§impl Serialize for TicketResponse
impl Serialize for TicketResponse
impl StructuralPartialEq for TicketResponse
Auto Trait Implementations§
impl Freeze for TicketResponse
impl RefUnwindSafe for TicketResponse
impl Send for TicketResponse
impl Sync for TicketResponse
impl Unpin for TicketResponse
impl UnwindSafe for TicketResponse
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more