domain_service.go 2.0 KB
package domain

type FileTableService interface {
	Preview(ctx *Context, fileId int, where Where) (interface{}, error)
	Edit()
	Flush(ctx *Context, fileId int, table *Table) (interface{}, error)
	DeleteFiles(ctx *Context, files ...*File) error
	GenerateTable(ctx *Context, fileId int, tableName string) (interface{}, error)
}

type TableService interface {
	Preview(ctx *Context, tableId int, where Where) (interface{}, error)
	CopyTable(ctx *Context, tableId int, tableName string) (interface{}, error)
	DeleteTables(ctx *Context, tables ...*Table) error
	AppendData(ctx *Context, fileId int, tableId int, mappingFields []*MappingField) (interface{}, error)
	UpdateTableStruct(ctx *Context, tableId int, fields []*Field, name string) (interface{}, error)
	AddTableStruct(ctx *Context, parentTableId int, fields []*Field, name string) (interface{}, error)
}

type PreviewDataTableService interface {
	Preview(ctx *Context, fileId int, where Where) (interface{}, error)
	GetFileId() int
}

type EditDataTableService interface{}

type FlushDataTableService interface {
	Flush(ctx *Context, fileId int, table *Table) (interface{}, error)
}

type DeleteFileService interface {
	DeleteFiles(ctx *Context, files ...*File) error
}

type GenerateMainTableService interface {
	GenerateTable(ctx *Context, fileId int, tableName string) (interface{}, error)
}

type CopyDataTableService interface {
	CopyTable(ctx *Context, tableId int, tableName string) (interface{}, error)
}

type DeleteDataTableService interface {
	DeleteTable(ctx *Context, tableId int) (interface{}, error)
	DeleteTables(ctx *Context, tables ...*Table) error
}

type AppendDataToTableService interface {
	AppendData(ctx *Context, fileId int, tableId int, mappingFields []*MappingField) (interface{}, error)
}

/************************************/

type UpdateTableStructService interface {
	UpdateTableStruct(ctx *Context, tableId int, fields []*Field, name string) (interface{}, error)
}

type AddTableStructService interface {
	AddTableStruct(ctx *Context, parentTableId int, fields []*Field, name string) (interface{}, error)
}