From 678e0607e32c177b67d897eb34a303a2d4250aa3 Mon Sep 17 00:00:00 2001 From: Vernon Keenan Date: Sun, 10 Jan 2021 15:44:39 -0800 Subject: [PATCH] move types to app --- {types => app}/account.go | 2 +- {types => app}/accountingrule.go | 2 +- {types => app}/accountingruleset.go | 2 +- {types => app}/accountingrulesetitem.go | 2 +- app/address.go | 12 +++++ {types => app}/backend.go | 2 +- {types => app}/cashreceipt.go | 2 +- {types => app}/charge.go | 2 +- {types => app}/cluster.go | 2 +- {types => app}/company.go | 2 +- {types => app}/contact.go | 2 +- {types => app}/coordinate.go | 2 +- {types => app}/country.go | 2 +- {types => app}/county.go | 2 +- {types => app}/database.go | 2 +- {types => app}/domain.go | 2 +- {types => app}/eft.go | 2 +- {types => app}/eftitem.go | 2 +- {types => app}/emailmessage.go | 2 +- {types => app}/emaitemplate.go | 2 +- {types => app}/filing.go | 2 +- {types => app}/filingscheduleitem.go | 2 +- {types => app}/filingtype.go | 2 +- {types => app}/filingtypeinstance.go | 2 +- {types => app}/folder.go | 2 +- {types => app}/glaccount.go | 2 +- {types => app}/glbalance.go | 2 +- {types => app}/ingest.go | 2 +- {types => app}/invoice.go | 2 +- {types => app}/invoiceitem.go | 2 +- {types => app}/job.go | 2 +- {types => app}/journalentry.go | 2 +- {types => app}/journalitem.go | 2 +- {types => app}/lead.go | 2 +- {types => app}/license.go | 2 +- {types => app}/licensetype.go | 2 +- types/applog.go => app/log.go | 6 +-- {types => app}/notebook.go | 2 +- {types => app}/notebookitem.go | 2 +- {types => app}/order.go | 2 +- {types => app}/orderitem.go | 2 +- {types => app}/outgoingemail.go | 2 +- {types => app}/outgoingemailreceipt.go | 2 +- {types => app}/paymentmethod.go | 2 +- {types => app}/pdf.go | 2 +- {types => app}/period.go | 2 +- {types => app}/place.go | 2 +- {types => app}/po.go | 2 +- {types => app}/poitem.go | 2 +- {types => app}/product.go | 2 +- {types => app}/quote.go | 2 +- {types => app}/quoteitem.go | 2 +- {types => app}/ratingengine.go | 2 +- {types => app}/ratingengineitem.go | 2 +- {types => app}/role.go | 2 +- {types => app}/service.go | 2 +- {types => app}/state.go | 2 +- {types => app}/submission.go | 2 +- {types => app}/task.go | 2 +- {types => app}/taskrelation.go | 2 +- {types => app}/taskwhorelation.go | 2 +- {types => app}/taxinstance.go | 2 +- {types => app}/taxnexuscode.go | 2 +- {types => app}/taxrate.go | 2 +- {types => app}/taxtransaction.go | 2 +- {types => app}/taxtype.go | 2 +- {types => app}/taxtypeaccount.go | 2 +- {types => app}/template.go | 2 +- {types => app}/tenant.go | 2 +- {types => app}/tenantuser.go | 2 +- {types => app}/total.go | 2 +- {types => app}/totalitem.go | 2 +- {types => app}/totaltaxitem.go | 2 +- {types => app}/transaction.go | 2 +- app/user.go | 50 +---------------- {types => app}/userrole.go | 2 +- types/address.go | 45 ---------------- types/root.go | 2 - types/user.go | 71 ------------------------- 79 files changed, 89 insertions(+), 243 deletions(-) rename {types => app}/account.go (99%) rename {types => app}/accountingrule.go (98%) rename {types => app}/accountingruleset.go (96%) rename {types => app}/accountingrulesetitem.go (96%) create mode 100644 app/address.go rename {types => app}/backend.go (98%) rename {types => app}/cashreceipt.go (98%) rename {types => app}/charge.go (98%) rename {types => app}/cluster.go (97%) rename {types => app}/company.go (98%) rename {types => app}/contact.go (98%) rename {types => app}/coordinate.go (98%) rename {types => app}/country.go (98%) rename {types => app}/county.go (98%) rename {types => app}/database.go (96%) rename {types => app}/domain.go (94%) rename {types => app}/eft.go (98%) rename {types => app}/eftitem.go (95%) rename {types => app}/emailmessage.go (98%) rename {types => app}/emaitemplate.go (98%) rename {types => app}/filing.go (98%) rename {types => app}/filingscheduleitem.go (95%) rename {types => app}/filingtype.go (98%) rename {types => app}/filingtypeinstance.go (96%) rename {types => app}/folder.go (98%) rename {types => app}/glaccount.go (97%) rename {types => app}/glbalance.go (97%) rename {types => app}/ingest.go (98%) rename {types => app}/invoice.go (99%) rename {types => app}/invoiceitem.go (98%) rename {types => app}/job.go (98%) rename {types => app}/journalentry.go (97%) rename {types => app}/journalitem.go (98%) rename {types => app}/lead.go (98%) rename {types => app}/license.go (97%) rename {types => app}/licensetype.go (99%) rename types/applog.go => app/log.go (80%) rename {types => app}/notebook.go (97%) rename {types => app}/notebookitem.go (95%) rename {types => app}/order.go (99%) rename {types => app}/orderitem.go (98%) rename {types => app}/outgoingemail.go (98%) rename {types => app}/outgoingemailreceipt.go (96%) rename {types => app}/paymentmethod.go (98%) rename {types => app}/pdf.go (97%) rename {types => app}/period.go (97%) rename {types => app}/place.go (99%) rename {types => app}/po.go (99%) rename {types => app}/poitem.go (98%) rename {types => app}/product.go (98%) rename {types => app}/quote.go (99%) rename {types => app}/quoteitem.go (98%) rename {types => app}/ratingengine.go (97%) rename {types => app}/ratingengineitem.go (95%) rename {types => app}/role.go (95%) rename {types => app}/service.go (97%) rename {types => app}/state.go (98%) rename {types => app}/submission.go (98%) rename {types => app}/task.go (99%) rename {types => app}/taskrelation.go (96%) rename {types => app}/taskwhorelation.go (96%) rename {types => app}/taxinstance.go (96%) rename {types => app}/taxnexuscode.go (99%) rename {types => app}/taxrate.go (96%) rename {types => app}/taxtransaction.go (99%) rename {types => app}/taxtype.go (99%) rename {types => app}/taxtypeaccount.go (98%) rename {types => app}/template.go (97%) rename {types => app}/tenant.go (97%) rename {types => app}/tenantuser.go (97%) rename {types => app}/total.go (97%) rename {types => app}/totalitem.go (93%) rename {types => app}/totaltaxitem.go (91%) rename {types => app}/transaction.go (96%) rename {types => app}/userrole.go (96%) delete mode 100644 types/address.go delete mode 100644 types/root.go delete mode 100644 types/user.go diff --git a/types/account.go b/app/account.go similarity index 99% rename from types/account.go rename to app/account.go index ee4a74c..668918a 100644 --- a/types/account.go +++ b/app/account.go @@ -1,4 +1,4 @@ -package types +package app import "database/sql" diff --git a/types/accountingrule.go b/app/accountingrule.go similarity index 98% rename from types/accountingrule.go rename to app/accountingrule.go index 74d1e6f..3a4599e 100644 --- a/types/accountingrule.go +++ b/app/accountingrule.go @@ -1,4 +1,4 @@ -package types +package app import "database/sql" diff --git a/types/accountingruleset.go b/app/accountingruleset.go similarity index 96% rename from types/accountingruleset.go rename to app/accountingruleset.go index 3783595..8715ddc 100644 --- a/types/accountingruleset.go +++ b/app/accountingruleset.go @@ -1,4 +1,4 @@ -package types +package app import "database/sql" diff --git a/types/accountingrulesetitem.go b/app/accountingrulesetitem.go similarity index 96% rename from types/accountingrulesetitem.go rename to app/accountingrulesetitem.go index f2c9812..9eea9aa 100644 --- a/types/accountingrulesetitem.go +++ b/app/accountingrulesetitem.go @@ -1,4 +1,4 @@ -package types +package app import "database/sql" diff --git a/app/address.go b/app/address.go new file mode 100644 index 0000000..1575afa --- /dev/null +++ b/app/address.go @@ -0,0 +1,12 @@ +package app + +// Address address struct +type Address struct { + City string + Country string + CountryCode string + PostalCode string + State string + StateCode string + Street string +} diff --git a/types/backend.go b/app/backend.go similarity index 98% rename from types/backend.go rename to app/backend.go index b8ad1be..e7ec3c4 100644 --- a/types/backend.go +++ b/app/backend.go @@ -1,4 +1,4 @@ -package types +package app import "database/sql" diff --git a/types/cashreceipt.go b/app/cashreceipt.go similarity index 98% rename from types/cashreceipt.go rename to app/cashreceipt.go index aec045f..06a2b4a 100644 --- a/types/cashreceipt.go +++ b/app/cashreceipt.go @@ -1,4 +1,4 @@ -package types +package app import "database/sql" diff --git a/types/charge.go b/app/charge.go similarity index 98% rename from types/charge.go rename to app/charge.go index 8e90253..cef706c 100644 --- a/types/charge.go +++ b/app/charge.go @@ -1,4 +1,4 @@ -package types +package app import "database/sql" diff --git a/types/cluster.go b/app/cluster.go similarity index 97% rename from types/cluster.go rename to app/cluster.go index 97464b2..a4ed6a3 100644 --- a/types/cluster.go +++ b/app/cluster.go @@ -1,4 +1,4 @@ -package types +package app import "database/sql" diff --git a/types/company.go b/app/company.go similarity index 98% rename from types/company.go rename to app/company.go index d722883..fe68c00 100644 --- a/types/company.go +++ b/app/company.go @@ -1,4 +1,4 @@ -package types +package app import "database/sql" diff --git a/types/contact.go b/app/contact.go similarity index 98% rename from types/contact.go rename to app/contact.go index cc65a35..821862c 100644 --- a/types/contact.go +++ b/app/contact.go @@ -1,4 +1,4 @@ -package types +package app import "database/sql" diff --git a/types/coordinate.go b/app/coordinate.go similarity index 98% rename from types/coordinate.go rename to app/coordinate.go index a55eb3f..a827693 100644 --- a/types/coordinate.go +++ b/app/coordinate.go @@ -1,4 +1,4 @@ -package types +package app import ( "database/sql" diff --git a/types/country.go b/app/country.go similarity index 98% rename from types/country.go rename to app/country.go index 44bbf7e..0fee160 100644 --- a/types/country.go +++ b/app/country.go @@ -1,4 +1,4 @@ -package types +package app import "database/sql" diff --git a/types/county.go b/app/county.go similarity index 98% rename from types/county.go rename to app/county.go index 6da72a9..3e3fbcc 100644 --- a/types/county.go +++ b/app/county.go @@ -1,4 +1,4 @@ -package types +package app import "database/sql" diff --git a/types/database.go b/app/database.go similarity index 96% rename from types/database.go rename to app/database.go index 4473338..2da69ed 100644 --- a/types/database.go +++ b/app/database.go @@ -1,4 +1,4 @@ -package types +package app import "database/sql" diff --git a/types/domain.go b/app/domain.go similarity index 94% rename from types/domain.go rename to app/domain.go index 1fb5594..b21fd92 100644 --- a/types/domain.go +++ b/app/domain.go @@ -1,4 +1,4 @@ -package types +package app // Domain is a first class object type type Domain struct { diff --git a/types/eft.go b/app/eft.go similarity index 98% rename from types/eft.go rename to app/eft.go index 84826fb..7691cc4 100644 --- a/types/eft.go +++ b/app/eft.go @@ -1,4 +1,4 @@ -package types +package app import "database/sql" diff --git a/types/eftitem.go b/app/eftitem.go similarity index 95% rename from types/eftitem.go rename to app/eftitem.go index aaa5626..d1f2c82 100644 --- a/types/eftitem.go +++ b/app/eftitem.go @@ -1,4 +1,4 @@ -package types +package app import "database/sql" diff --git a/types/emailmessage.go b/app/emailmessage.go similarity index 98% rename from types/emailmessage.go rename to app/emailmessage.go index 3d1a6df..af2353d 100644 --- a/types/emailmessage.go +++ b/app/emailmessage.go @@ -1,4 +1,4 @@ -package types +package app import ( "database/sql" diff --git a/types/emaitemplate.go b/app/emaitemplate.go similarity index 98% rename from types/emaitemplate.go rename to app/emaitemplate.go index ddab191..51c887b 100644 --- a/types/emaitemplate.go +++ b/app/emaitemplate.go @@ -1,4 +1,4 @@ -package types +package app import ( "database/sql" diff --git a/types/filing.go b/app/filing.go similarity index 98% rename from types/filing.go rename to app/filing.go index e16c15a..0c0fcbc 100644 --- a/types/filing.go +++ b/app/filing.go @@ -1,4 +1,4 @@ -package types +package app import "database/sql" diff --git a/types/filingscheduleitem.go b/app/filingscheduleitem.go similarity index 95% rename from types/filingscheduleitem.go rename to app/filingscheduleitem.go index 5759a80..f55dacb 100644 --- a/types/filingscheduleitem.go +++ b/app/filingscheduleitem.go @@ -1,4 +1,4 @@ -package types +package app import "database/sql" diff --git a/types/filingtype.go b/app/filingtype.go similarity index 98% rename from types/filingtype.go rename to app/filingtype.go index ea19d8b..6f2741e 100644 --- a/types/filingtype.go +++ b/app/filingtype.go @@ -1,4 +1,4 @@ -package types +package app import "database/sql" diff --git a/types/filingtypeinstance.go b/app/filingtypeinstance.go similarity index 96% rename from types/filingtypeinstance.go rename to app/filingtypeinstance.go index 696486c..59e3c61 100644 --- a/types/filingtypeinstance.go +++ b/app/filingtypeinstance.go @@ -1,4 +1,4 @@ -package types +package app import "database/sql" diff --git a/types/folder.go b/app/folder.go similarity index 98% rename from types/folder.go rename to app/folder.go index fd828b0..df56774 100644 --- a/types/folder.go +++ b/app/folder.go @@ -1,4 +1,4 @@ -package types +package app import ( "database/sql" diff --git a/types/glaccount.go b/app/glaccount.go similarity index 97% rename from types/glaccount.go rename to app/glaccount.go index c55cadf..f2a4b1f 100644 --- a/types/glaccount.go +++ b/app/glaccount.go @@ -1,4 +1,4 @@ -package types +package app import "database/sql" diff --git a/types/glbalance.go b/app/glbalance.go similarity index 97% rename from types/glbalance.go rename to app/glbalance.go index f507ff2..a0d8047 100644 --- a/types/glbalance.go +++ b/app/glbalance.go @@ -1,4 +1,4 @@ -package types +package app import "database/sql" diff --git a/types/ingest.go b/app/ingest.go similarity index 98% rename from types/ingest.go rename to app/ingest.go index 88c6661..04f44f2 100644 --- a/types/ingest.go +++ b/app/ingest.go @@ -1,4 +1,4 @@ -package types +package app import "database/sql" diff --git a/types/invoice.go b/app/invoice.go similarity index 99% rename from types/invoice.go rename to app/invoice.go index ee19fee..df088d6 100644 --- a/types/invoice.go +++ b/app/invoice.go @@ -1,4 +1,4 @@ -package types +package app import "database/sql" diff --git a/types/invoiceitem.go b/app/invoiceitem.go similarity index 98% rename from types/invoiceitem.go rename to app/invoiceitem.go index 642a637..13bf965 100644 --- a/types/invoiceitem.go +++ b/app/invoiceitem.go @@ -1,4 +1,4 @@ -package types +package app import ( "database/sql" diff --git a/types/job.go b/app/job.go similarity index 98% rename from types/job.go rename to app/job.go index d5b04a9..ed430f4 100644 --- a/types/job.go +++ b/app/job.go @@ -1,4 +1,4 @@ -package types +package app import ( "database/sql" diff --git a/types/journalentry.go b/app/journalentry.go similarity index 97% rename from types/journalentry.go rename to app/journalentry.go index d9e67a3..8b680f8 100644 --- a/types/journalentry.go +++ b/app/journalentry.go @@ -1,4 +1,4 @@ -package types +package app import "database/sql" diff --git a/types/journalitem.go b/app/journalitem.go similarity index 98% rename from types/journalitem.go rename to app/journalitem.go index 6f93d9c..cc70230 100644 --- a/types/journalitem.go +++ b/app/journalitem.go @@ -1,4 +1,4 @@ -package types +package app import "database/sql" diff --git a/types/lead.go b/app/lead.go similarity index 98% rename from types/lead.go rename to app/lead.go index 57ec318..acb4631 100644 --- a/types/lead.go +++ b/app/lead.go @@ -1,4 +1,4 @@ -package types +package app import "database/sql" diff --git a/types/license.go b/app/license.go similarity index 97% rename from types/license.go rename to app/license.go index e775c3e..3845f32 100644 --- a/types/license.go +++ b/app/license.go @@ -1,4 +1,4 @@ -package types +package app import "database/sql" diff --git a/types/licensetype.go b/app/licensetype.go similarity index 99% rename from types/licensetype.go rename to app/licensetype.go index c23176e..f6718e8 100644 --- a/types/licensetype.go +++ b/app/licensetype.go @@ -1,4 +1,4 @@ -package types +package app import "database/sql" diff --git a/types/applog.go b/app/log.go similarity index 80% rename from types/applog.go rename to app/log.go index 0098e1b..5536f26 100644 --- a/types/applog.go +++ b/app/log.go @@ -1,9 +1,9 @@ -package types +package app import "database/sql" -// AppLog is a first class object type -type AppLog struct { +// Log is a first class object type +type Log struct { ID string AccountID string CompanyID string diff --git a/types/notebook.go b/app/notebook.go similarity index 97% rename from types/notebook.go rename to app/notebook.go index ec2bc3c..ddf80a2 100644 --- a/types/notebook.go +++ b/app/notebook.go @@ -1,4 +1,4 @@ -package types +package app import "database/sql" diff --git a/types/notebookitem.go b/app/notebookitem.go similarity index 95% rename from types/notebookitem.go rename to app/notebookitem.go index d3b3b4c..0ac994a 100644 --- a/types/notebookitem.go +++ b/app/notebookitem.go @@ -1,4 +1,4 @@ -package types +package app import "database/sql" diff --git a/types/order.go b/app/order.go similarity index 99% rename from types/order.go rename to app/order.go index d83d73a..c535f0c 100644 --- a/types/order.go +++ b/app/order.go @@ -1,4 +1,4 @@ -package types +package app import "database/sql" diff --git a/types/orderitem.go b/app/orderitem.go similarity index 98% rename from types/orderitem.go rename to app/orderitem.go index dacaca2..6be5ad4 100644 --- a/types/orderitem.go +++ b/app/orderitem.go @@ -1,4 +1,4 @@ -package types +package app import "database/sql" diff --git a/types/outgoingemail.go b/app/outgoingemail.go similarity index 98% rename from types/outgoingemail.go rename to app/outgoingemail.go index 40df408..9347649 100644 --- a/types/outgoingemail.go +++ b/app/outgoingemail.go @@ -1,4 +1,4 @@ -package types +package app // OutgoingEmailMessage is a first class object type type OutgoingEmailMessage struct { diff --git a/types/outgoingemailreceipt.go b/app/outgoingemailreceipt.go similarity index 96% rename from types/outgoingemailreceipt.go rename to app/outgoingemailreceipt.go index 70e05b6..f537f35 100644 --- a/types/outgoingemailreceipt.go +++ b/app/outgoingemailreceipt.go @@ -1,4 +1,4 @@ -package types +package app // OutgoingEmailMessageReceipt is a first class object type type OutgoingEmailMessageReceipt struct { diff --git a/types/paymentmethod.go b/app/paymentmethod.go similarity index 98% rename from types/paymentmethod.go rename to app/paymentmethod.go index 4d8e92a..9796b7c 100644 --- a/types/paymentmethod.go +++ b/app/paymentmethod.go @@ -1,4 +1,4 @@ -package types +package app import "database/sql" diff --git a/types/pdf.go b/app/pdf.go similarity index 97% rename from types/pdf.go rename to app/pdf.go index b8cd360..75a3f18 100644 --- a/types/pdf.go +++ b/app/pdf.go @@ -1,4 +1,4 @@ -package types +package app import "database/sql" diff --git a/types/period.go b/app/period.go similarity index 97% rename from types/period.go rename to app/period.go index 2e450a6..cb17ea1 100644 --- a/types/period.go +++ b/app/period.go @@ -1,4 +1,4 @@ -package types +package app import ( "database/sql" diff --git a/types/place.go b/app/place.go similarity index 99% rename from types/place.go rename to app/place.go index d4a2e9d..07da0f0 100644 --- a/types/place.go +++ b/app/place.go @@ -1,4 +1,4 @@ -package types +package app import "database/sql" diff --git a/types/po.go b/app/po.go similarity index 99% rename from types/po.go rename to app/po.go index c981968..d2491c1 100644 --- a/types/po.go +++ b/app/po.go @@ -1,4 +1,4 @@ -package types +package app import "database/sql" diff --git a/types/poitem.go b/app/poitem.go similarity index 98% rename from types/poitem.go rename to app/poitem.go index a0a69bf..9e58030 100644 --- a/types/poitem.go +++ b/app/poitem.go @@ -1,4 +1,4 @@ -package types +package app import "database/sql" diff --git a/types/product.go b/app/product.go similarity index 98% rename from types/product.go rename to app/product.go index 89694db..e3e15d8 100644 --- a/types/product.go +++ b/app/product.go @@ -1,4 +1,4 @@ -package types +package app import "database/sql" diff --git a/types/quote.go b/app/quote.go similarity index 99% rename from types/quote.go rename to app/quote.go index c302cd0..f306fc2 100644 --- a/types/quote.go +++ b/app/quote.go @@ -1,4 +1,4 @@ -package types +package app import "database/sql" diff --git a/types/quoteitem.go b/app/quoteitem.go similarity index 98% rename from types/quoteitem.go rename to app/quoteitem.go index 01b132c..f2b8658 100644 --- a/types/quoteitem.go +++ b/app/quoteitem.go @@ -1,4 +1,4 @@ -package types +package app import "database/sql" diff --git a/types/ratingengine.go b/app/ratingengine.go similarity index 97% rename from types/ratingengine.go rename to app/ratingengine.go index d64e4e0..52a5dfb 100644 --- a/types/ratingengine.go +++ b/app/ratingengine.go @@ -1,4 +1,4 @@ -package types +package app import "github.com/go-sql-driver/mysql" diff --git a/types/ratingengineitem.go b/app/ratingengineitem.go similarity index 95% rename from types/ratingengineitem.go rename to app/ratingengineitem.go index 07cd1d2..3514cec 100644 --- a/types/ratingengineitem.go +++ b/app/ratingengineitem.go @@ -1,4 +1,4 @@ -package types +package app import "github.com/go-sql-driver/mysql" diff --git a/types/role.go b/app/role.go similarity index 95% rename from types/role.go rename to app/role.go index c709ce5..5a2b224 100644 --- a/types/role.go +++ b/app/role.go @@ -1,4 +1,4 @@ -package types +package app import "database/sql" diff --git a/types/service.go b/app/service.go similarity index 97% rename from types/service.go rename to app/service.go index 0c142c0..efe9df0 100644 --- a/types/service.go +++ b/app/service.go @@ -1,4 +1,4 @@ -package types +package app import "database/sql" diff --git a/types/state.go b/app/state.go similarity index 98% rename from types/state.go rename to app/state.go index 4eeaa11..c29fd9b 100644 --- a/types/state.go +++ b/app/state.go @@ -1,4 +1,4 @@ -package types +package app import "database/sql" diff --git a/types/submission.go b/app/submission.go similarity index 98% rename from types/submission.go rename to app/submission.go index 29e89cf..2f109ef 100644 --- a/types/submission.go +++ b/app/submission.go @@ -1,4 +1,4 @@ -package types +package app import "database/sql" diff --git a/types/task.go b/app/task.go similarity index 99% rename from types/task.go rename to app/task.go index 07aaad2..232cd46 100644 --- a/types/task.go +++ b/app/task.go @@ -1,4 +1,4 @@ -package types +package app import ( "database/sql" diff --git a/types/taskrelation.go b/app/taskrelation.go similarity index 96% rename from types/taskrelation.go rename to app/taskrelation.go index 26d9ef1..7d0bc17 100644 --- a/types/taskrelation.go +++ b/app/taskrelation.go @@ -1,4 +1,4 @@ -package types +package app import ( "database/sql" diff --git a/types/taskwhorelation.go b/app/taskwhorelation.go similarity index 96% rename from types/taskwhorelation.go rename to app/taskwhorelation.go index 6efa499..74aea14 100644 --- a/types/taskwhorelation.go +++ b/app/taskwhorelation.go @@ -1,4 +1,4 @@ -package types +package app import ( "database/sql" diff --git a/types/taxinstance.go b/app/taxinstance.go similarity index 96% rename from types/taxinstance.go rename to app/taxinstance.go index fd2220a..c0fe43f 100644 --- a/types/taxinstance.go +++ b/app/taxinstance.go @@ -1,4 +1,4 @@ -package types +package app import ( "database/sql" diff --git a/types/taxnexuscode.go b/app/taxnexuscode.go similarity index 99% rename from types/taxnexuscode.go rename to app/taxnexuscode.go index b8068a5..60f6d53 100644 --- a/types/taxnexuscode.go +++ b/app/taxnexuscode.go @@ -1,4 +1,4 @@ -package types +package app // TaxnexusCode is a first class object type type TaxnexusCode struct { diff --git a/types/taxrate.go b/app/taxrate.go similarity index 96% rename from types/taxrate.go rename to app/taxrate.go index 8478e20..0a25ea7 100644 --- a/types/taxrate.go +++ b/app/taxrate.go @@ -1,4 +1,4 @@ -package types +package app // TaxRate is a principal object type type TaxRate struct { diff --git a/types/taxtransaction.go b/app/taxtransaction.go similarity index 99% rename from types/taxtransaction.go rename to app/taxtransaction.go index de2f761..c084c86 100644 --- a/types/taxtransaction.go +++ b/app/taxtransaction.go @@ -1,4 +1,4 @@ -package types +package app import ( "database/sql" diff --git a/types/taxtype.go b/app/taxtype.go similarity index 99% rename from types/taxtype.go rename to app/taxtype.go index 0d5aca8..37e200e 100644 --- a/types/taxtype.go +++ b/app/taxtype.go @@ -1,4 +1,4 @@ -package types +package app import "database/sql" diff --git a/types/taxtypeaccount.go b/app/taxtypeaccount.go similarity index 98% rename from types/taxtypeaccount.go rename to app/taxtypeaccount.go index 7dd081d..ddd761b 100644 --- a/types/taxtypeaccount.go +++ b/app/taxtypeaccount.go @@ -1,4 +1,4 @@ -package types +package app import "database/sql" diff --git a/types/template.go b/app/template.go similarity index 97% rename from types/template.go rename to app/template.go index b8d2bd3..54c43b2 100644 --- a/types/template.go +++ b/app/template.go @@ -1,4 +1,4 @@ -package types +package app import "database/sql" diff --git a/types/tenant.go b/app/tenant.go similarity index 97% rename from types/tenant.go rename to app/tenant.go index f5e8455..57fd4c4 100644 --- a/types/tenant.go +++ b/app/tenant.go @@ -1,4 +1,4 @@ -package types +package app import "database/sql" diff --git a/types/tenantuser.go b/app/tenantuser.go similarity index 97% rename from types/tenantuser.go rename to app/tenantuser.go index 2d7822f..2487953 100644 --- a/types/tenantuser.go +++ b/app/tenantuser.go @@ -1,4 +1,4 @@ -package types +package app // TenantUser is a first class object type type TenantUser struct { diff --git a/types/total.go b/app/total.go similarity index 97% rename from types/total.go rename to app/total.go index eb45279..566cf76 100644 --- a/types/total.go +++ b/app/total.go @@ -1,4 +1,4 @@ -package types +package app // Total is a DB object type Total struct { diff --git a/types/totalitem.go b/app/totalitem.go similarity index 93% rename from types/totalitem.go rename to app/totalitem.go index 47f0456..8857efc 100644 --- a/types/totalitem.go +++ b/app/totalitem.go @@ -1,4 +1,4 @@ -package types +package app // TotalItem is a DB struct type TotalItem struct { diff --git a/types/totaltaxitem.go b/app/totaltaxitem.go similarity index 91% rename from types/totaltaxitem.go rename to app/totaltaxitem.go index f604279..23dab82 100644 --- a/types/totaltaxitem.go +++ b/app/totaltaxitem.go @@ -1,4 +1,4 @@ -package types +package app // TotalTaxItem is a DB struct type TotalTaxItem struct { diff --git a/types/transaction.go b/app/transaction.go similarity index 96% rename from types/transaction.go rename to app/transaction.go index 2a3b8bb..276b67a 100644 --- a/types/transaction.go +++ b/app/transaction.go @@ -1,4 +1,4 @@ -package types +package app import "database/sql" diff --git a/app/user.go b/app/user.go index 31bc5bb..42799e5 100644 --- a/app/user.go +++ b/app/user.go @@ -4,7 +4,7 @@ import ( "github.com/go-openapi/runtime" ) -// User is a fist-class object in the app package +// User is a first class object type type User struct { ID string AboutMe string @@ -67,51 +67,3 @@ type User struct { UserRoleID string UserType string } - -// UserRole is a fist-class object in the app package -type UserRole struct { - AccountID string - Auth0RoleID string - Auth0UserID string - CompanyName string - ContactID string - RoleDescription string - RoleID string - RoleName string - TaxnexusAccount string - UserEmail string - UserFullName string - UserID string - Username string -} - -// TenantUser is a fist-class object in the app package -type TenantUser struct { - AccessLevel string - AccountID string - Auth0UserID string - CompanyName string - ContactID string - TaxnexusAccount string - TenantActive bool - TenantID string - TenantName string - TenantStatus string - TenantType string - TenantVersion string - UserEmail string - UserFullName string - UserID string - Username string -} - -// Address is a fist-class object in the app package -type Address struct { - City string - Country string - CountryCode string - PostalCode string - State string - StateCode string - Street string -} diff --git a/types/userrole.go b/app/userrole.go similarity index 96% rename from types/userrole.go rename to app/userrole.go index c3baab7..f029693 100644 --- a/types/userrole.go +++ b/app/userrole.go @@ -1,4 +1,4 @@ -package types +package app // UserRole is a first class object type type UserRole struct { diff --git a/types/address.go b/types/address.go deleted file mode 100644 index 2a8eff7..0000000 --- a/types/address.go +++ /dev/null @@ -1,45 +0,0 @@ -package types - -import ( - "code.tnxs.net/taxnexus/lib/api/crm/crm_models" -) - -// Address address struct -type Address struct { - City string - Country string - CountryCode string - PostalCode string - State string - StateCode string - Street string -} - -func (obj *Address) marshalToCrmSwagger() *crm_models.Address { - if obj != nil { - return &crm_models.Address{ - City: obj.City, - Country: obj.Country, - CountryCode: obj.CountryCode, - PostalCode: obj.PostalCode, - State: obj.State, - StateCode: obj.StateCode, - Street: obj.Street, - } - } - return nil -} -func unMarshalCrmAddress(swag *crm_models.Address) Address { - if swag != nil { - return Address{ - City: swag.City, - Country: swag.Country, - CountryCode: swag.CountryCode, - PostalCode: swag.PostalCode, - State: swag.State, - StateCode: swag.StateCode, - Street: swag.Street, - } - } - return Address{} -} diff --git a/types/root.go b/types/root.go deleted file mode 100644 index e49921a..0000000 --- a/types/root.go +++ /dev/null @@ -1,2 +0,0 @@ -// Package types contains all the Taxnexus First Class Object Types -package types diff --git a/types/user.go b/types/user.go deleted file mode 100644 index 1b7aba4..0000000 --- a/types/user.go +++ /dev/null @@ -1,71 +0,0 @@ -package types - -import ( - "database/sql" - - "github.com/go-openapi/runtime" -) - -// User is a first class object type -type User struct { - ID string - AboutMe string - AccountID string - Address *Address - Alias string - APIKey string - Auth runtime.ClientAuthInfoWriter - Auth0UserID string - CommunityNickname string - CompanyName string - ContactID string - CreatedByID string - CreatedDate sql.NullTime - DelegatedApproverID string - Department string - Division string - Email string - EmployeeNumber string - EndOfDay string - Environment string - Extension string - FabricAPIKey string - Fax string - FirstName string - ForecastEnabled bool - FullPhotoURL string - IsActive bool - IsPortalEnabled bool - IsProfilePhotoActive bool - IsSystemControlled bool - LastIP string - LastLogin sql.NullTime - LastModifiedByID string - LastModifiedDate sql.NullTime - LastName string - LoginCount int64 - ManagerID string - MobilePhone string - Name string - OutOfOfficeMessage string - Phone string - PortalRole string - ProfileID string - ReceivesAdminEmails bool - ReceivesAdminInfoEmails bool - ReceivesInfoEmails bool - SenderEmail string - SenderName string - Signature string - SmallPhotoURL string - StartOfDay string - TaxnexusAccount string - TenantID string - TenantUsers []*TenantUser - TimeZone string - Title string - Username string - UserRoles []*UserRole - UserRoleID string - UserType string -}