From 6baad020ce5037a90d902c8f41f1f37f52419a10 Mon Sep 17 00:00:00 2001 From: MikunoNaka Date: Mon, 12 Jul 2021 12:14:35 +0530 Subject: Added support for more client details in server --- server/database/database.go | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'server/database/database.go') diff --git a/server/database/database.go b/server/database/database.go index 0499b68..68c3c76 100644 --- a/server/database/database.go +++ b/server/database/database.go @@ -13,6 +13,14 @@ import ( _ "github.com/mattn/go-sqlite3" ) +type Address struct { + AddressLine string + City string + State string + PINCode string + Country string +} + var myDatabase *sql.DB func InitDB() { myDatabase, _ = sql.Open("sqlite3", "./openbills.db") @@ -33,10 +41,12 @@ func InitDB() { init_people, _ := myDatabase.Prepare( `CREATE TABLE IF NOT EXISTS People (id INTEGER PRIMARY KEY AUTOINCREMENT, - Name TEXT, - Address TEXT, - Phone TEXT, - Email TEXT)`, + Name TEXT, + Phone TEXT, + Email TEXT, + BillAddress BLOB, + ShipAddress BLOB, + GSTIN TEXT)`, ) init_people.Exec() -- cgit v1.2.3