Documentation
¶
Index ¶
- Constants
- func AddAssistances(m *Assistances) (id int64, err error)
- func AddChecks(m *Checks) (id int64, err error)
- func AddCondos(m *Condos) (id int64, err error)
- func AddDeliveries(m *Deliveries) (id int64, err error)
- func AddGoals(m *Goals) (id int64, err error)
- func AddGoalsComments(m *GoalsComments) (id int64, err error)
- func AddHolidays(m *Holidays) (id int64, err error)
- func AddItems(m *Items) (id int64, err error)
- func AddManyOccurrences(occurrences []*Occurrences) (err error)
- func AddManyVerifications(verifications []*Verifications) (err error)
- func AddNotifications(m *Notifications) (id int64, err error)
- func AddObjects(m *Objects) (id int64, err error)
- func AddOccurrences(m *Occurrences) (id int64, err error)
- func AddPoints(m *Points) (id int64, err error)
- func AddQuestions(m *Questions) (id int64, err error)
- func AddQuestionsAttachments(m *QuestionsAttachments) (id int64, err error)
- func AddResidents(m *Residents) (id int64, err error)
- func AddSupervisors(m *Supervisors) (id int64, err error)
- func AddTasks(m *Tasks) (id int64, err error)
- func AddVerifications(m *Verifications) (id int64, err error)
- func AddVotes(m *Votes) (id int64, err error)
- func AddWatchers(m *Watchers) (id int64, err error)
- func AddWorkers(m *Workers) (id int64, err error)
- func AddZones(m *Zones) (id int64, err error)
- func DeleteAssistances(id int, trash bool) (err error)
- func DeleteChecks(id int, trash bool) (err error)
- func DeleteCondos(id int, trash bool) (err error)
- func DeleteDeliveries(id int, trash bool) (err error)
- func DeleteGoals(id int, trash bool) (err error)
- func DeleteGoalsComments(id int, trash bool) (err error)
- func DeleteHolidays(id int, trash bool) (err error)
- func DeleteItems(id int, trash bool) (err error)
- func DeleteNotifications(id int, trash bool) (err error)
- func DeleteObjects(id int, trash bool) (err error)
- func DeleteOccurrences(id int, trash bool) (err error)
- func DeletePoints(id int, trash bool) (err error)
- func DeleteQuestions(id int, trash bool) (err error)
- func DeleteQuestionsAttachments(id int, trash bool) (err error)
- func DeleteResidents(id int, trash bool) (err error)
- func DeleteSupervisors(id int, trash bool) (err error)
- func DeleteTasks(id int, trash bool) (err error)
- func DeleteVerifications(id int, trash bool) (err error)
- func DeleteVotes(id int, trash bool) (err error)
- func DeleteWatchers(id int, trash bool) (err error)
- func DeleteWorkers(id int, trash bool) (err error)
- func DeleteZones(id int, trash bool) (err error)
- func EmailExist(m *Residents) (res string, err error)
- func ExistHolidaysByCondoID(date string, condosID int) (ok bool, err error)
- func GetAllAssistances(query map[string]string, fields []string, sortby []string, order []string, ...) (ml []interface{}, err error)
- func GetAllChecks(query map[string]string, fields []string, sortby []string, order []string, ...) (ml []interface{}, err error)
- func GetAllCondos(query map[string]string, fields []string, sortby []string, order []string, ...) (ml []interface{}, err error)
- func GetAllHolidays(query map[string]string, fields []string, sortby []string, order []string, ...) (ml []interface{}, err error)
- func GetAllOccurrences(query map[string]string, fields []string, sortby []string, order []string, ...) (ml []interface{}, err error)
- func GetAllPoints(query map[string]string, fields []string, sortby []string, order []string, ...) (ml []interface{}, err error)
- func GetAllQuestions(query map[string]string, fields []string, sortby []string, order []string, ...) (ml []interface{}, err error)
- func GetAllQuestionsAttachments(query map[string]string, fields []string, sortby []string, order []string, ...) (ml []interface{}, err error)
- func GetAllResidents(query map[string]string, fields []string, sortby []string, order []string, ...) (ml []interface{}, err error)
- func GetAllSupervisors(query map[string]string, fields []string, sortby []string, order []string, ...) (ml []interface{}, err error)
- func GetAllVerifications(query map[string]string, fields []string, sortby []string, order []string, ...) (ml []interface{}, err error)
- func GetAllVotes(query map[string]string, fields []string, sortby []string, order []string, ...) (ml []interface{}, err error)
- func GetAllWatchers(query map[string]string, fields []string, sortby []string, order []string, ...) (ml []interface{}, err error)
- func GetAllWorkers(query map[string]string, fields []string, sortby []string, order []string, ...) (ml []interface{}, err error)
- func GetAllZones(query map[string]string, fields []string, sortby []string, order []string, ...) (ml []interface{}, err error)
- func GetHolidaysByCondosID(year int, month time.Month, condosID int) (holidays map[string]*Holidays, err error)
- func GetMD5Hash(text string) string
- func LoginResidents(m *Residents) (id int, err error)
- func LoginSupervisors(m *Supervisors) (id int, err error)
- func LoginWatchers(m *Watchers) (id int, err error)
- func NewArchive(event Event)
- func RestoreFromTrash(tableName string, id int) (err error)
- func SetStatus(m *Verifications) (res string, err error)
- func UpdateAssistancesByID(m *Assistances) (err error)
- func UpdateChecksByID(m *Checks) (err error)
- func UpdateCondosByID(m *Condos) (err error)
- func UpdateDeliveriesByID(m *Deliveries, ignoreStatus bool) (err error)
- func UpdateGoalsByID(m *Goals, ignoreStatus bool) (err error)
- func UpdateGoalsCommentsByID(m *GoalsComments) (err error)
- func UpdateHolidaysByID(m *Holidays) (err error)
- func UpdateItemsByID(m *Items, ignoreStatus bool) (err error)
- func UpdateNotificationsByID(m *Notifications) (err error)
- func UpdateObjectsByID(m *Objects, ignoreStatus bool) (err error)
- func UpdateOccurrencesByID(m *Occurrences) (err error)
- func UpdatePointsByID(m *Points) (err error)
- func UpdateQuestionsAttachmentsByID(m *QuestionsAttachments) (err error)
- func UpdateQuestionsByID(m *Questions) (err error)
- func UpdateResidentsByID(m *Residents) (err error)
- func UpdateSupervisorsByID(m *Supervisors) (err error)
- func UpdateTasksByID(m *Tasks, ignoreStatus bool) (err error)
- func UpdateVerificationsByID(m *Verifications) (err error)
- func UpdateVotesByID(m *Votes) (err error)
- func UpdateWatchersByID(m *Watchers) (err error)
- func UpdateWorkersByID(m *Workers) (err error)
- func UpdateZonesByID(m *Zones) (err error)
- func ValidateExists(modelName string, id int) (exists bool)
- type Assistances
- type Checks
- type Condos
- type Deliveries
- type EmptyAssistancesWorkers
- type Event
- type EventType
- type Goals
- type GoalsComments
- type Holidays
- type Items
- type Notifications
- type Objects
- type Occurrences
- type Points
- type Questions
- type QuestionsAttachments
- type Residents
- type Supervisors
- func GetSupervisorsByCondosID(condosID int) (supervisors []*Supervisors, err error)
- func GetSupervisorsByID(id int) (v *Supervisors, err error)
- func GetSupervisorsByUsername(username string) (v *Supervisors, err error)
- func GetSupervisorsByWorkersID(workerID int) (v *Supervisors, err error)
- func GetSupervisorsFromTrash() (supervisors []*Supervisors, err error)
- type Tasks
- type Verifications
- func GetCondosVerificationsByMonth(condosID int, year int, month time.Month) (Verifications []*Verifications, err error)
- func GetVerificationsByID(id int) (v *Verifications, err error)
- func GetVerificationsFromTrash() (verifications []*Verifications, err error)
- func GetWatchersVerificationsByMonth(watchersID int, year int, month time.Month) (Verifications []*Verifications, err error)
- type Votes
- type Watchers
- func GetWatchersByCondosID(condosID int) (watchers []*Watchers, err error)
- func GetWatchersByID(id int) (v *Watchers, err error)
- func GetWatchersByUsername(username string) (v *Watchers, err error)
- func GetWatchersByWorkersID(workerID int) (v *Watchers, err error)
- func GetWatchersFromTrash() (watchers []*Watchers, err error)
- type Workers
- type Zones
Constants ¶
const ( EventJoin = iota EventLeave EventMessage )
Variables ¶
This section is empty.
Functions ¶
func AddAssistances ¶
func AddAssistances(m *Assistances) (id int64, err error)
AddAssistances insert a new Assistances into database and returns last inserted Id on success.
func AddChecks ¶
AddChecks insert a new Checks into database and returns last inserted Id on success.
func AddCondos ¶
AddCondos insert a new Condos into database and returns last inserted Id on success.
func AddDeliveries ¶
func AddDeliveries(m *Deliveries) (id int64, err error)
AddDeliveries insert a new Tasks into database and returns last inserted Id on success.
func AddGoalsComments ¶
func AddGoalsComments(m *GoalsComments) (id int64, err error)
AddGoalsComments insert a new GoalsComments into database and returns last inserted Id on success.
func AddHolidays ¶
AddHolidays insert a new Holidays into database and returns last inserted Id on success.
func AddManyOccurrences ¶
func AddManyOccurrences(occurrences []*Occurrences) (err error)
AddManyOccurrences ...
func AddManyVerifications ¶
func AddManyVerifications(verifications []*Verifications) (err error)
AddManyVerifications ...
func AddNotifications ¶
func AddNotifications(m *Notifications) (id int64, err error)
AddNotifications insert a new Notifications into database and returns last inserted Id on success.
func AddObjects ¶
AddObjects insert a new Tasks into database and returns last inserted Id on success.
func AddOccurrences ¶
func AddOccurrences(m *Occurrences) (id int64, err error)
AddOccurrences insert a new Occurrences into database and returns last inserted Id on success.
func AddPoints ¶
AddPoints insert a new Points into database and returns last inserted Id on success.
func AddQuestions ¶
AddQuestions insert a new Questions into database and returns last inserted Id on success.
func AddQuestionsAttachments ¶
func AddQuestionsAttachments(m *QuestionsAttachments) (id int64, err error)
AddQuestionsAttachments insert a new QuestionsAttachments into database and returns last inserted Id on success.
func AddResidents ¶
AddResidents insert a new Residents into database and returns last inserted Id on success.
func AddSupervisors ¶
func AddSupervisors(m *Supervisors) (id int64, err error)
AddSupervisors insert a new Supervisors into database and returns last inserted Id on success.
func AddVerifications ¶
func AddVerifications(m *Verifications) (id int64, err error)
AddVerifications insert a new Verifications into database and returns last inserted Id on success.
func AddWatchers ¶
AddWatchers insert a new Watchers into database and returns last inserted Id on success.
func AddWorkers ¶
AddWorkers insert a new Workers into database and returns last inserted Id on success.
func DeleteAssistances ¶
DeleteAssistances deletes Assistances by Id and returns error if the record to be deleted doesn't exist
func DeleteChecks ¶
DeleteChecks deletes Checks by Id and returns error if the record to be deleted doesn't exist
func DeleteCondos ¶
DeleteCondos deletes Condos by Id and returns error if the record to be deleted doesn't exist
func DeleteDeliveries ¶
DeleteDeliveries deletes Deliveries by Id and returns error if the record to be deleted doesn't exist
func DeleteGoals ¶
DeleteGoals deletes Goals by Id and returns error if the record to be deleted doesn't exist
func DeleteGoalsComments ¶
DeleteGoalsComments deletes GoalsComments by Id and returns error if the record to be deleted doesn't exist
func DeleteHolidays ¶
DeleteHolidays deletes Holidays by Id and returns error if the record to be deleted doesn't exist
func DeleteItems ¶
DeleteItems deletes Items by Id and returns error if the record to be deleted doesn't exist
func DeleteNotifications ¶
DeleteNotifications deletes Notifications by Id and returns error if the record to be deleted doesn't exist
func DeleteObjects ¶
DeleteObjects deletes Objects by Id and returns error if the record to be deleted doesn't exist
func DeleteOccurrences ¶
DeleteOccurrences deletes Occurrences by Id and returns error if the record to be deleted doesn't exist
func DeletePoints ¶
DeletePoints deletes Points by Id and returns error if the record to be deleted doesn't exist
func DeleteQuestions ¶
DeleteQuestions deletes Questions by Id and returns error if the record to be deleted doesn't exist
func DeleteQuestionsAttachments ¶
DeleteQuestionsAttachments deletes QuestionsAttachments by Id and returns error if the record to be deleted doesn't exist
func DeleteResidents ¶
DeleteResidents deletes Residents by Id and returns error if the record to be deleted doesn't exist
func DeleteSupervisors ¶
DeleteSupervisors deletes Supervisors by Id and returns error if the record to be deleted doesn't exist
func DeleteTasks ¶
DeleteTasks deletes Tasks by Id and returns error if the record to be deleted doesn't exist
func DeleteVerifications ¶
DeleteVerifications deletes Verifications by Id and returns error if the record to be deleted doesn't exist
func DeleteVotes ¶
DeleteVotes deletes Votes by Id and returns error if the record to be deleted doesn't exist
func DeleteWatchers ¶
DeleteWatchers deletes Watchers by Id and returns error if the record to be deleted doesn't exist
func DeleteWorkers ¶
DeleteWorkers deletes Workers by Id and returns error if the record to be deleted doesn't exist
func DeleteZones ¶
DeleteZones deletes Zones by Id and returns error if the record to be deleted doesn't exist
func EmailExist ¶
EmailExist verify if email exist into database and returns last inserted Id on success.
func ExistHolidaysByCondoID ¶
ExistHolidaysByCondoID ...
func GetAllAssistances ¶
func GetAllAssistances(query map[string]string, fields []string, sortby []string, order []string, offset int64, limit int64) (ml []interface{}, err error)
GetAllAssistances retrieves all Assistances matches certain condition. Returns empty list if no records exist
func GetAllChecks ¶
func GetAllChecks(query map[string]string, fields []string, sortby []string, order []string, offset int64, limit int64) (ml []interface{}, err error)
GetAllChecks retrieves all Checks matches certain condition. Returns empty list if no records exist
func GetAllCondos ¶
func GetAllCondos(query map[string]string, fields []string, sortby []string, order []string, offset int64, limit int64) (ml []interface{}, err error)
GetAllCondos retrieves all Condos matches certain condition. Returns empty list if no records exist
func GetAllHolidays ¶
func GetAllHolidays(query map[string]string, fields []string, sortby []string, order []string, offset int64, limit int64) (ml []interface{}, err error)
GetAllHolidays retrieves all Holidays matches certain condition. Returns empty list if no records exist
func GetAllOccurrences ¶
func GetAllOccurrences(query map[string]string, fields []string, sortby []string, order []string, offset int64, limit int64) (ml []interface{}, err error)
GetAllOccurrences retrieves all Occurrences matches certain condition. Returns empty list if no records exist
func GetAllPoints ¶
func GetAllPoints(query map[string]string, fields []string, sortby []string, order []string, offset int64, limit int64) (ml []interface{}, err error)
GetAllPoints retrieves all Points matches certain condition. Returns empty list if no records exist
func GetAllQuestions ¶
func GetAllQuestions(query map[string]string, fields []string, sortby []string, order []string, offset int64, limit int64) (ml []interface{}, err error)
GetAllQuestions retrieves all Questions matches certain condition. Returns empty list if no records exist
func GetAllQuestionsAttachments ¶
func GetAllQuestionsAttachments(query map[string]string, fields []string, sortby []string, order []string, offset int64, limit int64) (ml []interface{}, err error)
GetAllQuestionsAttachments retrieves all QuestionsAttachments matches certain condition. Returns empty list if no records exist
func GetAllResidents ¶
func GetAllResidents(query map[string]string, fields []string, sortby []string, order []string, offset int64, limit int64) (ml []interface{}, err error)
GetAllResidents retrieves all Residents matches certain condition. Returns empty list if no records exist
func GetAllSupervisors ¶
func GetAllSupervisors(query map[string]string, fields []string, sortby []string, order []string, offset int64, limit int64) (ml []interface{}, err error)
GetAllSupervisors retrieves all Supervisors matches certain condition. Returns empty list if no records exist
func GetAllVerifications ¶
func GetAllVerifications(query map[string]string, fields []string, sortby []string, order []string, offset int64, limit int64) (ml []interface{}, err error)
GetAllVerifications retrieves all Verifications matches certain condition. Returns empty list if no records exist
func GetAllVotes ¶
func GetAllVotes(query map[string]string, fields []string, sortby []string, order []string, offset int64, limit int64) (ml []interface{}, err error)
GetAllVotes retrieves all Votes matches certain condition. Returns empty list if no records exist
func GetAllWatchers ¶
func GetAllWatchers(query map[string]string, fields []string, sortby []string, order []string, offset int64, limit int64) (ml []interface{}, err error)
GetAllWatchers retrieves all Watchers matches certain condition. Returns empty list if no records exist
func GetAllWorkers ¶
func GetAllWorkers(query map[string]string, fields []string, sortby []string, order []string, offset int64, limit int64) (ml []interface{}, err error)
GetAllWorkers retrieves all Workers matches certain condition. Returns empty list if no records exist
func GetAllZones ¶
func GetAllZones(query map[string]string, fields []string, sortby []string, order []string, offset int64, limit int64) (ml []interface{}, err error)
GetAllZones retrieves all Zones matches certain condition. Returns empty list if no records exist
func GetHolidaysByCondosID ¶
func GetHolidaysByCondosID(year int, month time.Month, condosID int) (holidays map[string]*Holidays, err error)
GetHolidaysByCondosID ..
func LoginResidents ¶
LoginResidents login a Residents, returns if Exists.
func LoginSupervisors ¶
func LoginSupervisors(m *Supervisors) (id int, err error)
LoginSupervisors login a Supervisors, returns if Exists.
func LoginWatchers ¶
LoginWatchers login a Watchers, returns if Exists.
func RestoreFromTrash ¶
RestoreFromTrash ...
func SetStatus ¶
func SetStatus(m *Verifications) (res string, err error)
SetStatus set viewed to true last inserted Id on success.
func UpdateAssistancesByID ¶
func UpdateAssistancesByID(m *Assistances) (err error)
UpdateAssistancesByID updates Assistances by Id and returns error if the record to be updated doesn't exist
func UpdateChecksByID ¶
UpdateChecksByID updates Checks by Id and returns error if the record to be updated doesn't exist
func UpdateCondosByID ¶
UpdateCondosByID updates Condos by Id and returns error if the record to be updated doesn't exist
func UpdateDeliveriesByID ¶
func UpdateDeliveriesByID(m *Deliveries, ignoreStatus bool) (err error)
UpdateDeliveriesByID updates deliveries by Id and returns error if the record to be updated doesn't exist
func UpdateGoalsByID ¶
UpdateGoalsByID updates Points by Id and returns error if the record to be updated doesn't exist
func UpdateGoalsCommentsByID ¶
func UpdateGoalsCommentsByID(m *GoalsComments) (err error)
UpdateGoalsCommentsByID updates Points by Id and returns error if the record to be updated doesn't exist
func UpdateHolidaysByID ¶
UpdateHolidaysByID updates Holidays by Id and returns error if the record to be updated doesn't exist
func UpdateItemsByID ¶
UpdateItemsByID updates Items by Id and returns error if the record to be updated doesn't exist
func UpdateNotificationsByID ¶
func UpdateNotificationsByID(m *Notifications) (err error)
UpdateNotificationsByID updates Notifications by Id and returns error if the record to be updated doesn't exist
func UpdateObjectsByID ¶
UpdateObjectsByID updates Objects by Id and returns error if the record to be updated doesn't exist
func UpdateOccurrencesByID ¶
func UpdateOccurrencesByID(m *Occurrences) (err error)
UpdateOccurrencesByID updates Occurrences by Id and returns error if the record to be updated doesn't exist
func UpdatePointsByID ¶
UpdatePointsByID updates Points by Id and returns error if the record to be updated doesn't exist
func UpdateQuestionsAttachmentsByID ¶
func UpdateQuestionsAttachmentsByID(m *QuestionsAttachments) (err error)
UpdateQuestionsAttachmentsByID updates QuestionsAttachments by Id and returns error if the record to be updated doesn't exist
func UpdateQuestionsByID ¶
UpdateQuestionsByID updates Questions by Id and returns error if the record to be updated doesn't exist
func UpdateResidentsByID ¶
UpdateResidentsByID updates Residents by Id and returns error if the record to be updated doesn't exist
func UpdateSupervisorsByID ¶
func UpdateSupervisorsByID(m *Supervisors) (err error)
UpdateSupervisorsByID updates Supervisors by Id and returns error if the record to be updated doesn't exist
func UpdateTasksByID ¶
UpdateTasksByID updates Points by Id and returns error if the record to be updated doesn't exist
func UpdateVerificationsByID ¶
func UpdateVerificationsByID(m *Verifications) (err error)
UpdateVerificationsByID updates Verifications by Id and returns error if the record to be updated doesn't exist
func UpdateVotesByID ¶
UpdateVotesByID updates Votes by Id and returns error if the record to be updated doesn't exist
func UpdateWatchersByID ¶
UpdateWatchersByID updates Watchers by Id and returns error if the record to be updated doesn't exist
func UpdateWorkersByID ¶
UpdateWorkersByID updates Workers by Id and returns error if the record to be updated doesn't exist
func UpdateZonesByID ¶
UpdateZonesByID updates Zones by Id and returns error if the record to be updated doesn't exist
Types ¶
type Assistances ¶
type Assistances struct {
ID int `orm:"column(id);pk" json:"id,omitempty"`
Date string `orm:"column(date);type(datetime);" json:"date,omitempty" validate:"required"`
Type string `orm:"column(type)" json:"type,omitempty" validate:"required,alpha"`
Longitude string `orm:"column(longitude)" json:"longitude,omitempty" validate:"required"`
Latitude string `orm:"column(latitude)" json:"latitude,omitempty" validate:"required"`
WorkTimeID int `orm:"column(work_time_id);null" json:"work_time_id"`
Worker *Workers `orm:"rel(fk);column(workers_id)" json:"workers,omitempty"`
Watcher *Watchers `orm:"rel(fk);column(watchers_id)" json:"watchers,omitempty"`
Day string `orm:"-" json:"day,omitempty"`
Token string `orm:"-" json:"token,omitempty"`
CreatedAt time.Time `orm:"column(created_at);type(datetime);null;auto_now_add" json:"-"`
UpdatedAt time.Time `orm:"column(updated_at);type(datetime);null" json:"-"`
DeletedAt time.Time `orm:"column(deleted_at);type(datetime);null" json:"-"`
}
Assistances Model
func GetAssistancesByID ¶
func GetAssistancesByID(id int) (v *Assistances, err error)
GetAssistancesByID retrieves Assistances by Id. Returns error if Id doesn't exist
func GetAssistancesFromTrash ¶
func GetAssistancesFromTrash() (assistances []*Assistances, err error)
GetAssistancesFromTrash return Assistances soft Deleted
type Checks ¶
type Checks struct {
ID int `orm:"column(id);pk" json:"id,omitempty"`
Date string `orm:"column(date);type(datetime);" json:"date,omitempty" valid:"Required"`
Comment string `orm:"column(comment);null" json:"comment,omitempty"`
Worker *Workers `orm:"rel(fk);column(workers_id)" json:"workers,omitempty"`
Occurrences []*Occurrences `orm:"reverse(many);" json:"occurrences,omitempty"`
CreatedAt time.Time `orm:"column(created_at);type(datetime);null;auto_now_add" json:"-"`
UpdatedAt time.Time `orm:"column(updated_at);type(datetime);null" json:"-"`
DeletedAt time.Time `orm:"column(deleted_at);type(datetime);null" json:"-"`
}
Checks Model
func GetChecksByID ¶
GetChecksByID retrieves Checks by Id. Returns error if Id doesn't exist
func GetChecksFromTrash ¶
GetChecksFromTrash return Checks soft Deleted
func GetCondosChecksByDate ¶
GetCondosChecksByDate ...
func GetCondosChecksByMonth ¶
GetCondosChecksByMonth ...
type Condos ¶
type Condos struct {
ID int `orm:"column(id);pk" json:"id"`
Name string `orm:"column(name);size(255)" json:"name,omitempty" valid:"Required"`
RUT string `orm:"column(rut);size(255)" json:"rut" valid:"Required"`
UserLimit int `orm:"column(user_limit);size(255)" json:"user_limit" valid:"Required"`
ZoneLimit int `orm:"column(zone_limit);size(255)" json:"zone_limit" valid:"Required"`
HourValue float32 `orm:"colum(hour_value);size(20)" json:"hour_value" valid:"Required"`
ExtraHourIncrease float32 `orm:"colum(extra_hour_increase);size(20)" json:"extra_hour_increase" valid:"Required"`
WorkingHours int `orm:"column(working_hours)" json:"working_hours" valid:"Required"`
AssistancesMod bool `orm:"column(assistances_mod)" json:"assistances_mod" valid:"Required"`
RoutesMod bool `orm:"column(routes_mod)" json:"routes_mod" valid:"Required"`
DeliveryMod bool `orm:"column(delivery_mod)" json:"delivery_mod" valid:"Required"`
TasksMod bool `orm:"column(tasks_mod)" json:"tasks_mod" valid:"Required"`
ChecksMod bool `orm:"column(checks_mod)" json:"checks_mod" valid:"Required"`
SurveysMod bool `orm:"column(surveys_mod)" json:"surveys_mod" valid:"Required"`
AlertsTime string `orm:"column(alerts_time);type(alerts_time);null" json:"alerts_time,omitempty"`
Zones []*Zones `orm:"reverse(many)" json:"zone,omitempty"`
Workers []*Workers `orm:"reverse(many)" json:"workers,omitempty"`
Holidays []*Holidays `orm:"reverse(many)" json:"holidays,omitempty"`
Objects []*Objects `orm:"reverse(many)" json:"objects,omitempty"`
Residents []*Residents `orm:"reverse(many)" json:"residents,omitempty"`
Questions []*Questions `orm:"reverse(many)" json:"questions,omitempty"`
Watchers []*Watchers `orm:"-" json:"watchers,omitempty"`
Supervisors []*Supervisors `orm:"-" json:"supervisors,omitempty"`
CreatedAt time.Time `orm:"column(created_at);type(datetime);null;auto_now_add" json:"-"`
UpdatedAt time.Time `orm:"column(updated_at);type(datetime);null" json:"-"`
DeletedAt time.Time `orm:"column(deleted_at);type(datetime);null" json:"-"`
}
Condos Model
func GetCondosByID ¶
GetCondosByID retrieves Condos by Id. Returns error if Id doesn't exist
func GetCondosFromTrash ¶
GetCondosFromTrash return Condos soft Deleted
func GetCondosWithoutLimit ¶
type Deliveries ¶
type Deliveries struct {
ID int `orm:"column(id);pk" json:"id"`
Name string `orm:"column(name);" json:"name,omitempty" valid:"Required"`
Approved bool `orm:"column(approved);" json:"approved"`
Date string `orm:"column(date);auto_now_add;type(datetime);" json:"date,omitempty"`
Worker *Workers `orm:"column(worker_id);rel(fk);" json:"worker,omitempty"`
Items []*Items `orm:"reverse(many);" json:"items,omitempty"`
CreatedAt time.Time `orm:"column(created_at);type(datetime);null;auto_now_add" json:"-"`
UpdatedAt time.Time `orm:"column(updated_at);type(datetime);null" json:"-"`
DeletedAt time.Time `orm:"column(deleted_at);type(datetime);null" json:"-"`
}
Deliveries Model
func GetDeliveriesByID ¶
func GetDeliveriesByID(id int) (v *Deliveries, err error)
GetDeliveriesByID retrieves deliveries by Id. Returns error if Id doesn't exist
func GetDeliveriesByWorkersID ¶
func GetDeliveriesByWorkersID(workerID int) (deliveries []*Deliveries, err error)
GetDeliveriesByWorkersID ...
func GetDeliveriesFromTrash ¶
func GetDeliveriesFromTrash() (deliveries []*Deliveries, err error)
GetDeliveriesFromTrash return Points soft Deleted
type EmptyAssistancesWorkers ¶
type EmptyAssistancesWorkers struct {
Entry []*Workers `json:"entry,omitempty"`
Break []*Workers `json:"break,omitempty"`
FinishBreak []*Workers `json:"finish_break,omitempty"`
Exit []*Workers `json:"exit,omitempty"`
}
EmptyAssistancesWorkers ...
func GetCondosWorkersEmptyAssistancesByDate ¶
func GetCondosWorkersEmptyAssistancesByDate(condosID int, date time.Time) (emptyAssistancesWorkers *EmptyAssistancesWorkers, err error)
GetCondosWorkersEmptyAssistancesByDate ...
type Event ¶
type Goals ¶
type Goals struct {
ID int `orm:"column(id);pk" json:"id"`
Name string `orm:"column(name);" json:"name,omitempty" valid:"Required"`
Description string `orm:"column(description);" json:"description,omitempty"`
Completed bool `orm:"column(completed);" json:"completed" valid:"Required"`
Date string `orm:"column(date);type(datetime);" json:"date,omitempty"`
DateEnd string `orm:"column(date_end);" json:"date_end,omitempty"`
Task *Tasks `orm:"column(task_id);rel(fk);" json:"task,omitempty"`
GoalsComments []*GoalsComments `orm:"reverse(many);" json:"comments,omitempty"`
Token string `orm:"-" json:"token,omitempty"`
CreatedAt time.Time `orm:"column(created_at);type(datetime);null;auto_now_add" json:"-"`
UpdatedAt time.Time `orm:"column(updated_at);type(datetime);null" json:"-"`
DeletedAt time.Time `orm:"column(deleted_at);type(datetime);null" json:"-"`
}
Goals Model
func GetGoalsByID ¶
GetGoalsByID retrieves Points by Id. Returns error if Id doesn't exist
func GetGoalsFromTrash ¶
GetGoalsFromTrash return Points soft Deleted
type GoalsComments ¶
type GoalsComments struct {
ID int `orm:"column(id);pk" json:"id"`
Description string `orm:"column(description);null" json:"description,omitempty" valid:"Required"`
Date string `orm:"column(date);type(datetime);" json:"date,omitempty"`
Goal *Goals `orm:"column(goal_id);rel(fk);" json:"goal,omitempty"`
Worker *Workers `orm:"column(worker_id);rel(fk);" json:"worker,omitempty"`
Attachment string `orm:"column(attachment);null" json:"attachment,omitempty" `
AttachmentMime string `orm:"column(attachment_mime);null" json:"attachment_mime,omitempty"`
CreatedAt time.Time `orm:"column(created_at);type(datetime);null;auto_now_add" json:"-"`
UpdatedAt time.Time `orm:"column(updated_at);type(datetime);null" json:"-"`
DeletedAt time.Time `orm:"column(deleted_at);type(datetime);null" json:"-"`
}
GoalsComments Model
func GetGoalsCommentsByID ¶
func GetGoalsCommentsByID(id int) (v *GoalsComments, err error)
GetGoalsCommentsByID retrieves Points by Id. Returns error if Id doesn't exist
func GetGoalsCommentsFromTrash ¶
func GetGoalsCommentsFromTrash() (goalsComments []*GoalsComments, err error)
GetGoalsCommentsFromTrash return Points soft Deleted
type Holidays ¶
type Holidays struct {
ID int `orm:"column(id);pk" json:"id"`
Date string `orm:"column(date);type(date)" json:"date,omitempty" valid:"Required"`
Condo *Condos `orm:"rel(fk);column(condos_id)" json:"condos,omitempty"`
CreatedAt time.Time `orm:"column(created_at);type(datetime);null;auto_now_add" json:"-"`
UpdatedAt time.Time `orm:"column(updated_at);type(datetime);null" json:"-"`
DeletedAt time.Time `orm:"column(deleted_at);type(datetime);null" json:"-"`
}
Holidays Model
func GetHolidaysByID ¶
GetHolidaysByID retrieves Holidays by Id. Returns error if Id doesn't exist
func GetHolidaysFromTrash ¶
GetHolidaysFromTrash return Holidays soft Deleted
type Items ¶
type Items struct {
ID int `orm:"column(id);pk" json:"id"`
Address string `orm:"column(address);" json:"address,omitempty" valid:"Required"`
Description string `orm:"column(description);" json:"description,omitempty" valid:"Required"`
Street_number string `orm:"column(street_number);" json:"street_number,omitempty" `
Office_department string `orm:"column(office_department);" json:"office_department,omitempty" `
Addressee string `orm:"column(addressee);" json:"addressee,omitempty" `
Code string `orm:"column(code);" json:"code,omitempty" `
Delivered bool `orm:"column(delivered);" json:"delivered" `
DateEnd string `orm:"column(date_end);type(string);" json:"date_end,omitempty"`
Comment string `orm:"column(comment);null" json:"comment,omitempty"`
ImageUUID string `orm:"column(image_uuid);null" json:"image_uuid,omitempty"`
ImageMime string `orm:"column(image_mime);null" json:"image_mime,omitempty"`
Delivery *Deliveries `orm:"rel(fk);column(delivery_id)" json:"delivery,omitempty"`
Token string `orm:"-" json:"token,omitempty"`
CreatedAt time.Time `orm:"column(created_at);type(datetime);null;auto_now_add" json:"-"`
UpdatedAt time.Time `orm:"column(updated_at);type(datetime);null" json:"-"`
DeletedAt time.Time `orm:"column(deleted_at);type(datetime);null" json:"-"`
}
Items ...
func GetItemsByID ¶
GetItemsByID retrieves Items by Id. Returns error if Id doesn't exist
func GetItemsFromTrash ¶
GetItemsFromTrash return Points soft Deleted
type Notifications ¶
type Notifications struct {
ID int `orm:"column(id);pk" json:"id"`
Name string `orm:"column(name);" json:"name,omitempty" valid:"Required"`
Description string `orm:"column(description);" json:"description,omitempty" valid:"Required"`
Approved bool `orm:"column(approved);" json:"approved"`
View bool `orm:"column(view);" json:"view"`
Date string `orm:"column(date);type(string);" json:"date,omitempty"`
ImageUUID string `orm:"column(image_uuid);null" json:"image_uuid,omitempty"`
ImageMime string `orm:"column(image_mime);null" json:"image_mime,omitempty"`
Worker *Workers `orm:"rel(fk);column(worker_id)" json:"worker,omitempty"`
CreatedAt time.Time `orm:"column(created_at);type(datetime);null;auto_now_add" json:"-"`
UpdatedAt time.Time `orm:"column(updated_at);type(datetime);null" json:"-"`
DeletedAt time.Time `orm:"column(deleted_at);type(datetime);null" json:"-"`
}
Notifications ...
func GetNotificationsByCondosID ¶
func GetNotificationsByCondosID(condosID int) (notifications []*Notifications, err error)
GetNotificationsByCondosID return Supervisors soft Deleted
func GetNotificationsByID ¶
func GetNotificationsByID(id int) (v *Notifications, err error)
GetNotificationsByID retrieves Notifications by Id. Returns error if Id doesn't exist
func GetNotificationsFromTrash ¶
func GetNotificationsFromTrash() (notifications []*Notifications, err error)
GetNotificationsFromTrash return Notifications soft Deleted
type Objects ¶
type Objects struct {
ID int `orm:"column(id);pk" json:"id"`
Name string `orm:"column(name);" json:"name,omitempty" valid:"Required"`
Code string `orm:"column(code);" json:"code,omitempty" valid:"Required"`
Quantity int `orm:"column(quantity);" json:"quantity,omitempty" valid:"Required"`
Condo *Condos `orm:"rel(fk);column(condos_id)" json:"condos,omitempty"`
Occurrences []*Occurrences `orm:"reverse(many);" json:"occurrences,omitempty"`
CreatedAt time.Time `orm:"column(created_at);type(datetime);null;auto_now_add" json:"-"`
UpdatedAt time.Time `orm:"column(updated_at);type(datetime);null" json:"-"`
DeletedAt time.Time `orm:"column(deleted_at);type(datetime);null" json:"-"`
}
Objects ...
func GetObjectsByID ¶
GetObjectsByID retrieves Objects by Id. Returns error if Id doesn't exist
func GetObjectsFromTrash ¶
GetObjectsFromTrash return Points soft Deleted
type Occurrences ¶
type Occurrences struct {
ID int `orm:"column(id);pk" json:"id,omitempty"`
Comment string `orm:"column(comment);" json:"comment,omitempty" valid:"Required"`
ImageUUID string `orm:"column(image_uuid);" json:"image_uuid,omitempty"`
ImageMime string `orm:"column(image_mime);" json:"image_mime,omitempty"`
Object *Objects `orm:"rel(fk);column(objects_id)" json:"objects,omitempty"`
Check *Checks `orm:"rel(fk);column(checks_id)" json:"checks,omitempty"`
CreatedAt time.Time `orm:"column(created_at);type(datetime);null;auto_now_add" json:"-"`
UpdatedAt time.Time `orm:"column(updated_at);type(datetime);null" json:"-"`
DeletedAt time.Time `orm:"column(deleted_at);type(datetime);null" json:"-"`
}
Occurrences Model
func GetOccurrencesByID ¶
func GetOccurrencesByID(id int) (v *Occurrences, err error)
GetOccurrencesByID retrieves Occurrences by Id. Returns error if Id doesn't exist
func GetOccurrencesFromTrash ¶
func GetOccurrencesFromTrash() (occurrences []*Occurrences, err error)
GetOccurrencesFromTrash return Occurrences soft Deleted
type Points ¶
type Points struct {
ID int `orm:"column(id);pk" json:"id"`
Name string `orm:"column(name);size(255)" json:"name,omitempty" valid:"Required"`
Zone *Zones `orm:"rel(fk);column(zones_id)" json:"zones,omitempty"`
Verifications []*Verifications `orm:"reverse(many);" json:"verifications,omitempty"`
CreatedAt time.Time `orm:"column(created_at);type(datetime);null;auto_now_add" json:"-"`
UpdatedAt time.Time `orm:"column(updated_at);type(datetime);null" json:"-"`
DeletedAt time.Time `orm:"column(deleted_at);type(datetime);null" json:"-"`
}
Points Model
func GetPointsByID ¶
GetPointsByID retrieves Points by Id. Returns error if Id doesn't exist
func GetPointsFromTrash ¶
GetPointsFromTrash return Points soft Deleted
type Questions ¶
type Questions struct {
ID int `orm:"column(id);pk" json:"id"`
Label string `orm:"column(label);" json:"label,omitempty"`
Date string `orm:"column(date);type(datetime);" json:"date,omitempty"`
DateEnd string `orm:"column(date_end);" json:"date_end,omitempty"`
Approved bool `orm:"column(approved);" json:"approved,omitempty" `
Description string `orm:"column(description);" json:"description,omitempty"`
CommitteeOnly bool `orm:"column(committee_only);" json:"committee_only,omitempty"`
Price float32 `orm:"column(price);null" json:"price,omitempty"`
Condo *Condos `orm:"rel(fk);column(condos_id)" json:"condos,omitempty"`
Votes []*Votes `orm:"reverse(many)" json:"votes,omitempty"`
QuestionsAttachments []*QuestionsAttachments `orm:"reverse(many)" json:"attachments,omitempty"`
CreatedAt time.Time `orm:"column(created_at);type(datetime);null;auto_now_add" json:"-"`
UpdatedAt time.Time `orm:"column(updated_at);type(datetime);null" json:"-"`
DeletedAt time.Time `orm:"column(deleted_at);type(datetime);null" json:"-"`
}
Questions Model
func GetQuestionsByCondosID ¶
GetQuestionsByCondosID return Questions by condo's id
func GetQuestionsByID ¶
GetQuestionsByID retrieves Questions by Id. Returns error if Id doesn't exist
func GetQuestionsFromTrash ¶
GetQuestionsFromTrash return Questions soft Deleted
type QuestionsAttachments ¶
type QuestionsAttachments struct {
ID int `orm:"column(id);pk" json:"id"`
Name string `orm:"column(name);" json:"name,omitempty" valid:"Required"`
AttachmentUUID string `orm:"column(attachment_uuid);" json:"attachment_uuid,omitempty"`
AttachmentMime string `orm:"column(attachment_mime);" json:"attachment_mime,omitempty"`
Question *Questions `orm:"rel(fk);column(questions_id)" json:"questions,omitempty"`
CreatedAt time.Time `orm:"column(created_at);type(datetime);null;auto_now_add" json:"-"`
UpdatedAt time.Time `orm:"column(updated_at);type(datetime);null" json:"-"`
DeletedAt time.Time `orm:"column(deleted_at);type(datetime);null" json:"-"`
}
QuestionsAttachments Model
func GetQuestionsAttachmentsByID ¶
func GetQuestionsAttachmentsByID(id int) (v *QuestionsAttachments, err error)
GetQuestionsAttachmentsByID retrieves QuestionsAttachments by Id. Returns error if Id doesn't exist
func GetQuestionsAttachmentsFromTrash ¶
func GetQuestionsAttachmentsFromTrash() (questionsAttachments []*QuestionsAttachments, err error)
GetQuestionsAttachmentsFromTrash return QuestionsAttachments soft Deleted
func (*QuestionsAttachments) TableName ¶
func (t *QuestionsAttachments) TableName() string
TableName =
type Residents ¶
type Residents struct {
ID int `orm:"column(id);pk" json:"id"`
Name string `orm:"column(name);size(255)" json:"name,omitempty" valid:"Required"`
Condo *Condos `orm:"rel(fk);column(condos_id)" json:"condos,omitempty"`
Email string `orm:"column(email);size(255)" json:"email,omitempty" valid:"Required"`
Phone string `orm:"column(phone);size(255)" json:"phone,omitempty"`
Committee bool `orm:"column(committee);" json:"committee,omitempty"`
RUT string `orm:"column(rut);" json:"rut,omitempty"`
Password string `orm:"column(password);size(255)" json:"password,omitempty" valid:"Required"`
ImageUUID string `orm:"column(image_uuid)" json:"image_uuid,omitempty"`
ImageMime string `orm:"column(image_mime)" json:"image_mime,omitempty"`
Departament string `orm:"column(departament)" json:"departament,omitempty"`
Percentage float32 `orm:"column(percentage)" json:"percentage,omitempty"`
Approved bool `orm:"column(approved)" json:"approved"`
Votes []*Votes `orm:"reverse(many)" json:"votes,omitempty"`
Token string `orm:"-" json:"token,omitempty"`
CreatedAt time.Time `orm:"column(created_at);type(datetime);null;auto_now_add" json:"-"`
UpdatedAt time.Time `orm:"column(updated_at);type(datetime);null" json:"-"`
DeletedAt time.Time `orm:"column(deleted_at);type(datetime);null" json:"-"`
}
Residents Model
func GetResidentsByCondosID ¶
GetResidentsByCondosID ...
func GetResidentsByEmail ¶
GetResidentsByEmail retrieves Residents by email. Returns error if Id doesn't exist
func GetResidentsByID ¶
GetResidentsByID retrieves Residents by Id. Returns error if Id doesn't exist
func GetResidentsFromTrash ¶
GetResidentsFromTrash return Residents soft Deleted
type Supervisors ¶
type Supervisors struct {
ID int `orm:"column(id);pk" json:"id"`
Username string `orm:"column(username);size(255)" json:"username,omitempty" valid:"Required"`
Password string `orm:"column(password);" json:"password,omitempty" valid:"Required"`
Phone string `orm:"column(phone);null" json:"phone,omitempty" valid:"Required"`
Token string `orm:"-" json:"token,omitempty"`
Worker *Workers `orm:"rel(fk);column(workers_id)" json:"worker,omitempty"`
CreatedAt time.Time `orm:"column(created_at);type(datetime);null;auto_now_add" json:"-"`
UpdatedAt time.Time `orm:"column(updated_at);type(datetime);null" json:"-"`
DeletedAt time.Time `orm:"column(deleted_at);type(datetime);null" json:"-"`
}
Supervisors Model
func GetSupervisorsByCondosID ¶
func GetSupervisorsByCondosID(condosID int) (supervisors []*Supervisors, err error)
GetSupervisorsByCondosID return Supervisors soft Deleted
func GetSupervisorsByID ¶
func GetSupervisorsByID(id int) (v *Supervisors, err error)
GetSupervisorsByID retrieves Supervisors by Id. Returns error if Id doesn't exist
func GetSupervisorsByUsername ¶
func GetSupervisorsByUsername(username string) (v *Supervisors, err error)
GetSupervisorsByUsername retrieves Supervisors by username. Returns error if Id doesn't exist
func GetSupervisorsByWorkersID ¶
func GetSupervisorsByWorkersID(workerID int) (v *Supervisors, err error)
GetSupervisorsByWorkersID retrieves Supervisors by workerID. Returns error if Id doesn't exist
func GetSupervisorsFromTrash ¶
func GetSupervisorsFromTrash() (supervisors []*Supervisors, err error)
GetSupervisorsFromTrash return Supervisors soft Deleted
type Tasks ¶
type Tasks struct {
ID int `orm:"column(id);pk" json:"id"`
Name string `orm:"column(name);" json:"name,omitempty" valid:"Required"`
Approved bool `orm:"column(approved);" json:"approved" valid:"Required"`
Date string `orm:"column(date);auto_now_add;type(datetime);" json:"date,omitempty"`
DateEnd string `orm:"column(date_end);" json:"date_end,omitempty"`
Address string `orm:"column(address);" json:"address,omitempty"`
Phone string `orm:"column(phone);" json:"phone,omitempty"`
Worker *Workers `orm:"column(worker_id);rel(fk);" json:"worker,omitempty"`
Goals []*Goals `orm:"reverse(many);" json:"goals,omitempty"`
CreatedAt time.Time `orm:"column(created_at);type(datetime);null;auto_now_add" json:"-"`
UpdatedAt time.Time `orm:"column(updated_at);type(datetime);null" json:"-"`
DeletedAt time.Time `orm:"column(deleted_at);type(datetime);null" json:"-"`
}
Tasks Model
func GetTasksByID ¶
GetTasksByID retrieves Points by Id. Returns error if Id doesn't exist
func GetTasksByWorkersID ¶
GetTasksByWorkersID ...
func GetTasksFromTrash ¶
GetTasksFromTrash return Points soft Deleted
type Verifications ¶
type Verifications struct {
ID int `orm:"column(id);pk" json:"id,omitempty"`
Date string `orm:"column(date);type(datetime);" json:"date,omitempty" valid:"Required"`
SupervisorComment string `orm:"column(supervisor_comment);" json:"supervisor_comment,omitempty"`
WatcherComment string `orm:"column(watcher_comment);" json:"watcher_comment,omitempty"`
ImageUUID string `orm:"column(image_uuid);" json:"image_uuid,omitempty"`
ImageMime string `orm:"column(image_mime);" json:"image_mime,omitempty"`
Latitude float32 `orm:"column(latitude)" json:"latitude" valid:"Required"`
Longitude float32 `orm:"column(longitude)" json:"longitude" valid:"Required"`
Watcher *Watchers `orm:"rel(fk);column(watchers_id)" json:"watchers,omitempty"`
Point *Points `orm:"rel(fk);column(points_id)" json:"point,omitempty"`
CreatedAt time.Time `orm:"column(created_at);type(datetime);null;auto_now_add" json:"-"`
UpdatedAt time.Time `orm:"column(updated_at);type(datetime);null" json:"-"`
DeletedAt time.Time `orm:"column(deleted_at);type(datetime);null" json:"-"`
Viewed bool `orm:"column(viewed);" json:"viewed"`
}
Verifications Model
func GetCondosVerificationsByMonth ¶
func GetCondosVerificationsByMonth(condosID int, year int, month time.Month) (Verifications []*Verifications, err error)
GetCondosVerificationsByMonth ...
func GetVerificationsByID ¶
func GetVerificationsByID(id int) (v *Verifications, err error)
GetVerificationsByID retrieves Verifications by Id. Returns error if Id doesn't exist
func GetVerificationsFromTrash ¶
func GetVerificationsFromTrash() (verifications []*Verifications, err error)
GetVerificationsFromTrash return Verifications soft Deleted
func GetWatchersVerificationsByMonth ¶
func GetWatchersVerificationsByMonth(watchersID int, year int, month time.Month) (Verifications []*Verifications, err error)
GetWatchersVerificationsByMonth ...
type Votes ¶
type Votes struct {
ID int `orm:"column(id);pk" json:"id"`
Resident *Residents `orm:"rel(fk);column(residents_id)" json:"residents,omitempty"`
Question *Questions `orm:"rel(fk);column(questions_id)" json:"questions,omitempty"`
Accepted bool `orm:"column(accepted);" json:"accepted,omitempty" valid:"Required"`
Comment string `orm:"column(comment);size(255)" json:"comment,omitempty"`
CreatedAt time.Time `orm:"column(created_at);type(datetime);null;auto_now_add" json:"created_at,omitempty"`
UpdatedAt time.Time `orm:"column(updated_at);type(datetime);null" json:"-"`
DeletedAt time.Time `orm:"column(deleted_at);type(datetime);null" json:"-"`
}
Votes Model
func GetVotesByID ¶
GetVotesByID retrieves Votes by Id. Returns error if Id doesn't exist
func GetVotesFromTrash ¶
GetVotesFromTrash return Votes soft Deleted
type Watchers ¶
type Watchers struct {
ID int `orm:"column(id);pk" json:"id"`
Username string `orm:"column(username);size(255)" json:"username,omitempty" valid:"Required"`
Password string `orm:"column(password);" json:"password,omitempty" valid:"Required"`
Phone string `orm:"column(phone);" json:"phone,omitempty" valid:"Required"`
AssistancesMod bool `orm:"column(assistances_mod)" json:"assistances_mod"`
RoutesMod bool `orm:"column(routes_mod)" json:"routes_mod"`
DeliveryMod bool `orm:"column(delivery_mod)" json:"delivery_mod"`
TasksMod bool `orm:"column(tasks_mod)" json:"tasks_mod"`
ChecksMod bool `orm:"column(checks_mod)" json:"checks_mod"`
Token string `orm:"-" json:"token,omitempty"`
Worker *Workers `orm:"rel(fk);column(workers_id)" json:"worker,omitempty"`
Verifications []*Verifications `orm:"reverse(many);" json:"verifications,omitempty"`
CreatedAt time.Time `orm:"column(created_at);type(datetime);null;auto_now_add" json:"-"`
UpdatedAt time.Time `orm:"column(updated_at);type(datetime);null" json:"-"`
DeletedAt time.Time `orm:"column(deleted_at);type(datetime);null" json:"-"`
}
Watchers Model
func GetWatchersByCondosID ¶
GetWatchersByCondosID ...
func GetWatchersByID ¶
GetWatchersByID retrieves Watchers by Id. Returns error if Id doesn't exist
func GetWatchersByUsername ¶
GetWatchersByUsername retrieves Watchers by username. Returns error if Id doesn't exist
func GetWatchersByWorkersID ¶
GetWatchersByWorkersID retrieves Watchers by workerID. Returns error if Id doesn't exist
func GetWatchersFromTrash ¶
GetWatchersFromTrash return Watchers soft Deleted
func (*Watchers) GetVerificationsByDate ¶
GetVerificationsByDate ...
type Workers ¶
type Workers struct {
ID int `orm:"column(id);pk" json:"id"`
FirstName string `orm:"column(first_name);size(255)" json:"first_name,omitempty" valid:"Required"`
Condo *Condos `orm:"rel(fk);column(condos_id)" json:"condos,omitempty"`
Assistances []*Assistances `orm:"reverse(many)" json:"assistances,omitempty"`
Notifications []*Notifications `orm:"reverse(many)" json:"notifications,omitempty"`
ImageUUID string `orm:"column(image_uuid)" json:"image_uuid,omitempty"`
ImageMime string `orm:"column(image_mime)" json:"-"`
FaceID string `orm:"column(face_id)" json:"-"`
Approved bool `orm:"column(approved)" json:"approved"`
RUT string `orm:"column(rut);size(255);null" json:"rut,omitempty"`
Address string `orm:"column(address);null" json:"address,omitempty"`
Phone string `orm:"column(phone);null" json:"phone,omitempty"`
Community string `orm:"column(community);null" json:"community,omitempty"`
Email string `orm:"column(email);" json:"email,omitempty" valid:"Required"`
City string `orm:"column(city);null" json:"city,omitempty"`
Country string `orm:"column(country);null" json:"country,omitempty"`
TodayAssistances map[string]*Assistances `orm:"-" json:"today_assistances,omitempty"`
MonthData *monthDetail `orm:"-" json:"month_data,omitempty"`
YearData *yearDetail `orm:"-" json:"year_data,omitempty"`
CreatedAt time.Time `orm:"column(created_at);type(datetime);null;auto_now_add" json:"-"`
UpdatedAt time.Time `orm:"column(updated_at);type(datetime);null" json:"-"`
DeletedAt time.Time `orm:"column(deleted_at);type(datetime);null" json:"-"`
}
Workers Model
func GetWorkersByCondosID ¶
GetWorkersByCondosID ...
func GetWorkersByEmail ¶
GetWorkersByEmail retrieves Workers by email. Returns error if Id doesn't exist
func GetWorkersByID ¶
GetWorkersByID retrieves Workers by Id. Returns error if Id doesn't exist
func GetWorkersFromTrash ¶
GetWorkersFromTrash return Workers soft Deleted
func (*Workers) GetCurrentWorkTimeAssistances ¶
GetCurrentWorkTimeAssistances ...
func (*Workers) GetMonthAssistancesData ¶
GetMonthAssistancesData ...
func (*Workers) GetTodayAssistances ¶
GetTodayAssistances ...
func (*Workers) GetYearAssistancesData ¶
GetYearAssistancesData ...
type Zones ¶
type Zones struct {
ID int `orm:"column(id);pk" json:"id"`
Name string `orm:"column(name);size(255)" json:"name,omitempty" valid:"Required"`
Condo *Condos `orm:"rel(fk);column(condos_id)" json:"condos,omitempty"`
Points []*Points `orm:"reverse(many)" json:"points,omitempty"`
Token string `orm:"-" json:"token,omitempty"`
CreatedAt time.Time `orm:"column(created_at);type(datetime);null;auto_now_add" json:"-"`
UpdatedAt time.Time `orm:"column(updated_at);type(datetime);null" json:"-"`
DeletedAt time.Time `orm:"column(deleted_at);type(datetime);null" json:"-"`
}
Zones Model
func GetZonesByID ¶
GetZonesByID retrieves Zones by Id. Returns error if Id doesn't exist
func GetZonesFromTrash ¶
GetZonesFromTrash return Zones soft Deleted