feat: send
This commit is contained in:
@@ -228,8 +228,11 @@ func (m *postsModel) SendTo(ctx context.Context, postId, userId int64) error {
|
||||
// add record to user_posts
|
||||
tbl := table.UserPosts
|
||||
stmt := tbl.INSERT(tbl.MutableColumns).MODEL(model.UserPosts{
|
||||
UserID: userId,
|
||||
PostID: postId,
|
||||
CreatedAt: time.Now(),
|
||||
UpdatedAt: time.Now(),
|
||||
UserID: userId,
|
||||
PostID: postId,
|
||||
Price: -1,
|
||||
})
|
||||
m.log.Infof("sql: %s", stmt.DebugSql())
|
||||
if _, err := stmt.ExecContext(ctx, db); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user