Versions in this module Expand all Collapse all v0 v0.0.1 Oct 16, 2020 Changes in this version + type CustomerModel struct + DB *sql.DB + func (m *CustomerModel) Authenticate(email, password string) (int, error) + func (m *CustomerModel) Get(id int) (*models.Customer, error) + func (m *CustomerModel) Insert(name, address, email, password, phone string, pincode int) error + type DeliveryModel struct + DB *sql.DB + func (m *DeliveryModel) Get(deliveryID int) (*models.Delivery, error) + func (m *DeliveryModel) GetAllByCustomerID(customerID int) ([]*models.Delivery, error) + func (m *DeliveryModel) GetAllByCustomerIDStatus(customerID int, status string) ([]*models.Delivery, error) + func (m *DeliveryModel) GetAllByVendorID(vendorID int) ([]*models.Delivery, error) + func (m *DeliveryModel) GetAllByVendorIDStatus(vendorID int, status string) ([]*models.Delivery, error) + func (m *DeliveryModel) Insert(customerID, vendorID int, placementTime time.Time, dropLat, dropLong float64) (int, error) + type ListingModel struct + DB *sql.DB + func (m *ListingModel) All(vendorID int) ([]*models.Listing, error) + func (m *ListingModel) Get(id int) (*models.Listing, error) + func (m *ListingModel) Insert(vendorID, price int, description, name string) error + type OrderModel struct + DB *sql.DB + func (m *OrderModel) AllFromDeliveryID(deliveryID int) ([]*models.Order, error) + func (m *OrderModel) Get(orderID int) (*models.Order, error) + func (m *OrderModel) Insert(deliveryID, listingID, orderQuantity, orderAmount int) error + type VendorModel struct + DB *sql.DB + func (m *VendorModel) Authenticate(email, password string) (int, error) + func (m *VendorModel) Get(id int) (*models.Vendor, error) + func (m *VendorModel) GetByPincode(pincode, pincodeRange int) ([]*models.Vendor, error) + func (m *VendorModel) Insert(name, address, email, password, phone string, pincode int, ...) error