// 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"

	"gorm.io/gorm"
)

const TableNameMessage = "messages"

// Message mapped from table <messages>
type Message struct {
	ID            int64          `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
	Flag          string         `gorm:"column:flag;not null" json:"flag"`
	PlatformID    int64          `gorm:"column:platform_id;not null" json:"platform_id"`
	PlatformMsgID string         `gorm:"column:platform_msg_id;not null" json:"platform_msg_id"`
	Topic         string         `gorm:"column:topic;not null" json:"topic"`
	Content       JSON           `gorm:"column:content" json:"content"`
	State         MessageState   `gorm:"column:state;not null" json:"state"`
	CreatedAt     time.Time      `gorm:"column:created_at;not null" json:"created_at"`
	UpdatedAt     time.Time      `gorm:"column:updated_at;not null" json:"updated_at"`
	DeletedAt     gorm.DeletedAt `gorm:"column:deleted_at" json:"deleted_at"`
}

// TableName Message's table name
func (*Message) TableName() string {
	return TableNameMessage
}
