121 lines
4.1 KiB
Go
121 lines
4.1 KiB
Go
// Code generated by sqlc. DO NOT EDIT.
|
|
// versions:
|
|
// sqlc v1.17.2
|
|
|
|
package db
|
|
|
|
import (
|
|
"database/sql"
|
|
"encoding/json"
|
|
|
|
"github.com/google/uuid"
|
|
"github.com/tabbed/pqtype"
|
|
)
|
|
|
|
type Customer struct {
|
|
ID uuid.UUID `json:"id"`
|
|
IndexID int64 `json:"index_id"`
|
|
MerchantID uuid.UUID `json:"merchant_id"`
|
|
Name string `json:"name"`
|
|
Detail []json.RawMessage `json:"detail"`
|
|
CreatedAt sql.NullTime `json:"created_at"`
|
|
UpdatedAt sql.NullTime `json:"updated_at"`
|
|
}
|
|
|
|
type Merchant struct {
|
|
ID uuid.UUID `json:"id"`
|
|
IndexID int64 `json:"index_id"`
|
|
Name string `json:"name"`
|
|
OwnerID uuid.UUID `json:"owner_id"`
|
|
CreatedAt sql.NullTime `json:"created_at"`
|
|
UpdatedAt sql.NullTime `json:"updated_at"`
|
|
}
|
|
|
|
type Product struct {
|
|
ID uuid.UUID `json:"id"`
|
|
MerchantID uuid.UUID `json:"merchant_id"`
|
|
IndexID int64 `json:"index_id"`
|
|
Name string `json:"name"`
|
|
SellingPrice float64 `json:"selling_price"`
|
|
PurchasePrice float64 `json:"purchase_price"`
|
|
Stock float64 `json:"stock"`
|
|
CreatedAt sql.NullTime `json:"created_at"`
|
|
UpdatedAt sql.NullTime `json:"updated_at"`
|
|
}
|
|
|
|
type PurchaseOrder struct {
|
|
ID uuid.UUID `json:"id"`
|
|
SupplierID uuid.UUID `json:"supplier_id"`
|
|
MerchantID uuid.UUID `json:"merchant_id"`
|
|
IndexID int64 `json:"index_id"`
|
|
Code sql.NullString `json:"code"`
|
|
IsPaid bool `json:"is_paid"`
|
|
Total float64 `json:"total"`
|
|
PaidNominal float64 `json:"paid_nominal"`
|
|
Note sql.NullString `json:"note"`
|
|
CreatedAt sql.NullTime `json:"created_at"`
|
|
UpdatedAt sql.NullTime `json:"updated_at"`
|
|
}
|
|
|
|
type PurchaseOrderDetail struct {
|
|
ID uuid.UUID `json:"id"`
|
|
IndexID int64 `json:"index_id"`
|
|
Code sql.NullString `json:"code"`
|
|
MerchantID uuid.UUID `json:"merchant_id"`
|
|
PurchaseOrderID uuid.UUID `json:"purchase_order_id"`
|
|
ProductID uuid.UUID `json:"product_id"`
|
|
Quantity float64 `json:"quantity"`
|
|
SubTotal float64 `json:"sub_total"`
|
|
ProductPrice float64 `json:"product_price"`
|
|
CreatedAt sql.NullTime `json:"created_at"`
|
|
UpdatedAt sql.NullTime `json:"updated_at"`
|
|
}
|
|
|
|
type SaleOrder struct {
|
|
ID uuid.UUID `json:"id"`
|
|
IndexID int64 `json:"index_id"`
|
|
Code sql.NullString `json:"code"`
|
|
MerchantID uuid.UUID `json:"merchant_id"`
|
|
CustomerID uuid.NullUUID `json:"customer_id"`
|
|
IsPaid sql.NullBool `json:"is_paid"`
|
|
Total float64 `json:"total"`
|
|
PaidNominal float64 `json:"paid_nominal"`
|
|
Note sql.NullString `json:"note"`
|
|
CreatedAt sql.NullTime `json:"created_at"`
|
|
UpdatedAt sql.NullTime `json:"updated_at"`
|
|
}
|
|
|
|
type SaleOrderDetail struct {
|
|
ID uuid.UUID `json:"id"`
|
|
IndexID int64 `json:"index_id"`
|
|
SaleOrderID uuid.UUID `json:"sale_order_id"`
|
|
ProductID uuid.UUID `json:"product_id"`
|
|
ProductName string `json:"product_name"`
|
|
Quantity float64 `json:"quantity"`
|
|
SubTotal float64 `json:"sub_total"`
|
|
ProductPrice float64 `json:"product_price"`
|
|
Profit float64 `json:"profit"`
|
|
CreatedAt sql.NullTime `json:"created_at"`
|
|
UpdatedAt sql.NullTime `json:"updated_at"`
|
|
}
|
|
|
|
type Supplier struct {
|
|
ID uuid.UUID `json:"id"`
|
|
IndexID int64 `json:"index_id"`
|
|
MerchantID uuid.UUID `json:"merchant_id"`
|
|
Name string `json:"name"`
|
|
Detail pqtype.NullRawMessage `json:"detail"`
|
|
CreatedAt sql.NullTime `json:"created_at"`
|
|
UpdatedAt sql.NullTime `json:"updated_at"`
|
|
}
|
|
|
|
type User struct {
|
|
ID uuid.UUID `json:"id"`
|
|
IndexID int64 `json:"index_id"`
|
|
Email string `json:"email"`
|
|
Password string `json:"password"`
|
|
Fullname sql.NullString `json:"fullname"`
|
|
CreatedAt sql.NullTime `json:"created_at"`
|
|
UpdatedAt sql.NullTime `json:"updated_at"`
|
|
}
|