33 lines
1.5 KiB
Go
33 lines
1.5 KiB
Go
// Code generated by gorm.io/gen. DO NOT EDIT.
|
|
// Code generated by gorm.io/gen. DO NOT EDIT.
|
|
// Code generated by gorm.io/gen. DO NOT EDIT.
|
|
|
|
package model
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
const TableNameNotification = "notifications"
|
|
|
|
// Notification mapped from table <notifications>
|
|
type Notification struct {
|
|
ID string `gorm:"column:id;type:uuid;primaryKey" json:"id"`
|
|
UserID string `gorm:"column:user_id;type:uuid;not null;index:idx_notifications_user_id,priority:1" json:"user_id"`
|
|
Type string `gorm:"column:type;type:character varying(50);not null" json:"type"`
|
|
Title string `gorm:"column:title;type:text;not null" json:"title"`
|
|
Message string `gorm:"column:message;type:text;not null" json:"message"`
|
|
Metadata *string `gorm:"column:metadata;type:text" json:"metadata"`
|
|
ActionURL *string `gorm:"column:action_url;type:text" json:"action_url"`
|
|
ActionLabel *string `gorm:"column:action_label;type:text" json:"action_label"`
|
|
IsRead bool `gorm:"column:is_read;type:boolean;not null" json:"is_read"`
|
|
CreatedAt *time.Time `gorm:"column:created_at;type:timestamp with time zone" json:"created_at"`
|
|
UpdatedAt *time.Time `gorm:"column:updated_at;type:timestamp with time zone" json:"updated_at"`
|
|
Version *int64 `gorm:"column:version;type:bigint;not null;default:1;version" json:"-"`
|
|
}
|
|
|
|
// TableName Notification's table name
|
|
func (*Notification) TableName() string {
|
|
return TableNameNotification
|
|
}
|