Removed unused fields from ChannelMemberHistory table, introduced new model.ChannelMemberHistoryResult object that includes those fields that are selected from a join on other tables

This commit is contained in:
Jonathan Fritz
2018-02-12 16:14:52 -05:00
parent 62efb1df75
commit 7b2861de3a
6 changed files with 45 additions and 32 deletions

View File

@@ -0,0 +1,15 @@
// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
package model
type ChannelMemberHistoryResult struct {
ChannelId string
UserId string
JoinTime int64
LeaveTime *int64
// these two fields are never set in the database - when we SELECT, we join on Users to get them
UserEmail string `db:"Email"`
Username string
}

View File

@@ -8,8 +8,4 @@ type ChannelMemberHistory struct {
UserId string
JoinTime int64
LeaveTime *int64
// these two fields are never set in the database - when we SELECT, we join on Users to get them
UserEmail string `db:"Email"`
Username string
}