probo/models/meta.go
2023-12-05 22:11:08 +01:00

33 lines
583 B
Go

package models
import "time"
type Meta struct {
ID string `json:"id" yaml:"id" gorm:"primaryKey"`
CreatedAt time.Time `json:"created_at" yaml:"created_at"`
UpdatedAt time.Time `json:"updated_at" yaml:"updated_at"`
}
func (m *Meta) GetID() string {
return m.ID
}
func (m *Meta) SetID(id string) {
m.ID = id
}
func (m *Meta) SetCreatedAt(t time.Time) {
m.CreatedAt = t
}
func (m *Meta) SetUpdatedAt(t time.Time) {
m.UpdatedAt = t
}
func (m *Meta) GetCreatedAt() time.Time {
return m.CreatedAt
}
func (m *Meta) GetUpdatedAt() time.Time {
return m.UpdatedAt
}