feat: update model
This commit is contained in:
@@ -20,4 +20,5 @@ type ChannelMessages struct {
|
||||
PublishedAt time.Time
|
||||
CreatedAt time.Time
|
||||
GroupID int64
|
||||
Published bool
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ type channelMessagesTable struct {
|
||||
PublishedAt postgres.ColumnTimestampz
|
||||
CreatedAt postgres.ColumnTimestampz
|
||||
GroupID postgres.ColumnInteger
|
||||
Published postgres.ColumnBool
|
||||
|
||||
AllColumns postgres.ColumnList
|
||||
MutableColumns postgres.ColumnList
|
||||
@@ -73,8 +74,9 @@ func newChannelMessagesTableImpl(schemaName, tableName, alias string) channelMes
|
||||
PublishedAtColumn = postgres.TimestampzColumn("published_at")
|
||||
CreatedAtColumn = postgres.TimestampzColumn("created_at")
|
||||
GroupIDColumn = postgres.IntegerColumn("group_id")
|
||||
allColumns = postgres.ColumnList{IDColumn, ChannelIDColumn, UUIDColumn, ContentColumn, MediaColumn, PublishedAtColumn, CreatedAtColumn, GroupIDColumn}
|
||||
mutableColumns = postgres.ColumnList{ChannelIDColumn, UUIDColumn, ContentColumn, MediaColumn, PublishedAtColumn, CreatedAtColumn, GroupIDColumn}
|
||||
PublishedColumn = postgres.BoolColumn("published")
|
||||
allColumns = postgres.ColumnList{IDColumn, ChannelIDColumn, UUIDColumn, ContentColumn, MediaColumn, PublishedAtColumn, CreatedAtColumn, GroupIDColumn, PublishedColumn}
|
||||
mutableColumns = postgres.ColumnList{ChannelIDColumn, UUIDColumn, ContentColumn, MediaColumn, PublishedAtColumn, CreatedAtColumn, GroupIDColumn, PublishedColumn}
|
||||
)
|
||||
|
||||
return channelMessagesTable{
|
||||
@@ -89,6 +91,7 @@ func newChannelMessagesTableImpl(schemaName, tableName, alias string) channelMes
|
||||
PublishedAt: PublishedAtColumn,
|
||||
CreatedAt: CreatedAtColumn,
|
||||
GroupID: GroupIDColumn,
|
||||
Published: PublishedColumn,
|
||||
|
||||
AllColumns: allColumns,
|
||||
MutableColumns: mutableColumns,
|
||||
|
||||
Reference in New Issue
Block a user