Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions model.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@ import (

// deprecated
type Model struct {
ID uuid.UUID `gorm:"type:uuid;default:uuid_generate_v4();primary_key"`
ID uuid.UUID `gorm:"type:uuid;primary_key"`
CreatedAt *time.Time `gorm:"not null;default:now()"`
UpdatedAt *time.Time `gorm:"not null;default:now()"`
DeletedAt gorm.DeletedAt `gorm:"index"`
}

// deprecated
type ModelSnakeCase struct {
ID uuid.UUID `gorm:"type:uuid;default:uuid_generate_v4();primary_key" json:"id"`
ID uuid.UUID `gorm:"type:uuid;primary_key" json:"id"`
CreatedAt *time.Time `gorm:"not null;default:now()" json:"created_at,omitempty"`
UpdatedAt *time.Time `gorm:"not null;default:now()" json:"updated_at,omitempty"`
DeletedAt gorm.DeletedAt `gorm:"index" json:"deleted_at,omitempty"`
}

// deprecated
type ModelCamelCase struct {
ID uuid.UUID `gorm:"type:uuid;default:uuid_generate_v4();primary_key" json:"id"`
ID uuid.UUID `gorm:"type:uuid;primary_key" json:"id"`
CreatedAt *time.Time `gorm:"not null;default:now()" json:"createdAt,omitempty"`
UpdatedAt *time.Time `gorm:"not null;default:now()" json:"updatedAt,omitempty"`
DeletedAt gorm.DeletedAt `gorm:"index" json:"deletedAt,omitempty"`
Expand Down
Loading