Initial cloud-services repo - gateway service + pkg modules

This commit is contained in:
Chris Rai
2026-01-30 23:14:52 -05:00
commit fbb820d7b3
1037 changed files with 171318 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
package dbbasemodel
import "time"
type DBModelBase struct {
CreatedAt *time.Time `pg:"default:now()" json:"created,omitempty" swaggerignore:"true"`
UpdatedAt *time.Time `pg:"default:now()" json:"updated,omitempty" swaggerignore:"true"`
}
func (d *DBModelBase) ClearCreatedAt() {
d.CreatedAt = nil
}
func (d *DBModelBase) ClearDates() {
d.CreatedAt = nil
d.UpdatedAt = nil
}
// Keeping the Scrub name used in other locations so people are more likely to find this function
func (d *DBModelBase) Scrub(){
d.ClearDates()
}