feat: send

This commit is contained in:
Rogee
2025-05-21 21:31:48 +08:00
parent 998941511f
commit 5798b01376

View File

@@ -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 {