File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -31,8 +31,8 @@ type Notification struct {
3131 Title string `orm:"size(2000)" json:"title,omitempty"`
3232 Message string `orm:"type(text)" json:"message,omitempty"`
3333 FromUser * User `orm:"index;rel(fk)" json:"from,omitempty"`
34- Level NotificationLevel `orm:"int " json:"level,omitempty"`
35- IsPublished bool `orm:"bool " json:"is_published"`
34+ Level NotificationLevel `orm:"default(0) " json:"level,omitempty"`
35+ IsPublished bool `orm:"default(false) " json:"is_published"`
3636 CreateTime * time.Time `orm:"auto_now_add;type(datetime)" json:"createTime,omitempty"`
3737 UpdateTime * time.Time `orm:"auto_now;type(datetime)" json:"updateTime,omitempty"`
3838}
Original file line number Diff line number Diff line change @@ -13,9 +13,9 @@ type notificationLogModel struct{}
1313
1414type NotificationLog struct {
1515 Id int64 `orm:"auto" json:"id,omitempty"`
16- UserId int64 `orm:"int " json:"user_id,omitempty"`
16+ UserId int64 `orm:"default(0) " json:"user_id,omitempty"`
1717 CreateTime * time.Time `orm:"auto_now_add;type(datetime)" json:"createTime,omitempty"`
18- IsReaded bool `orm:"bool " json:"is_readed"`
18+ IsReaded bool `orm:"default(false) " json:"is_readed"`
1919 Notification * Notification `orm:"index;column(notification_id);rel(fk)" json:"notification"`
2020}
2121
You can’t perform that action at this time.
0 commit comments