dcu / gin-scaffold

Gin scaffold is CLI to generate scaffolds for the gin gonic framework.
63 stars 11 forks source link

Type checking #18

Open shinriyo opened 7 years ago

shinriyo commented 7 years ago

Database type supports int and string. Support them

memorize

bool

string

int  int8  int16  int32  int64
uint uint8 uint16 uint32 uint64 uintptr

byte

rune

float32 float64

complex64 complex128
:binary
:boolean
:date
:datetime
:decimal
:float
:integer
:primary_key
:string
:text
:time
:timestamp
shinriyo commented 7 years ago

Some types supported.

https://github.com/dcu/gin-scaffold/pull/21

shinriyo commented 7 years ago

@fix SetAttributes() method later like this.

var timeformat = "2006-01-02 15:04:05"
var tmp, _ = time.Parse(timeformat, value[0])
bar.hoge = tmp.Unix()