Planning the Audit Log Functionality
In this white board session we plan out the basic functionality needed for the audit log feature.
Guide Tasks
  • Read Tutorial
  • Watch Guide Video
Video locked
This video is viewable to users with a Bottega Bootcamp license

In this guide, we are going to plan the audit log functionality.

Essentially, the goal of an audit log is to keep track if an employee had logged overtime or not. Remember, these are salaried employees, so logging overtime may not be the norm. This means, not all employees would log overtime every week.

Based on this goal, our dependency will be that it needs to be connected to a user.

That's probably the only requirement we need right away because I don't think it needs to be associated with posts at this time.

So, the attributes that we'll use include are going to be:

  • status with the type of integer. We are going to use only two options, namely, pending and complete.
  • start_date with the date data type. Since we need our audit log to be weekly, the default value should be the previous Monday. Based on my conversations with the client, most overtime will occur over the weekends, so it makes sense to send the notification on Sunday evening, and have the default value as the previous week.
  • date_verified with the date data type. This will be the date when the user logs in and confirms if they had overtime. This will be nil to start with.

This should give us what we need to get started. Let's start implementing it in the next guide.