@@ -262,21 +262,24 @@ func TestParseFieldWithPermission(t *testing.T) {
262
262
}
263
263
264
264
type (
265
- ID int64
266
- INT int
267
- INT8 int8
268
- INT16 int16
269
- INT32 int32
270
- INT64 int64
271
- UINT uint
272
- UINT8 uint8
273
- UINT16 uint16
274
- UINT32 uint32
275
- UINT64 uint64
276
- FLOAT32 float32
277
- FLOAT64 float64
278
- BOOL bool
279
- STRING string
265
+ ID int64
266
+ INT int
267
+ INT8 int8
268
+ INT16 int16
269
+ INT32 int32
270
+ INT64 int64
271
+ UINT uint
272
+ UINT8 uint8
273
+ UINT16 uint16
274
+ UINT32 uint32
275
+ UINT64 uint64
276
+ FLOAT32 float32
277
+ FLOAT64 float64
278
+ BOOL bool
279
+ STRING string
280
+ TIME time.Time
281
+ BYTES []byte
282
+
280
283
TypeAlias struct {
281
284
ID
282
285
INT `gorm:"column:fint"`
@@ -293,6 +296,8 @@ type (
293
296
FLOAT64 `gorm:"column:ffloat64"`
294
297
BOOL `gorm:"column:fbool"`
295
298
STRING `gorm:"column:fstring"`
299
+ TIME `gorm:"column:ftime"`
300
+ BYTES `gorm:"column:fbytes"`
296
301
}
297
302
)
298
303
@@ -318,6 +323,8 @@ func TestTypeAliasField(t *testing.T) {
318
323
{Name : "FLOAT64" , DBName : "ffloat64" , BindNames : []string {"FLOAT64" }, DataType : schema .Float , Creatable : true , Updatable : true , Readable : true , Size : 64 , Tag : `gorm:"column:ffloat64"` },
319
324
{Name : "BOOL" , DBName : "fbool" , BindNames : []string {"BOOL" }, DataType : schema .Bool , Creatable : true , Updatable : true , Readable : true , Tag : `gorm:"column:fbool"` },
320
325
{Name : "STRING" , DBName : "fstring" , BindNames : []string {"STRING" }, DataType : schema .String , Creatable : true , Updatable : true , Readable : true , Tag : `gorm:"column:fstring"` },
326
+ {Name : "TIME" , DBName : "ftime" , BindNames : []string {"TIME" }, DataType : schema .Time , Creatable : true , Updatable : true , Readable : true , Tag : `gorm:"column:ftime"` },
327
+ {Name : "BYTES" , DBName : "fbytes" , BindNames : []string {"BYTES" }, DataType : schema .Bytes , Creatable : true , Updatable : true , Readable : true , Tag : `gorm:"column:fbytes"` },
321
328
}
322
329
323
330
for _ , f := range fields {
0 commit comments