add checkbox styling, driverslicence handling and validation
This commit is contained in:
@@ -8,10 +8,16 @@ import (
|
||||
type DriversLicenceInterface interface {
|
||||
FindCategoryByName(categoryName string) (models.LicenceCategory, error)
|
||||
FindCategoriesByIDs(ids []uint) ([]models.LicenceCategory, error)
|
||||
GetAllCategories() ([]models.LicenceCategory, error)
|
||||
}
|
||||
|
||||
type DriversLicenceRepository struct{}
|
||||
|
||||
func (r *DriversLicenceRepository) GetAllCategories() ([]models.LicenceCategory, error) {
|
||||
var categories []models.LicenceCategory
|
||||
err := database.DB.Find(&categories).Error
|
||||
return categories, err
|
||||
}
|
||||
func (r *DriversLicenceRepository) FindCategoriesByIDs(ids []uint) ([]models.LicenceCategory, error) {
|
||||
var categories []models.LicenceCategory
|
||||
err := database.DB.Where("id IN ?", ids).Find(&categories).Error
|
||||
|
||||
Reference in New Issue
Block a user