Go语言之model模型
2021-10-01 03:14
标签:fun user auto mode model struct 字段 create 索引 type User struct { Id int pk:"auto" Name string Email string Client string orm:"size(32)" Server string orm:"size(64)" Code string orm:"size(8)" Msg string Data string orm:"type(text)" CreateTime time.Time orm:"type(date)" } // 多字段索引 func (u *User) TableIndex() [][]string { return [][]string{ []string{"Id", "Name"}, } } // 多字段唯一键 func (u *User) TableUnique() [][]string { return [][]string{ []string{"Name", "Email"}, } }Go语言之model模型标签:fun user auto mode model struct 字段 create 索引 原文地址:https://www.cnblogs.com/lz0925/p/11910025.html