Discover Packages
github.com/osodracnai/hackajur
internal
database
package
Version:
v0.0.0-...-391e2c1
Opens a new window with list of versions in this module.
Published: Sep 17, 2023
License: MIT
Opens a new window with license information.
Imports: 11
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Jump to ...
Documentation
Index
Constants
Variables
Functions
Types
type CollateralGurantee
type Comunication
type Correction
type DB
New(dsn, automigrate)
(db) GetUser(id)
(db) GetUserByEmail(email)
(db) InsertDebtor(fiscalDocument, name, email, typeOfDebtor, postalCode, city, uf, number, ...)
(db) InsertUser(email, hashedPassword)
(db) UpdateUserHashedPassword(id, hashedPassword)
type Debt
type Debtor
type Fee
type Interest
type OtherCharges
type Payments
type Propose
type Status
type User
Source Files
Documentation
Documentation
¶
type Comunication struct {
Name string `json:"name"`
Status bool `json:"status"`
}
type Correction struct {
Name string `json:"name"`
Value int `json:"value"`
CorrectionStatus string `json:"correctionStatus"`
}
func (db *DB ) InsertDebtor(fiscalDocument, name, email, typeOfDebtor, postalCode, city, uf, number, complement string ) (string , error )
type Debt struct {
Id string `json:"id"`
Debtor []Debtor `json:"debtor"`
Origin string `json:"origin"`
DocumentID string `json:"documentId"`
ExpirationDate time .Time `json:"expirationDate"`
OriginalValue int `json:"originalValue"`
Fee Fee `json:"fee"`
Interest Interest `json:"interest"`
OtherCharges []OtherCharges `json:"otherCharges"`
PresentValue int `json:"presentValue"`
Collateral []CollateralGurantee `json:"collateral"`
Correction Correction `json:"correction"`
}
type Debtor struct {
Id string `db:"id"`
FiscalDocument string `db:"fiscal_document"`
Name string `db:"name"`
Email string `db:"email"`
TypeOfDebtor string `db:"type_of_debtor"`
PostalCode string `db:"postal_code"`
City string `db:"city"`
Uf string `db:"uf"`
Street string `db:"street"`
Number string `db:"number"`
Complement string `db:"complement"`
}
type Fee struct {
Name string `json:"name"`
ChargerType string `json:"chargerType"`
Value int `json:"value"`
}
type Interest struct {
Name string `json:"name"`
ChargerType string `json:"chargerType"`
Value int `json:"value"`
}
type OtherCharges struct {
Name string `json:"name"`
ChargerType string `json:"chargerType"`
Value int `json:"value"`
}
type Payments struct {
Name string `json:"name"`
Status bool `json:"status"`
}
type Propose struct {
Id string `json:"id"`
Debt Debt `json:"debt"`
Date time .Time `json:"date"`
Status Status `json:"status"`
ProposeValue int `json:"proposeValue"`
ExpirationDate interface{} `json:"expirationDate"`
PaymentDeadline int `json:"paymentDeadline"`
Payments []Payments `json:"payments"`
Comunication []Comunication `json:"comunication"`
}
type Status struct {
UpdatedAt time .Time `json:"updatedAt"`
Situation string `json:"situation"`
}
type User struct {
ID int `db:"id"`
Created time .Time `db:"created"`
Email string `db:"email"`
HashedPassword string `db:"hashed_password"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.