diff --git a/backend/app/model/medias.funcs.gen.go b/backend/app/model/medias.funcs.gen.go index beefff3..bb7041b 100644 --- a/backend/app/model/medias.funcs.gen.go +++ b/backend/app/model/medias.funcs.gen.go @@ -119,8 +119,7 @@ func (m *Medias) GetByID(ctx context.Context, id int64, conds ...Cond) (*Medias, func (m *Medias) Count(ctx context.Context, conds ...Cond) (int64, error) { cond := CondTrue(conds...) - tbl := tblMedias - stmt := tbl.SELECT(COUNT(tbl.ID).AS("count")).WHERE(cond) + stmt := tblMedias.SELECT(COUNT(tblMedias.ID).AS("count")).WHERE(cond) m.log().Infof("sql: %s", stmt.DebugSql()) var count struct { diff --git a/backend/app/model/orders.funcs.gen.go b/backend/app/model/orders.funcs.gen.go index 1e5cea0..89f14ca 100644 --- a/backend/app/model/orders.funcs.gen.go +++ b/backend/app/model/orders.funcs.gen.go @@ -26,7 +26,7 @@ func (m *Orders) Create(ctx context.Context) error { m.CreatedAt = time.Now() m.UpdatedAt = time.Now() - stmt := tblMedias.INSERT(tblOrders.MutableColumns).MODEL(m).RETURNING(tblMedias.AllColumns) + stmt := tblOrders.INSERT(tblOrders.MutableColumns).MODEL(m).RETURNING(tblOrders.AllColumns) m.log().WithField("func", "Create").Info(stmt.DebugSql()) if err := stmt.QueryContext(ctx, db, m); err != nil { @@ -122,8 +122,7 @@ func (m *Orders) GetByID(ctx context.Context, id int64, conds ...Cond) (*Orders, func (m *Orders) Count(ctx context.Context, conds ...Cond) (int64, error) { cond := CondTrue(conds...) - tbl := tblOrders - stmt := tbl.SELECT(COUNT(tbl.ID).AS("count")).WHERE(cond) + stmt := tblOrders.SELECT(COUNT(tblOrders.ID).AS("count")).WHERE(cond) m.log().Infof("sql: %s", stmt.DebugSql()) var count struct { diff --git a/backend/app/model/posts.funcs.gen.go b/backend/app/model/posts.funcs.gen.go index 1939e31..598bb00 100644 --- a/backend/app/model/posts.funcs.gen.go +++ b/backend/app/model/posts.funcs.gen.go @@ -37,7 +37,7 @@ func (m *Posts) Create(ctx context.Context) error { m.CreatedAt = time.Now() m.UpdatedAt = time.Now() - stmt := tblMedias.INSERT(tblPosts.MutableColumns).MODEL(m).RETURNING(tblMedias.AllColumns) + stmt := tblPosts.INSERT(tblPosts.MutableColumns).MODEL(m).RETURNING(tblPosts.AllColumns) m.log().WithField("func", "Create").Info(stmt.DebugSql()) if err := stmt.QueryContext(ctx, db, m); err != nil { @@ -163,8 +163,7 @@ func (m *Posts) GetByID(ctx context.Context, id int64, conds ...Cond) (*Posts, e func (m *Posts) Count(ctx context.Context, conds ...Cond) (int64, error) { cond := CondTrue(conds...) - tbl := tblPosts - stmt := tbl.SELECT(COUNT(tbl.ID).AS("count")).WHERE(cond) + stmt := tblPosts.SELECT(COUNT(tblPosts.ID).AS("count")).WHERE(cond) m.log().Infof("sql: %s", stmt.DebugSql()) var count struct { diff --git a/backend/app/model/user_posts.funcs.gen.go b/backend/app/model/user_posts.funcs.gen.go index 54146c4..d740fec 100644 --- a/backend/app/model/user_posts.funcs.gen.go +++ b/backend/app/model/user_posts.funcs.gen.go @@ -26,7 +26,7 @@ func (m *UserPosts) Create(ctx context.Context) error { m.CreatedAt = time.Now() m.UpdatedAt = time.Now() - stmt := tblMedias.INSERT(tblUserPosts.MutableColumns).MODEL(m).RETURNING(tblMedias.AllColumns) + stmt := tblUserPosts.INSERT(tblUserPosts.MutableColumns).MODEL(m).RETURNING(tblUserPosts.AllColumns) m.log().WithField("func", "Create").Info(stmt.DebugSql()) if err := stmt.QueryContext(ctx, db, m); err != nil { @@ -122,8 +122,7 @@ func (m *UserPosts) GetByID(ctx context.Context, id int64, conds ...Cond) (*User func (m *UserPosts) Count(ctx context.Context, conds ...Cond) (int64, error) { cond := CondTrue(conds...) - tbl := tblUserPosts - stmt := tbl.SELECT(COUNT(tbl.ID).AS("count")).WHERE(cond) + stmt := tblUserPosts.SELECT(COUNT(tblUserPosts.ID).AS("count")).WHERE(cond) m.log().Infof("sql: %s", stmt.DebugSql()) var count struct { diff --git a/backend/app/model/users.funcs.gen.go b/backend/app/model/users.funcs.gen.go index 1a51871..1892a9b 100644 --- a/backend/app/model/users.funcs.gen.go +++ b/backend/app/model/users.funcs.gen.go @@ -37,7 +37,7 @@ func (m *Users) Create(ctx context.Context) error { m.CreatedAt = time.Now() m.UpdatedAt = time.Now() - stmt := tblMedias.INSERT(tblUsers.MutableColumns).MODEL(m).RETURNING(tblMedias.AllColumns) + stmt := tblUsers.INSERT(tblUsers.MutableColumns).MODEL(m).RETURNING(tblUsers.AllColumns) m.log().WithField("func", "Create").Info(stmt.DebugSql()) if err := stmt.QueryContext(ctx, db, m); err != nil { @@ -163,8 +163,7 @@ func (m *Users) GetByID(ctx context.Context, id int64, conds ...Cond) (*Users, e func (m *Users) Count(ctx context.Context, conds ...Cond) (int64, error) { cond := CondTrue(conds...) - tbl := tblUsers - stmt := tbl.SELECT(COUNT(tbl.ID).AS("count")).WHERE(cond) + stmt := tblUsers.SELECT(COUNT(tblUsers.ID).AS("count")).WHERE(cond) m.log().Infof("sql: %s", stmt.DebugSql()) var count struct {