intial commit
This commit is contained in:
189
models/customer.go
Normal file
189
models/customer.go
Normal file
@@ -0,0 +1,189 @@
|
||||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
type CustomerResult struct {
|
||||
Code int `json:"code"`
|
||||
Status bool `json:"status"`
|
||||
Message string `json:"message"`
|
||||
Details Customers `json:"details"`
|
||||
}
|
||||
|
||||
type CustomersResult struct {
|
||||
Code int `json:"code"`
|
||||
Status bool `json:"status"`
|
||||
Message string `json:"message"`
|
||||
Details []Customers `json:"details"`
|
||||
}
|
||||
|
||||
type CustomerInfo struct {
|
||||
Customerid int `json:"customerid"`
|
||||
Firstname string `json:"firstname"`
|
||||
Lastname string `json:"lastname"`
|
||||
Profileimage string `json:"profileimage"`
|
||||
Gender string `json:"gender"`
|
||||
Dob string `json:"dob"`
|
||||
Dialcode string `json:"dialcode"`
|
||||
Contactno string `json:"contactno"`
|
||||
Email string `json:"email"`
|
||||
Deviceid string `json:"deviceid"`
|
||||
Devicetype string `json:"devicetype"`
|
||||
Authmode int `json:"authmode"`
|
||||
Configid int `json:"configid"`
|
||||
Customertoken string `json:"customertoken"`
|
||||
Deliverylocationid int `json:"deliverylocationid"`
|
||||
Address string `json:"address"`
|
||||
Suburb string `json:"suburb"`
|
||||
City string `json:"city"`
|
||||
State string `json:"state"`
|
||||
Landmark string `json:"landmark"`
|
||||
Doorno string `json:"doorno"`
|
||||
Postcode string `json:"postcode"`
|
||||
Latitude string `json:"latitude"`
|
||||
Longitude string `json:"longitude"`
|
||||
Applocationid int `json:"applocationid"`
|
||||
Allocationid int `json:"allocationid"`
|
||||
Primaryaddress int `json:"primaryaddress"`
|
||||
Tenantlocationid int `json:"tenantlocationid"`
|
||||
Tenantid int `json:"tenantid"`
|
||||
Status int `json:"status"`
|
||||
Intro string `json:"intro"`
|
||||
Selectedlatitude string `json:"selectedlatitude"`
|
||||
Selectedlongitude string `json:"selectedlongitude"`
|
||||
Radius string `json:"radius"`
|
||||
Qrmode int `json:"qrmode"`
|
||||
Quantity int `json:"quantity" gorm:"default:1"`
|
||||
Collectionamt float32 `json:"collectionamt" gorm:"default:0.0"`
|
||||
}
|
||||
|
||||
type Customers struct {
|
||||
Customerid int `json:"customerid" gorm:"Primary_Key"`
|
||||
Firstname string `json:"firstname"`
|
||||
Lastname string `json:"lastname"`
|
||||
Profileimage string `json:"profileimage"`
|
||||
Gender string `json:"gender"`
|
||||
Dob string `json:"dob"`
|
||||
Dialcode string `json:"dialcode"`
|
||||
Contactno string `json:"contactno"`
|
||||
Email string `json:"email"`
|
||||
Deviceid string `json:"deviceid"`
|
||||
Devicetype string `json:"devicetype"`
|
||||
Authmode int `json:"authmode"`
|
||||
Configid int `json:"configid"`
|
||||
Customertoken string `json:"customertoken"`
|
||||
Address string `json:"address"`
|
||||
Suburb string `json:"suburb"`
|
||||
City string `json:"city"`
|
||||
State string `json:"state"`
|
||||
Landmark string `json:"landmark"`
|
||||
Doorno string `json:"doorno"`
|
||||
Postcode string `json:"postcode"`
|
||||
Latitude string `json:"latitude"`
|
||||
Longitude string `json:"longitude"`
|
||||
Applocationid int `json:"applocationid"`
|
||||
Locationid int `json:"locationid,omitempty" gorm:"-"`
|
||||
Defaultaddress string `json:"defaultaddress,omitempty" gorm:"-"`
|
||||
Primaryaddress int `json:"primaryaddress,omitempty" gorm:"-"`
|
||||
Tenantid int `json:"tenantid,omitempty" gorm:"-"`
|
||||
Status int `json:"status"`
|
||||
Intro string `json:"intro"`
|
||||
Qrmode int `json:"qrmode,omitempty" gorm:"-"`
|
||||
}
|
||||
|
||||
type Customer struct {
|
||||
Customerid int `json:"customerid" gorm:"Primary_Key"`
|
||||
Firstname string `json:"firstname"`
|
||||
Lastname string `json:"lastname"`
|
||||
Profileimage string `json:"profileimage"`
|
||||
Gender string `json:"gender"`
|
||||
Dob string `json:"dob"`
|
||||
Dialcode string `json:"dialcode"`
|
||||
Contactno string `json:"contactno"`
|
||||
Email string `json:"email"`
|
||||
Deviceid string `json:"deviceid"`
|
||||
Devicetype string `json:"devicetype"`
|
||||
Authmode int `json:"authmode"`
|
||||
Configid int `json:"configid"`
|
||||
Customertoken string `json:"customertoken"`
|
||||
Address string `json:"address"`
|
||||
Suburb string `json:"suburb"`
|
||||
City string `json:"city"`
|
||||
State string `json:"state"`
|
||||
Landmark string `json:"landmark"`
|
||||
Doorno string `json:"doorno"`
|
||||
Postcode string `json:"postcode"`
|
||||
Latitude string `json:"latitude"`
|
||||
Longitude string `json:"longitude"`
|
||||
Applocationid int `json:"applocationid"`
|
||||
Locationid int `json:"locationid,omitempty"`
|
||||
Defaultaddress string `json:"defaultaddress,omitempty"`
|
||||
Primaryaddress int `json:"primaryaddress,omitempty"`
|
||||
Tenantid int `json:"tenantid,omitempty"`
|
||||
Status int `json:"status"`
|
||||
Intro string `json:"intro"`
|
||||
Qrmode int `json:"qrmode,omitempty"`
|
||||
}
|
||||
|
||||
type Tenantcustomers struct {
|
||||
Tenantcustomerid int `json:"tenantcustomerid" gorm:"Primary_Key;autoIncrement"`
|
||||
Tenantid int `json:"tenantid" `
|
||||
Locationid int `json:"locationid"`
|
||||
Customerid int `json:"customerid"`
|
||||
Moduleid int `json:"moduleid"`
|
||||
Status int `json:"status"`
|
||||
}
|
||||
|
||||
type Tenantcustomer struct {
|
||||
Tenantcustomerid int `json:"tenantcustomerid" gorm:"Primary_Key"`
|
||||
// Tenantid int `json:"tenantid" `
|
||||
Locationid int `json:"locationid"`
|
||||
Customerid int `json:"customerid"`
|
||||
Moduleid int `json:"moduleid"`
|
||||
Status int `json:"status"`
|
||||
}
|
||||
|
||||
type CustomersId struct {
|
||||
Customerid int `json:"customerid"`
|
||||
Locationid int `json:"locationsid"`
|
||||
Pickuplocationid int `json:"pickuplocationid"`
|
||||
Deliveryid int `json:"deliveryid"`
|
||||
Droplocationid int `json:"droplocationid"`
|
||||
}
|
||||
|
||||
type CustomerLocationResult struct {
|
||||
Code int `json:"code"`
|
||||
Status bool `json:"status"`
|
||||
Message string `json:"message"`
|
||||
Details []Customerlocations `json:"details"`
|
||||
}
|
||||
|
||||
type Customerlocations struct {
|
||||
Locationid int `json:"locationid" gorm:"Primary_Key"`
|
||||
Customerid int `json:"customerid"`
|
||||
Address string `json:"address"`
|
||||
Suburb string `json:"suburb"`
|
||||
City string `json:"city"`
|
||||
State string `json:"state"`
|
||||
Landmark string `json:"landmark"`
|
||||
Doorno string `json:"doorno"`
|
||||
Postcode string `json:"postcode"`
|
||||
Latitude string `json:"latitude"`
|
||||
Longitude string `json:"longitude"`
|
||||
Primaryaddress int `json:"primaryaddress"`
|
||||
Status int `json:"status"`
|
||||
}
|
||||
|
||||
type CustomerRequest struct {
|
||||
Customerrequestid int `json:"customerrequestid"`
|
||||
Referencedate time.Time `json:"referencedate"`
|
||||
Referencetype string `json:"referencetype"`
|
||||
Customerid int `json:"customerid"`
|
||||
Tenantid int `json:"tenantid"`
|
||||
Apptypeid int `json:"apptypeid"`
|
||||
Locationid int `json:"locationid"`
|
||||
Subject string `json:"subject"`
|
||||
Remarks string `json:"remarks"`
|
||||
Status int `json:"status"`
|
||||
Created time.Time `json:"created"`
|
||||
Updated time.Time `json:"updated"`
|
||||
}
|
||||
Reference in New Issue
Block a user