2022-05-19 13:32:04 +03:00
|
|
|
package store
|
|
|
|
|
|
|
|
import (
|
2022-08-07 05:17:12 +03:00
|
|
|
"context"
|
2022-05-19 13:32:04 +03:00
|
|
|
)
|
|
|
|
|
2023-07-06 16:56:42 +03:00
|
|
|
type MemoOrganizer struct {
|
2023-08-04 16:55:07 +03:00
|
|
|
MemoID int32
|
|
|
|
UserID int32
|
2022-05-19 13:32:04 +03:00
|
|
|
Pinned bool
|
|
|
|
}
|
|
|
|
|
2023-07-06 16:56:42 +03:00
|
|
|
type FindMemoOrganizer struct {
|
2023-08-04 16:55:07 +03:00
|
|
|
MemoID int32
|
|
|
|
UserID int32
|
2022-05-19 13:32:04 +03:00
|
|
|
}
|
|
|
|
|
2023-07-06 16:56:42 +03:00
|
|
|
type DeleteMemoOrganizer struct {
|
2023-08-04 16:55:07 +03:00
|
|
|
MemoID *int32
|
|
|
|
UserID *int32
|
2022-05-19 13:32:04 +03:00
|
|
|
}
|
|
|
|
|
2023-07-06 17:53:38 +03:00
|
|
|
func (s *Store) UpsertMemoOrganizer(ctx context.Context, upsert *MemoOrganizer) (*MemoOrganizer, error) {
|
2023-09-27 03:54:50 +03:00
|
|
|
return s.driver.UpsertMemoOrganizer(ctx, upsert)
|
2022-05-19 13:32:04 +03:00
|
|
|
}
|
|
|
|
|
2023-07-06 17:53:38 +03:00
|
|
|
func (s *Store) GetMemoOrganizer(ctx context.Context, find *FindMemoOrganizer) (*MemoOrganizer, error) {
|
2023-09-27 03:54:50 +03:00
|
|
|
return s.driver.GetMemoOrganizer(ctx, find)
|
2022-05-19 13:32:04 +03:00
|
|
|
}
|
|
|
|
|
2023-07-06 17:53:38 +03:00
|
|
|
func (s *Store) DeleteMemoOrganizer(ctx context.Context, delete *DeleteMemoOrganizer) error {
|
2023-09-27 03:54:50 +03:00
|
|
|
return s.driver.DeleteMemoOrganizer(ctx, delete)
|
2022-11-06 07:21:58 +03:00
|
|
|
}
|