pub struct EvaluationRepository { /* private fields */ }Expand description
评价仓储
Implementations§
Source§impl EvaluationRepository
impl EvaluationRepository
Sourcepub async fn insert(&self, eval: &Evaluation) -> ApiResult<i64>
pub async fn insert(&self, eval: &Evaluation) -> ApiResult<i64>
新增评价
Sourcepub async fn select_by_filter(
&self,
member_id: Option<i32>,
evaluator_id: Option<i32>,
start_time: Option<DateTime<Utc>>,
end_time: Option<DateTime<Utc>>,
) -> ApiResult<Vec<Evaluation>>
pub async fn select_by_filter( &self, member_id: Option<i32>, evaluator_id: Option<i32>, start_time: Option<DateTime<Utc>>, end_time: Option<DateTime<Utc>>, ) -> ApiResult<Vec<Evaluation>>
条件筛选评价列表
Sourcepub async fn update(&self, eval: &Evaluation) -> ApiResult<()>
pub async fn update(&self, eval: &Evaluation) -> ApiResult<()>
更新评价
Sourcepub async fn delete_by_id(&self, id: i64) -> ApiResult<()>
pub async fn delete_by_id(&self, id: i64) -> ApiResult<()>
按 ID 删除评价
Auto Trait Implementations§
impl Freeze for EvaluationRepository
impl !RefUnwindSafe for EvaluationRepository
impl Send for EvaluationRepository
impl Sync for EvaluationRepository
impl Unpin for EvaluationRepository
impl UnsafeUnpin for EvaluationRepository
impl !UnwindSafe for EvaluationRepository
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> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request