Skip to content

time.Time型のフィールドがある構造体をコード生成するとtime.TimeDBとなってしまう #52

@PyYoshi

Description

@PyYoshi
// +db:"users"
type User struct {
	UserID     int    `db:"user_id"`
	Name       string `db:"name"`
	Avatar     string `db:"avatar"`
	Prof       Profile
	ProfDummy  Profile `db:"-"`
	NumFriends int     `db:"-"`
	CreatedAt time.Time `db:"created_at"`
}

// UserDB User table
type UserDB struct {
	Table             stmt.Table
	TableAlias        stmt.TableAlias
	UserIDColumn      stmt.Column
	UserIDColumnAlias stmt.ColumnAlias
	NameColumn        stmt.Column
	NameColumnAlias   stmt.ColumnAlias
	AvatarColumn      stmt.Column
	AvatarColumnAlias stmt.ColumnAlias
	Prof              ProfileDB
	CreatedAt         time.TimeDB
}

になってしまっている

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions