type TablePass struct { ID int`gorm:"primary_key" json:"id"` Username string`gorm:"not null" json:"username"` Password string`gorm:"not null" json:"password"` Port string`gorm:"not null" json:"port"` Status bool`gorm:"not null" json:"status"`// 是否启用 Priority int`gorm:"not null" json:"priority"`// 优先级,数字越大越高 CreatedAt time.Time `gorm:"autoCreateTime" json:"created_at" ts_type:"string"` UpdatedAt time.Time `gorm:"autoUpdateTime" json:"updated_at" ts_type:"string"` }
然后执行自动绑定,发现没有任何错误,OK,问题顺利解决。
1 2 3 4 5 6
╭─hyhacct@hyhacctdeMacBook-Air ~/workspace/PeachDRAC/PeachDRAC ‹main●› ╰─$ wails generate module ♥ If Wails is useful to you or your company, please consider sponsoring the project: https://github.com/sponsors/leaanthony ╭─hyhacct@hyhacctdeMacBook-Air ~/workspace/PeachDRAC/PeachDRAC ‹main●› ╰─$