Skip to main content

Inquiry

Struct Inquiry 

Source
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: Uuid

Cognito ユーザーの一意識別子(UUID v4)。お問い合わせのオーナーを識別する。

§email: String

お問い合わせ送信者のメールアドレス。

§subject: String

お問い合わせの件名。

§body: String

お問い合わせの本文。

§created_at: DateTime<FixedOffset>

お問い合わせ作成日時(タイムゾーンオフセット付き)。UTC で保存される。

Trait Implementations§

Source§

impl Debug for Inquiry

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<Model> for Inquiry

[inquiries::Model] から Inquiry への変換

SeaORM のクエリ結果(inquiries::Model)を API レスポンス用の Inquiry 構造体に変換します。 全フィールドを直接マッピングします。

Source§

fn from(model: Model) -> Self

Converts to this type from the input type.
Source§

impl FromQueryResult for Inquiry

Source§

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>

Transform the error from instantiating a Model from a [QueryResult] and converting it to an Option Read more
§

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>>

Source§

impl Serialize for Inquiry

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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 B
where B: Serialize,

§

fn into_response(self) -> FunctionResponse<B, Body>

Convert the type into a FunctionResponse.
§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,