mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-26 13:43:33 -06:00
[chore] Add interaction policy gtsmodels (#3075)
* [chore] introduce interaction policy gts models * update migration a smidge * fix copy paste typo * update migration * use int for InteractionType
This commit is contained in:
parent
8f8093aea4
commit
5bc567196b
46 changed files with 1318 additions and 531 deletions
|
|
@ -27,9 +27,12 @@ type StatusFave interface {
|
|||
// GetStatusFaveByAccountID gets one status fave created by the given accountID, targeting the given statusID.
|
||||
GetStatusFave(ctx context.Context, accountID string, statusID string) (*gtsmodel.StatusFave, error)
|
||||
|
||||
// GetStatusFave returns one status fave with the given id.
|
||||
// GetStatusFaveByID returns one status fave with the given id.
|
||||
GetStatusFaveByID(ctx context.Context, id string) (*gtsmodel.StatusFave, error)
|
||||
|
||||
// GetStatusFaveByURI returns one status fave with the given uri.
|
||||
GetStatusFaveByURI(ctx context.Context, uri string) (*gtsmodel.StatusFave, error)
|
||||
|
||||
// GetStatusFaves returns a slice of faves/likes of the status with given ID.
|
||||
// This slice will be unfiltered, not taking account of blocks and whatnot, so filter it before serving it back to a user.
|
||||
GetStatusFaves(ctx context.Context, statusID string) ([]*gtsmodel.StatusFave, error)
|
||||
|
|
@ -40,6 +43,9 @@ type StatusFave interface {
|
|||
// PutStatusFave inserts the given statusFave into the database.
|
||||
PutStatusFave(ctx context.Context, statusFave *gtsmodel.StatusFave) error
|
||||
|
||||
// UpdateStatusFave updates one statusFave in the database.
|
||||
UpdateStatusFave(ctx context.Context, statusFave *gtsmodel.StatusFave, columns ...string) error
|
||||
|
||||
// DeleteStatusFave deletes one status fave with the given id.
|
||||
DeleteStatusFaveByID(ctx context.Context, id string) error
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue