add tg repo and some methods

This commit is contained in:
Pavel 2024-06-27 22:44:40 +03:00
parent 1fd7fa2d2d
commit f997b952c3

@ -30,6 +30,7 @@ func (r *TgRepo) CreateTgAccount(ctx context.Context, data model.TgAccount) (int
Apihash: data.ApiHash,
Phonenumber: data.PhoneNumber,
Status: data.Status,
Password: data.Password,
})
if err != nil {
return 0, err
@ -52,6 +53,7 @@ func (r *TgRepo) GetAllTgAccounts(ctx context.Context) ([]model.TgAccount, error
Status: row.Status.(model.TgAccountStatus),
Deleted: row.Deleted,
CreatedAt: row.Createdat,
Password: row.Password,
})
}