github.com/angryronald/go-kit@v0.0.0-20240505173814-ff2bd9c79dbf/generic/repository/sql/repositorytest/test.model.go (about) 1 package repositorytest 2 3 import ( 4 "time" 5 6 "github.com/google/uuid" 7 ) 8 9 // TestModel represents address object 10 type TestModel struct { 11 ID uuid.UUID `json:"id" gorm:"primaryKey,not null"` 12 Text string `json:"address" gorm:"not null"` 13 CreatedBy uuid.UUID `json:"created_by" gorm:"not null"` 14 CreatedAt time.Time `json:"created_at" gorm:"not null"` 15 UpdatedAt time.Time `json:"updated_at" gorm:"not null"` 16 UpdatedBy uuid.UUID `json:"updated_by" gorm:"not null"` 17 DeletedAt *time.Time `json:"deleted_at"` 18 DeletedBy *uuid.UUID `json:"deleted_by"` 19 } 20 21 // ImmutableTestModel represents address object 22 type ImmutableTestModel struct { 23 ID uuid.UUID `json:"id" gorm:"primaryKey,not null"` 24 Text string `json:"address" gorm:"not null"` 25 CreatedBy uuid.UUID `json:"created_by" gorm:"not null"` 26 CreatedAt time.Time `json:"created_at" gorm:"not null"` 27 }