Documentation
¶
Index ¶
- func RemoveDuplicates[T string | int | *Product](input []T) []T
- type BillingAddress
- type Customer
- type DeliveryAddress
- type Invoice
- type Login
- func (login *Login) ResetPassword(newPassword string, db *gorm.DB) error
- func (login *Login) Save(db *gorm.DB) error
- func (login *Login) SendDefaultPasswordEmail(password string, emailClient *service.EmailClient) error
- func (login *Login) SendLoginResetEmail(reset *LoginReset, emailClient *service.EmailClient) error
- type LoginReset
- type Note
- type Order
- type Position
- type Product
- type Role
- type Tel
- type User
- type UserSession
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RemoveDuplicates ¶
Types ¶
type BillingAddress ¶
type Customer ¶
type Customer struct { ID uint `gorm:"primarykey"` CreatedAt time.Time `gorm:"index"` UpdatedAt time.Time `gorm:"index"` Name string Gender string Orders []*Order BillingAddresses []*BillingAddress DeliveryAddresses []*DeliveryAddress Tels []*Tel CreatedByID uint CreatedBy *User Notes []*Note LoginId uint Login *Login }
func (*Customer) CreateLogin ¶
type DeliveryAddress ¶
type Invoice ¶
type Login ¶
type Login struct { ID uint `gorm:"primarykey"` CreatedAt time.Time `gorm:"index"` UpdatedAt time.Time `gorm:"index"` Password string Email string LastLogin time.Time LoginResets []*LoginReset Notes []*Note }
func (*Login) ResetPassword ¶
func (*Login) SendDefaultPasswordEmail ¶
func (login *Login) SendDefaultPasswordEmail(password string, emailClient *service.EmailClient) error
func (*Login) SendLoginResetEmail ¶
func (login *Login) SendLoginResetEmail(reset *LoginReset, emailClient *service.EmailClient) error
type LoginReset ¶
type Note ¶
type Note struct { ID uint `gorm:"primarykey"` CreatedAt time.Time `gorm:"index"` UpdatedAt time.Time `gorm:"index"` Title string Content string UserID uint CustomerID uint BillingAddressID uint DeliveryAddressID uint InvoiceID uint LoginID uint LoginResetID uint CreatedByID uint OrderID uint PositionID uint ProductID uint RoleID uint TelID uint CreatedBy *User }
type Order ¶
type Order struct { ID uint `gorm:"primarykey"` CreatedAt time.Time `gorm:"index"` UpdatedAt time.Time `gorm:"index"` Due time.Time PrintedAt time.Time PayedAt time.Time DoneAt time.Time CustomerID uint Customer *Customer BillingAddressID uint BillingAddress *BillingAddress DeliveryAddressID uint DeliveryAddress *DeliveryAddress Notes []*Note Invoices []*Invoice CreatedByID uint CreatedBy *User // contains filtered or unexported fields }
type Position ¶
type Product ¶
type Role ¶
type Tel ¶
type User ¶
type User struct { ID uint `gorm:"primarykey"` CreatedAt time.Time `gorm:"index"` UpdatedAt time.Time `gorm:"index"` Name string Username string Password string LastLogin time.Time Sessions []*UserSession Notes []*Note }
func (*User) CreateUserSession ¶
func (user *User) CreateUserSession(db *gorm.DB) (*UserSession, error)
func (*User) ResetPassword ¶
Click to show internal directories.
Click to hide internal directories.