fleet/server/kolide/traits.go
Brendan Shaklovitz c6b285c56e
Remove soft-deletion pattern (#2327)
* Perform migration to delete any entries with `deleted` set, and
subsequently drop columns `deleted` and `deleted_at`.
* Remove `deleted` and `deleted_at` references.

Closes #2146
2020-10-22 10:51:26 -07:00

19 lines
436 B
Go

package kolide
import "time"
// Createable contains common timestamp fields indicating create time
type CreateTimestamp struct {
CreatedAt time.Time `json:"created_at" db:"created_at"`
}
// UpdateTimestamp contains a timestamp that is set whenever an entity is changed
type UpdateTimestamp struct {
UpdatedAt time.Time `json:"updated_at" db:"updated_at"`
}
type UpdateCreateTimestamps struct {
CreateTimestamp
UpdateTimestamp
}