mirror of
https://github.com/FJurmanovic/wallet-go-api.git
synced 2026-02-06 06:08:16 +00:00
fixed code documentation
This commit is contained in:
@@ -12,7 +12,16 @@ type SubscriptionTypeService struct {
|
||||
Db *pg.DB
|
||||
}
|
||||
|
||||
// Inserts new row to subscription type table.
|
||||
/*
|
||||
New
|
||||
|
||||
Inserts new row to subscription type table.
|
||||
Args:
|
||||
context.Context: Application context
|
||||
*models.NewSubscriptionTypeBody: Values to create new row
|
||||
Returns:
|
||||
*models.SubscriptionType: Created row from database.
|
||||
*/
|
||||
func (as *SubscriptionTypeService) New(ctx context.Context, body *models.NewSubscriptionTypeBody) *models.SubscriptionType {
|
||||
db := as.Db.WithContext(ctx)
|
||||
|
||||
@@ -27,7 +36,16 @@ func (as *SubscriptionTypeService) New(ctx context.Context, body *models.NewSubs
|
||||
return tm
|
||||
}
|
||||
|
||||
// Gets all rows from subscription type table.
|
||||
/*
|
||||
GetAll
|
||||
|
||||
Gets all rows from subscription type table.
|
||||
Args:
|
||||
context.Context: Application context
|
||||
string: Relations to embed
|
||||
Returns:
|
||||
*[]models.SubscriptionType: List of subscription type objects.
|
||||
*/
|
||||
func (as *SubscriptionTypeService) GetAll(ctx context.Context, embed string) *[]models.SubscriptionType {
|
||||
db := as.Db.WithContext(ctx)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user