dataform

package
v0.8.32 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 31, 2024 License: MIT Imports: 28 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckFileExist

func CheckFileExist(filepath string, fileName string, fileType string, ext string, i int) string

func CheckUnique

func CheckUnique(c *fiber.Ctx) error

func Clear

func Clear(v interface{})

func Edit

func Edit(c *fiber.Ctx, dataform Dataform, id string) error

func Exec

func Exec(c *fiber.Ctx, schemaId string, action string, id string, GetMODEL func(schemaId string) Dataform) error

func GetData

func GetData(c *fiber.Ctx, action string, id string, dataform Dataform) (*map[string]interface{}, error)

func GetInt

func GetInt(value interface{}) int

func GetTableData

func GetTableData(query string, table string, where_value string, order_value string) []map[string]interface{}

func IsInt

func IsInt(s string) bool

func Options

func Options(c *fiber.Ctx) error

func OptionsData

func OptionsData(relation Ralation_, c *fiber.Ctx) []map[string]interface{}

func SetCondition

func SetCondition(condition string, c *fiber.Ctx, VBSchema lbModel.VBSchema) error

func SetConditionOracle

func SetConditionOracle(condition string, c *fiber.Ctx, VBSchema lbModel.VBSchemaOracle) error

func Store

func Store(c *fiber.Ctx, dataform Dataform, action string, id string) error

func Upload

func Upload(c *fiber.Ctx) error

Types

type Dataform

type Dataform struct {
	Name               string
	Identity           string
	Table              string
	Model              interface{}
	FieldTypes         map[string]string
	Formulas           []models.Formula
	ValidationRules    map[string][]string
	ValidationMessages map[string][]string
	SubForms           []map[string]interface{}
	BeforeInsert       func(interface{})
	BeforeUpdate       func(interface{})
	AfterInsert        func(interface{})
	AfterUpdate        func(interface{})
	TriggerNameSpace   string
}

type FormOption

type FormOption struct {
	Label       interface{} `gorm:"column:label" json:"label"`
	Value       int         `gorm:"column:value;type:uuid" json:"value"`
	ParentValue interface{} `gorm:"column:parent_value" json:"parent_value"`
}

type RalationOption

type RalationOption struct {
	Fields             []string            `json:"Fields"`
	FilterWithUser     []map[string]string `json:"filterWithUser"`
	Filter             string              `json:"filter"`
	Key                string              `json:"key"`
	SortField          string              `json:"sortField"`
	SortOrder          string              `json:"sortOrder"`
	Table              string              `json:"table"`
	ParentFieldOfForm  string              `json:"parentFieldOfForm"`
	ParentFieldOfTable string              `json:"parentFieldOfTable"`
}

type Ralation_

type Ralation_ struct {
	Fields             []string            `json:"Fields"`
	FilterWithUser     []map[string]string `json:"filterWithUser"`
	Filter             string              `json:"filter"`
	Key                string              `json:"key"`
	Multiple           bool                `json:"multiple"`
	ParentFieldOfForm  string              `json:"parentFieldOfForm"`
	ParentFieldOfTable string              `json:"parentFieldOfTable"`
	SortField          string              `json:"sortField"`
	SortOrder          string              `json:"sortOrder"`
	Table              string              `json:"table"`
}

type Relations

type Relations struct {
	Relations map[string]Ralation_ `json:"relations"`
}

type UniquePost

type UniquePost struct {
	Table          string      `json:"table"`
	IdentityColumn string      `json:"identityColumn"`
	Identity       interface{} `json:"identity"`
	Field          string      `json:"field"`
	Val            interface{} `json:"val"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL