MCPcopy
hub / github.com/go-gorm/gorm / SerializerPostgresStruct

Struct SerializerPostgresStruct

tests/serializer_test.go:31–43  ·  tests/serializer_test.go::SerializerPostgresStruct

Source from the content-addressed store, hash-verified

29}
30
31type SerializerPostgresStruct struct {
32 gorm.Model
33 Name []byte `gorm:"json"`
34 Roles Roles `gorm:"serializer:json"`
35 Roles2 *Roles `gorm:"serializer:json"`
36 Roles3 *Roles `gorm:"serializer:json;not null"`
37 Contracts map[string]interface{} `gorm:"serializer:json"`
38 JobInfo Job `gorm:"type:bytes;serializer:gob"`
39 CreatedTime int64 `gorm:"serializer:unixtime;type:timestamptz"` // store time in db, use int as field type
40 UpdatedTime *int64 `gorm:"serializer:unixtime;type:timestamptz"` // store time in db, use int as field type
41 CustomSerializerString string `gorm:"serializer:custom"`
42 EncryptedString EncryptedString
43}
44
45func (*SerializerPostgresStruct) TableName() string { return "serializer_structs" }
46

Callers 1

adaptorSerializerModelFunction · 0.85

Calls

no outgoing calls

Tested by 1

adaptorSerializerModelFunction · 0.68