user_event_flow_serivce.go 350 B

12345678910111213141516
  1. package user
  2. import "eta/eta_mini_ht_api/models/user"
  3. func UserLoginFlow(userId int) (err error) {
  4. return user.InsertEventFlow(user.UserEventFlow{
  5. UserID: userId,
  6. EventType: user.Login,
  7. })
  8. }
  9. func UserLogoutFlow(userId int) (err error) {
  10. return user.InsertEventFlow(user.UserEventFlow{
  11. UserID: userId,
  12. EventType: user.Logout,
  13. })
  14. }