feat: crud generation was added in pipeline

This commit is contained in:
2025-03-13 17:07:50 +07:00
parent 90dee12950
commit 490b02e007
3 changed files with 24 additions and 4 deletions

View File

@@ -1,6 +1,27 @@
version: '3' version: '3'
tasks: tasks:
go:gen:dal:
summary: Runs GORM Gen for crud generating
dir: internal/gen
sources:
- ../models/*.go
generates:
- ../dal/*.go
cmds:
- go run gen.go
go:gen:crudgen:
summary: Runs crudgen for crud generating
sources:
- internal/models/*.go
generates:
- internal/services/*.go
deps:
- go:gen:dal
cmds:
- crudgen -p internal
go:mod:tidy: go:mod:tidy:
summary: Runs `go mod tidy` summary: Runs `go mod tidy`
internal: true internal: true
@@ -40,6 +61,8 @@ tasks:
generate:bindings: generate:bindings:
summary: Generates bindings for the frontend summary: Generates bindings for the frontend
deps:
- go:gen:crudgen
sources: sources:
- "**/*.go" - "**/*.go"
- go.mod - go.mod

View File

@@ -7,8 +7,6 @@ import type { Scheme } from "../types/scheme.type";
import { PostType } from "../../bindings/app/internal/services"; import { PostType } from "../../bindings/app/internal/services";
import { ref } from "vue"; import { ref } from "vue";
import type { Validate } from "../types/validate.type"; import type { Validate } from "../types/validate.type";
import { ImportFromExcel } from "../../bindings/app/internal/services/posttypeservice.ts";
import { ExportToExcel } from "../../bindings/app/internal/services/postservice.ts";
const service = new Service(); const service = new Service();
@@ -21,7 +19,6 @@ const load = async () => {
onMounted(async () => { onMounted(async () => {
await load(); await load();
await ExportToExcel();
}); });
const scheme: Scheme<PostType> = reactive({ const scheme: Scheme<PostType> = reactive({