Skip to content

Commit

Permalink
Baseline - Estimator
Browse files Browse the repository at this point in the history
  • Loading branch information
mt1976 committed Nov 27, 2022
1 parent 5634a49 commit dabf9f3
Show file tree
Hide file tree
Showing 162 changed files with 1,068 additions and 443 deletions.
Binary file modified .DS_Store
Binary file not shown.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# templateBuilder
Uses go templates to build the config/code required to expose a db table through mwt-go-dev

[![Go](https://github.com/mt1976/templateBuilder/actions/workflows/go.yml/badge.svg)](https://github.com/mt1976/templateBuilder/actions/workflows/go.yml)
[![Run Gosec](https://github.com/mt1976/templatebuiler/actions/workflows/gosec.yml/badge.svg)](https://github.com/mt1976/templateBuilder/actions/workflows/gosec.yml)
[![Go](https://github.com/mt1976/mwt-goToolkit/actions/workflows/go.yml/badge.svg)](https://github.com/mt1976/mwt-goToolkit/actions/workflows/go.yml)
[![Run Gosec](https://github.com/mt1976/mwt-goToolkit/actions/workflows/gosec.yml/badge.svg)](https://github.com/mt1976/mwt-goToolkit/actions/workflows/gosec.yml)
[![Go Report Card](https://goreportcard.com/badge/github.com/mt1976/templateBuilder)](https://goreportcard.com/report/github.com/mt1976/templateBuilder)
3 changes: 2 additions & 1 deletion config/application.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ sessionlife=20m
data_in=/data/in
data_out=/data/out
# Delivert to is an absolute path
deliverto=/Volumes/External/matttownsend/Documents/GitHub/mwt-go-dev
deliverto=/Volumes/External/matttownsend/Documents/GitHub/ebEstimates
#deliverto=/Volumes/External/matttownsend/Documents/GitHub/mwt-go-dev
#deliverto=/Volumes/External/matttownsend/Documents/GitHub/purse
baseccy=GBP
2 changes: 1 addition & 1 deletion core/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strings"
"time"

logs "github.com/mt1976/templateBuilder/logs"
logs "github.com/mt1976/mwt-goToolkit/logs"
)

func extractCreate(in string) string {
Expand Down
4 changes: 2 additions & 2 deletions core/globals.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/alexedwards/scs/v2"
"github.com/jimlawless/cfg"
logs "github.com/mt1976/templateBuilder/logs"
logs "github.com/mt1976/mwt-goToolkit/logs"
)

var startTime = time.Now()
Expand Down Expand Up @@ -125,7 +125,7 @@ type sienaDBItem struct {
SYSUpdated string
}

//SienaBusinessDateItem is cheese
// SienaBusinessDateItem is cheese
type DateItem struct {
Today string
Internal time.Time
Expand Down
8 changes: 4 additions & 4 deletions core/support.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"time"

"github.com/leekchan/accounting"
logs "github.com/mt1976/templateBuilder/logs"
logs "github.com/mt1976/mwt-goToolkit/logs"
)

// Converts a siena style date, as a user readable date
Expand Down Expand Up @@ -150,7 +150,7 @@ func StrArrayToString(inArray []string) string {
return StrArrayToStringWithSep(inArray, "\n")
}

//StrArrayToStringWithSep converts a string array to a string using a given separator
// StrArrayToStringWithSep converts a string array to a string using a given separator
func StrArrayToStringWithSep(inArray []string, inSep string) string {

outString := ""
Expand All @@ -171,7 +171,7 @@ func QmBundleToString(inBundle []string) string {
return StrArrayToStringWithSep(inBundle, ";")
}

//ipRange - a structure that holds the start and end of a range of ip addresses
// ipRange - a structure that holds the start and end of a range of ip addresses
type ipRange struct {
start net.IP
end net.IP
Expand Down Expand Up @@ -478,7 +478,7 @@ func finAbbrToNumeric(str string) int {
return retNum
}

//Convert time.Time to string
// Convert time.Time to string
func TimeToString(t time.Time) string {
//fmt.Printf("t: %v\n", t)
return t.Format(DATEFORMATSIENA)
Expand Down
6 changes: 3 additions & 3 deletions das/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"log"
"strconv"

logs "github.com/mt1976/templateBuilder/logs"
"github.com/mt1976/templatebuiler/core"
"github.com/mt1976/mwt-goToolkit/core"
logs "github.com/mt1976/mwt-goToolkit/logs"
)

func Query(db *sql.DB, query string) ([]map[string]interface{}, int, error) {
Expand Down Expand Up @@ -66,7 +66,7 @@ func Poke(DB *sql.DB) error {
return errordb
}

//TODO: implement
// TODO: implement
func Execute(tsql string) {

logs.Database("Delete :", tsql)
Expand Down
Binary file modified data/.DS_Store
Binary file not shown.
Binary file added data/in/.DS_Store
Binary file not shown.
49 changes: 49 additions & 0 deletions data/in/confidence.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# What to generate
create_application=y
create_dao=y
create_datamodel=y
create_job=n
create_menu=y
create_html=y
create_adaptor=y
create_api=y
# actions - view/list are mandatory
can_edit=y
can_new=y
can_delete=y
can_softdelete=y
can_list=y
can_save=y
can_view=y
can_export=y
can_api=y
# use values can be db or list (db will attempt to connect to a db and extract data from the table to get the fields list)
use=db
# COmmon application properties
FriendlyName=Confidence
objectname=Confidence
endpointroot=
querystring=ConfidenceID
queryfield=ConfidenceID
objectglyph=fas fa-thumbs-up
projectrepo=github.com/mt1976/ebEstimates
propertiesOverride=
# If automatic generation of the application is true, then the following values are used
server=192.168.0.101\SQLEXPRESS
port=1433
user=srs
password=6LmYqp&*CBzo@s
database=EST
schema=dbo
sqlTableName=confidenceStore
sqlSearchID=confidenceID
#Does this File Have Enrichments - Include Additional Columns to the LIst & Record Views
hasEnrichments=y
isSpecial=n
HasStoreAdaptor=n
HasFetchAdaptor=n
hasaudit=y
package=confidence
provideslookup=y
LookUpID=Code
LookUpName=Name
2 changes: 2 additions & 0 deletions data/in/confidence.enri
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Type,Field,LookupObject,LookupKey,LookupReturns,IsInputtable,IsMandatory,DefaultValue,InputType,NoChange,HasApi,Mask,Hidden,Min,Max
Override,ConfidenceID,,,,true,,,,true,false,,true,,
6 changes: 3 additions & 3 deletions data/in/credentials.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ can_api=y
# use values can be db or list (db will attempt to connect to a db and extract data from the table to get the fields list)
use=db
# COmmon application properties
FriendlyName=Credential
FriendlyName=Credentials
objectname=Credentials
endpointroot=
querystring=Id
queryfield=Id
objectglyph=fas fa-key
textclass=text-danger
projectrepo=github.com/mt1976/mwt-go-dev
projectrepo=github.com/mt1976/ebEstimates
propertiesOverride=
# If automatic generation of the application is true, then the following values are used
server=mercury
server=192.168.0.101\SQLEXPRESS
port=1433
user=srs
password=6LmYqp&*CBzo@s
Expand Down
6 changes: 3 additions & 3 deletions data/in/credentialsAction.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ can_api=n
# use values can be db or list (db will attempt to connect to a db and extract data from the table to get the fields list)
use=list
# COmmon application properties
FriendlyName=Credentials Update
FriendlyName=Credentials Actions
objectname=CredentialsAction
endpointroot=
querystring=ID
queryfield=ID
objectglyph=fas fa-user-cog
projectrepo=github.com/mt1976/mwt-go-dev
projectrepo=github.com/mt1976/ebEstimates
propertiesOverride=
# If automatic generation of the application is true, then the following values are used
server=mercury
server=192.168.0.101\SQLEXPRESS
port=1433
user=srs
password=6LmYqp&*CBzo@s
Expand Down
49 changes: 49 additions & 0 deletions data/in/docType.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# What to generate
create_application=y
create_dao=y
create_datamodel=y
create_job=n
create_menu=y
create_html=y
create_adaptor=y
create_api=y
# actions - view/list are mandatory
can_edit=y
can_new=y
can_delete=y
can_softdelete=y
can_list=y
can_save=y
can_view=y
can_export=y
can_api=y
# use values can be db or list (db will attempt to connect to a db and extract data from the table to get the fields list)
use=db
# COmmon application properties
FriendlyName=Document Types
objectname=DocType
endpointroot=
querystring=DocTypeID
queryfield=DocTypeID
objectglyph=fas fa-file-alt
projectrepo=github.com/mt1976/ebEstimates
propertiesOverride=
# If automatic generation of the application is true, then the following values are used
server=192.168.0.101\SQLEXPRESS
port=1433
user=srs
password=6LmYqp&*CBzo@s
database=EST
schema=dbo
sqlTableName=docTypeStore
sqlSearchID=docTypeID
#Does this File Have Enrichments - Include Additional Columns to the LIst & Record Views
hasEnrichments=y
isSpecial=n
HasStoreAdaptor=n
HasFetchAdaptor=n
hasaudit=y
package=docType
provideslookup=y
LookUpID=Code
LookUpName=Name
2 changes: 2 additions & 0 deletions data/in/docType.enri
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Type,Field,LookupObject,LookupKey,LookupReturns,IsInputtable,IsMandatory,DefaultValue,InputType,NoChange,HasApi,Mask,Hidden,Min,Max
Override,DocTypeID,,,,true,,,,true,false,,true,,
49 changes: 49 additions & 0 deletions data/in/estimationSession.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# What to generate
create_application=y
create_dao=y
create_datamodel=y
create_job=n
create_menu=y
create_html=y
create_adaptor=y
create_api=y
# actions - view/list are mandatory
can_edit=y
can_new=y
can_delete=y
can_softdelete=y
can_list=y
can_save=y
can_view=y
can_export=y
can_api=y
# use values can be db or list (db will attempt to connect to a db and extract data from the table to get the fields list)
use=db
# COmmon application properties
FriendlyName=Estimation Session
objectname=EstimationSession
endpointroot=
querystring=EstimationSessionID
queryfield=EstimationSessionID
objectglyph=fas fa-calculator
projectrepo=github.com/mt1976/ebEstimates
propertiesOverride=
# If automatic generation of the application is true, then the following values are used
server=192.168.0.101\SQLEXPRESS
port=1433
user=srs
password=6LmYqp&*CBzo@s
database=EST
schema=dbo
sqlTableName=estimationSessionStore
sqlSearchID=estimationSessionID
#Does this File Have Enrichments - Include Additional Columns to the LIst & Record Views
hasEnrichments=y
isSpecial=n
HasStoreAdaptor=n
HasFetchAdaptor=n
hasaudit=y
package=estimationSession
provideslookup=y
LookUpID=EstimationSessionID
LookUpName=Name
5 changes: 5 additions & 0 deletions data/in/estimationSession.enri
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Type,Field,LookupObject,LookupKey,LookupReturns,IsInputtable,IsMandatory,DefaultValue,InputType,NoChange,HasApi,Mask,Hidden,Min,Max
Override,EstimationSessionID,,,,true,,,,true,false,,true,,
Lookup,ProjectID,Project,Project_ProjectID,Project_Name,true,,,,,,,,,
Lookup,EstimationStateID,EstimationState,EstimationState_EstimationStateID,,true,,,,,,,,,
Override,Notes,,,,true,,,textarea,,,,,,
49 changes: 49 additions & 0 deletions data/in/estimationState.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# What to generate
create_application=y
create_dao=y
create_datamodel=y
create_job=n
create_menu=y
create_html=y
create_adaptor=y
create_api=y
# actions - view/list are mandatory
can_edit=y
can_new=y
can_delete=y
can_softdelete=y
can_list=y
can_save=y
can_view=y
can_export=y
can_api=y
# use values can be db or list (db will attempt to connect to a db and extract data from the table to get the fields list)
use=db
# COmmon application properties
FriendlyName=Estimation State
objectname=EstimationState
endpointroot=
querystring=EstimationStateID
queryfield=EstimationStateID
objectglyph=fas fa-cogs
projectrepo=github.com/mt1976/ebEstimates
propertiesOverride=
# If automatic generation of the application is true, then the following values are used
server=192.168.0.101\SQLEXPRESS
port=1433
user=srs
password=6LmYqp&*CBzo@s
database=EST
schema=dbo
sqlTableName=estimationStateStore
sqlSearchID=estimationStateID
#Does this File Have Enrichments - Include Additional Columns to the LIst & Record Views
hasEnrichments=y
isSpecial=n
HasStoreAdaptor=n
HasFetchAdaptor=n
hasaudit=y
package=estimationState
provideslookup=y
LookUpID=Code
LookUpName=Name
2 changes: 2 additions & 0 deletions data/in/estimationState.enri
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Type,Field,LookupObject,LookupKey,LookupReturns,IsInputtable,IsMandatory,DefaultValue,InputType,NoChange,HasApi,Mask,Hidden,Min,Max
Override,EstimationStateID,,,,true,,,,true,false,,true,,
6 changes: 3 additions & 3 deletions data/in/externalMessage.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ querystring=Message
queryfield=MessageID
objectglyph=fas fa-mail-bulk
textclass=text-info
projectrepo=github.com/mt1976/mwt-go-dev
projectrepo=github.com/mt1976/ebEstimates
propertiesOverride=
# If automatic generation of the application is true, then the following values are used
server=mercury
server=192.168.0.101\SQLEXPRESS
port=1433
user=srs
password=6LmYqp&*CBzo@s
database=SRS
database=EST
schema=dbo
sqlTableName=externalMessageStore
sqlSearchID=MessageID
Expand Down
Loading

0 comments on commit dabf9f3

Please sign in to comment.