22 lines
895 B
Go
22 lines
895 B
Go
|
|
package entity
|
||
|
|
|
||
|
|
import "time"
|
||
|
|
|
||
|
|
type Notifications struct {
|
||
|
|
ID uint64 `gorm:"primaryKey;autoIncrement;column:id" json:"id"`
|
||
|
|
|
||
|
|
SentTo int `gorm:"column:sent_to;not null;default:0" json:"sentTo"`
|
||
|
|
SendBy int `gorm:"column:send_by;not null;default:0" json:"sendBy"`
|
||
|
|
SendByName string `gorm:"column:send_by_name;type:varchar(150);not null;default:''" json:"sendByName"`
|
||
|
|
Message string `gorm:"column:message;type:text;not null;default:''" json:"message"`
|
||
|
|
|
||
|
|
IsRead bool `gorm:"column:is_read;not null;default:false" json:"isRead"`
|
||
|
|
IsActive bool `gorm:"column:is_active;not null;default:true" json:"isActive"`
|
||
|
|
|
||
|
|
CreatedAt time.Time `gorm:"column:created_at;autoCreateTime" json:"createdAt"`
|
||
|
|
UpdatedAt time.Time `gorm:"column:updated_at;autoUpdateTime" json:"updatedAt"`
|
||
|
|
}
|
||
|
|
|
||
|
|
func (Notifications) TableName() string {
|
||
|
|
return "notifications"
|
||
|
|
}
|