From 1a9dd1d30dbb7aef9db42ff38fdefa46c810ac42 Mon Sep 17 00:00:00 2001 From: Rogee Date: Wed, 28 May 2025 19:40:50 +0800 Subject: [PATCH] feat: update --- backend/app/model/medias.funcs.gen.go | 8 +++++--- backend/app/model/orders.funcs.gen.go | 7 ++++--- backend/app/model/posts.funcs.gen.go | 7 ++++--- backend/app/model/user_posts.funcs.gen.go | 7 ++++--- backend/app/model/users.funcs.gen.go | 7 ++++--- 5 files changed, 21 insertions(+), 15 deletions(-) diff --git a/backend/app/model/medias.funcs.gen.go b/backend/app/model/medias.funcs.gen.go index bb7041b..cad3a9f 100644 --- a/backend/app/model/medias.funcs.gen.go +++ b/backend/app/model/medias.funcs.gen.go @@ -1,12 +1,14 @@ +// Code generated by the atomctl ; DO NOT EDIT. +// Code generated by the atomctl ; DO NOT EDIT. +// Code generated by the atomctl ; DO NOT EDIT. package model import ( "context" - "time" - . "github.com/go-jet/jet/v2/postgres" "github.com/samber/lo" log "github.com/sirupsen/logrus" + "time" ) // conds @@ -49,7 +51,6 @@ func (m *Medias) BatchCreate(ctx context.Context, models []*Medias) error { m.log().WithField("func", "BatchCreate").Infof("Medias items created successfully") return nil } - func (m *Medias) Delete(ctx context.Context) error { stmt := tblMedias.DELETE().WHERE(tblMedias.ID.EQ(Int(m.ID))) m.log().WithField("func", "Delete").Info(stmt.DebugSql()) @@ -82,6 +83,7 @@ func (m *Medias) BatchDelete(ctx context.Context, ids []int64) error { } func (m *Medias) Update(ctx context.Context) error { + stmt := tblMedias.UPDATE(tblMediasUpdateMutableColumns).MODEL(m).WHERE(tblMedias.ID.EQ(Int(m.ID))).RETURNING(tblMedias.AllColumns) m.log().WithField("func", "Update").Info(stmt.DebugSql()) diff --git a/backend/app/model/orders.funcs.gen.go b/backend/app/model/orders.funcs.gen.go index 89f14ca..7537396 100644 --- a/backend/app/model/orders.funcs.gen.go +++ b/backend/app/model/orders.funcs.gen.go @@ -1,12 +1,14 @@ +// Code generated by the atomctl ; DO NOT EDIT. +// Code generated by the atomctl ; DO NOT EDIT. +// Code generated by the atomctl ; DO NOT EDIT. package model import ( "context" - "time" - . "github.com/go-jet/jet/v2/postgres" "github.com/samber/lo" log "github.com/sirupsen/logrus" + "time" ) // conds @@ -50,7 +52,6 @@ func (m *Orders) BatchCreate(ctx context.Context, models []*Orders) error { m.log().WithField("func", "BatchCreate").Infof("Orders items created successfully") return nil } - func (m *Orders) Delete(ctx context.Context) error { stmt := tblOrders.DELETE().WHERE(tblOrders.ID.EQ(Int(m.ID))) m.log().WithField("func", "Delete").Info(stmt.DebugSql()) diff --git a/backend/app/model/posts.funcs.gen.go b/backend/app/model/posts.funcs.gen.go index 598bb00..fd6fad4 100644 --- a/backend/app/model/posts.funcs.gen.go +++ b/backend/app/model/posts.funcs.gen.go @@ -1,12 +1,14 @@ +// Code generated by the atomctl ; DO NOT EDIT. +// Code generated by the atomctl ; DO NOT EDIT. +// Code generated by the atomctl ; DO NOT EDIT. package model import ( "context" - "time" - . "github.com/go-jet/jet/v2/postgres" "github.com/samber/lo" log "github.com/sirupsen/logrus" + "time" ) // conds @@ -61,7 +63,6 @@ func (m *Posts) BatchCreate(ctx context.Context, models []*Posts) error { m.log().WithField("func", "BatchCreate").Infof("Posts items created successfully") return nil } - func (m *Posts) Delete(ctx context.Context) error { stmt := tblPosts.UPDATE().SET(tblPosts.DeletedAt.SET(TimestampT(time.Now()))).WHERE(tblPosts.ID.EQ(Int(m.ID))) m.log().WithField("func", "SoftDelete").Info(stmt.DebugSql()) diff --git a/backend/app/model/user_posts.funcs.gen.go b/backend/app/model/user_posts.funcs.gen.go index d740fec..a08e6b5 100644 --- a/backend/app/model/user_posts.funcs.gen.go +++ b/backend/app/model/user_posts.funcs.gen.go @@ -1,12 +1,14 @@ +// Code generated by the atomctl ; DO NOT EDIT. +// Code generated by the atomctl ; DO NOT EDIT. +// Code generated by the atomctl ; DO NOT EDIT. package model import ( "context" - "time" - . "github.com/go-jet/jet/v2/postgres" "github.com/samber/lo" log "github.com/sirupsen/logrus" + "time" ) // conds @@ -50,7 +52,6 @@ func (m *UserPosts) BatchCreate(ctx context.Context, models []*UserPosts) error m.log().WithField("func", "BatchCreate").Infof("UserPosts items created successfully") return nil } - func (m *UserPosts) Delete(ctx context.Context) error { stmt := tblUserPosts.DELETE().WHERE(tblUserPosts.ID.EQ(Int(m.ID))) m.log().WithField("func", "Delete").Info(stmt.DebugSql()) diff --git a/backend/app/model/users.funcs.gen.go b/backend/app/model/users.funcs.gen.go index 1892a9b..22bff65 100644 --- a/backend/app/model/users.funcs.gen.go +++ b/backend/app/model/users.funcs.gen.go @@ -1,12 +1,14 @@ +// Code generated by the atomctl ; DO NOT EDIT. +// Code generated by the atomctl ; DO NOT EDIT. +// Code generated by the atomctl ; DO NOT EDIT. package model import ( "context" - "time" - . "github.com/go-jet/jet/v2/postgres" "github.com/samber/lo" log "github.com/sirupsen/logrus" + "time" ) // conds @@ -61,7 +63,6 @@ func (m *Users) BatchCreate(ctx context.Context, models []*Users) error { m.log().WithField("func", "BatchCreate").Infof("Users items created successfully") return nil } - func (m *Users) Delete(ctx context.Context) error { stmt := tblUsers.UPDATE().SET(tblUsers.DeletedAt.SET(TimestampT(time.Now()))).WHERE(tblUsers.ID.EQ(Int(m.ID))) m.log().WithField("func", "SoftDelete").Info(stmt.DebugSql())