zhufuyi/sponge

Time.Now 数据库字段datetime

Closed this issue · 1 comments

Describe the bug
Time.Now 数据库字段datetime ,在dao结构体中gorm是指针,但是test文件里面是给的不是地址

To Reproduce
Steps to reproduce the behavior, if applicable:

  1. The code is

  2. The error is

    
    

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Environments (please complete the following information):

  • OS: [e.g. Linux]
  • sponge version [e.g. 1.1.1]

More description
Add any other context about the problem here.

用来生成代码的表可能没有created_at和updated_at列,下个sponge版本生成dao test代码会把赋值给CreatedAt和UpdatedAt这两行代码将会注释掉。