fix: module name

This commit is contained in:
2025-03-16 12:44:12 +07:00
parent 670906d926
commit c4a3e6fff9
6 changed files with 20 additions and 18 deletions

16
.idea/workspace.xml generated
View File

@@ -6,15 +6,13 @@
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="0f2c8145-9000-45fe-a871-9ff0914e0e13" name="Changes" comment=""> <list default="true" id="0f2c8145-9000-45fe-a871-9ff0914e0e13" name="Changes" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/go.mod" beforeDir="false" afterPath="$PROJECT_DIR$/go.mod" afterDir="false" /> <change beforePath="$PROJECT_DIR$/frontend/bindings/app/internal/services/excelmodule.ts" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/internal/addons/excel/export.go" beforeDir="false" afterPath="$PROJECT_DIR$/internal/addons/excel/export.go" afterDir="false" /> <change beforePath="$PROJECT_DIR$/frontend/bindings/app/internal/services/index.ts" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/internal/database/database.go" beforeDir="false" afterPath="$PROJECT_DIR$/internal/database/database.go" afterDir="false" /> <change beforePath="$PROJECT_DIR$/internal/dal/gen.go" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/internal/gen/gen.go" beforeDir="false" afterPath="$PROJECT_DIR$/internal/gen/gen.go" afterDir="false" /> <change beforePath="$PROJECT_DIR$/internal/dal/gen_test.go" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/internal/services/default_data.go" beforeDir="false" afterPath="$PROJECT_DIR$/internal/services/default_data.go" afterDir="false" /> <change beforePath="$PROJECT_DIR$/internal/dal/posts.gen.go" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/internal/services/migrator.go" beforeDir="false" afterPath="$PROJECT_DIR$/internal/services/migrator.go" afterDir="false" /> <change beforePath="$PROJECT_DIR$/internal/dal/posts.gen_test.go" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/internal/services/post.go" beforeDir="false" afterPath="$PROJECT_DIR$/internal/services/post.go" afterDir="false" /> <change beforePath="$PROJECT_DIR$/main.go" beforeDir="false" afterPath="$PROJECT_DIR$/main.go" afterDir="false" />
<change beforePath="$PROJECT_DIR$/internal/utils/search.go" beforeDir="false" afterPath="$PROJECT_DIR$/internal/utils/search.go" afterDir="false" />
<change beforePath="$PROJECT_DIR$/internal/utils/sorting.go" beforeDir="false" afterPath="$PROJECT_DIR$/internal/utils/sorting.go" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />

View File

@@ -6,11 +6,11 @@
import {Call as $Call, Create as $Create} from "@wailsio/runtime"; import {Call as $Call, Create as $Create} from "@wailsio/runtime";
export function ExportAllEntities(): Promise<void> & { cancel(): void } { export function ExportAllEntities(): Promise<void> & { cancel(): void } {
let $resultPromise = $Call.ByID(794946560) as any; let $resultPromise = $Call.ByID(4195777221) as any;
return $resultPromise; return $resultPromise;
} }
export function ImportAllEntities(): Promise<void> & { cancel(): void } { export function ImportAllEntities(): Promise<void> & { cancel(): void } {
let $resultPromise = $Call.ByID(2992267629) as any; let $resultPromise = $Call.ByID(2803141560) as any;
return $resultPromise; return $resultPromise;
} }

View File

@@ -5,9 +5,9 @@
package dal package dal
import ( import (
"app/internal/models"
"context" "context"
"git.gogacoder.ru/NTO/boilerplate/internal/models"
"gorm.io/gorm" "gorm.io/gorm"
"gorm.io/gorm/clause" "gorm.io/gorm/clause"
"gorm.io/gorm/schema" "gorm.io/gorm/schema"
@@ -28,6 +28,7 @@ func newPost(db *gorm.DB, opts ...gen.DOOption) post {
_post.ALL = field.NewAsterisk(tableName) _post.ALL = field.NewAsterisk(tableName)
_post.Id = field.NewUint(tableName, "id") _post.Id = field.NewUint(tableName, "id")
_post.Text = field.NewString(tableName, "text") _post.Text = field.NewString(tableName, "text")
_post.CreatedAt = field.NewUint(tableName, "created_at")
_post.fillFieldMap() _post.fillFieldMap()
@@ -37,9 +38,10 @@ func newPost(db *gorm.DB, opts ...gen.DOOption) post {
type post struct { type post struct {
postDo postDo
ALL field.Asterisk ALL field.Asterisk
Id field.Uint Id field.Uint
Text field.String Text field.String
CreatedAt field.Uint
fieldMap map[string]field.Expr fieldMap map[string]field.Expr
} }
@@ -58,6 +60,7 @@ func (p *post) updateTableName(table string) *post {
p.ALL = field.NewAsterisk(table) p.ALL = field.NewAsterisk(table)
p.Id = field.NewUint(table, "id") p.Id = field.NewUint(table, "id")
p.Text = field.NewString(table, "text") p.Text = field.NewString(table, "text")
p.CreatedAt = field.NewUint(table, "created_at")
p.fillFieldMap() p.fillFieldMap()
@@ -74,9 +77,10 @@ func (p *post) GetFieldByName(fieldName string) (field.OrderExpr, bool) {
} }
func (p *post) fillFieldMap() { func (p *post) fillFieldMap() {
p.fieldMap = make(map[string]field.Expr, 2) p.fieldMap = make(map[string]field.Expr, 3)
p.fieldMap["id"] = p.Id p.fieldMap["id"] = p.Id
p.fieldMap["text"] = p.Text p.fieldMap["text"] = p.Text
p.fieldMap["created_at"] = p.CreatedAt
} }
func (p post) clone(db *gorm.DB) post { func (p post) clone(db *gorm.DB) post {

View File

@@ -5,11 +5,11 @@
package dal package dal
import ( import (
"app/internal/models"
"context" "context"
"fmt" "fmt"
"testing" "testing"
"git.gogacoder.ru/NTO/boilerplate/internal/models"
"gorm.io/gen" "gorm.io/gen"
"gorm.io/gen/field" "gorm.io/gen/field"
"gorm.io/gorm/clause" "gorm.io/gorm/clause"

View File

@@ -1,8 +1,8 @@
package main package main
import ( import (
"app/internal/services"
"embed" "embed"
"git.gogacoder.ru/NTO/boilerplate/internal/services"
"github.com/wailsapp/wails/v3/pkg/application" "github.com/wailsapp/wails/v3/pkg/application"
"log" "log"
) )