pub(crate) struct Inquiry {
pub(crate) id: Uuid,
pub(crate) cognito_sub: Uuid,
pub(crate) email: String,
pub(crate) subject: String,
pub(crate) body: String,
pub(crate) created_at: DateTime<FixedOffset>,
}Expand description
お問い合わせの詳細情報
データベースの inquiries テーブルの1レコードに対応します。
GET /inquiries レスポンスの inquiries 配列要素として使用されます。
sea_orm::FromQueryResult により SeaORM のクエリ結果から直接マッピングできます。
Fields§
§id: Uuidお問い合わせの一意識別子(UUID v7)。タイムスタンプを含むため作成順でソート可能。
cognito_sub: UuidCognito ユーザーの一意識別子(UUID v4)。お問い合わせのオーナーを識別する。
email: Stringお問い合わせ送信者のメールアドレス。
subject: Stringお問い合わせの件名。
body: Stringお問い合わせの本文。
created_at: DateTime<FixedOffset>お問い合わせ作成日時(タイムゾーンオフセット付き)。UTC で保存される。
Trait Implementations§
Source§impl From<Model> for Inquiry
[inquiries::Model] から Inquiry への変換
impl From<Model> for Inquiry
[inquiries::Model] から Inquiry への変換
SeaORM のクエリ結果(inquiries::Model)を API レスポンス用の Inquiry 構造体に変換します。
全フィールドを直接マッピングします。
Source§impl FromQueryResult for Inquiry
impl FromQueryResult for Inquiry
Source§fn from_query_result(row: &QueryResult, pre: &str) -> Result<Self, DbErr>
fn from_query_result(row: &QueryResult, pre: &str) -> Result<Self, DbErr>
Instantiate a Model from a [QueryResult] Read more
Source§fn from_query_result_nullable(
row: &QueryResult,
pre: &str,
) -> Result<Self, TryGetError>
fn from_query_result_nullable( row: &QueryResult, pre: &str, ) -> Result<Self, TryGetError>
§fn from_query_result_optional(
res: &QueryResult,
pre: &str,
) -> Result<Option<Self>, DbErr>
fn from_query_result_optional( res: &QueryResult, pre: &str, ) -> Result<Option<Self>, DbErr>
Transform the error from instantiating a Model from a [QueryResult]
and converting it to an Option
§fn find_by_statement(stmt: Statement) -> SelectorRaw<SelectModel<Self>>
fn find_by_statement(stmt: Statement) -> SelectorRaw<SelectModel<Self>>
Auto Trait Implementations§
impl Freeze for Inquiry
impl RefUnwindSafe for Inquiry
impl Send for Inquiry
impl Sync for Inquiry
impl Unpin for Inquiry
impl UnsafeUnpin for Inquiry
impl UnwindSafe for Inquiry
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§impl<B> IntoFunctionResponse<B, Body> for Bwhere
B: Serialize,
impl<B> IntoFunctionResponse<B, Body> for Bwhere
B: Serialize,
§fn into_response(self) -> FunctionResponse<B, Body>
fn into_response(self) -> FunctionResponse<B, Body>
Convert the type into a FunctionResponse.
Creates a shared type from an unshared type.