From b48340156aef8d25f9dba31da3515ec91ad57e7d Mon Sep 17 00:00:00 2001 From: gazebo Date: Mon, 2 Jul 2018 14:18:29 +0800 Subject: [PATCH] - change BlackClient.CreatedAt and UpdatedAt to nullable. --- business/models/models.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/business/models/models.go b/business/models/models.go index 030f1b3ce..91adbb296 100644 --- a/business/models/models.go +++ b/business/models/models.go @@ -7,6 +7,8 @@ import ( type BlackClient struct { ID int `orm:"column(id)"` Mobile string `orm:"size(16);unique"` - CreatedAt time.Time `orm:"auto_now_add;type(datetime)` - UpdatedAt time.Time `orm:"auto_now;type(datetime)` + Name string `orm:"size(8)"` + Note string `orm:"size(256)"` + CreatedAt time.Time `orm:"auto_now_add;type(datetime);null"` + UpdatedAt time.Time `orm:"auto_now;type(datetime);null"` }