interfaces

package
v0.0.0-...-964819c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2024 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ACTIVE    string = "ACTIVE"
	CANCELLED string = "CANCELLED"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AssignHostelToUsersRequestBody

type AssignHostelToUsersRequestBody struct {
	Hostel primitive.ObjectID   `json:"hostel" binding:"required"`
	Users  []primitive.ObjectID `json:"users" binding:"required"`
}

type AssignMessToUsersRequestBody

type AssignMessToUsersRequestBody struct {
	Mess  primitive.ObjectID   `json:"mess" binding:"required"`
	Users []primitive.ObjectID `json:"users" binding:"required"`
}

type BatchCreateHostelRoomsRequest

type BatchCreateHostelRoomsRequest struct {
	RangeStart int  `json:"rangeStart" binding:"required"`
	RangeEnd   int  `json:"rangeEnd" binding:"required"`
	Floor      int  `json:"floor" binding:"required"`
	Occupancy  int  `json:"occupancy" binding:"required"`
	Available  bool `json:"available" binding:"required"`
}

type GenericResponse

type GenericResponse struct {
	Success bool        `json:"success"`
	Message string      `json:"message"`
	Details interface{} `json:"details"`
	Error   interface{} `json:"error"`
}

func GetGenericResponse

func GetGenericResponse(success bool, message string, details interface{}, err error) GenericResponse

type HostelMessManageToUser

type HostelMessManageToUser struct {
	UserID    primitive.ObjectID   `json:"userID"`
	HostelIDs []primitive.ObjectID `json:"hostelIDs"`
	MessIDs   []primitive.ObjectID `json:"messIDs"`
}

type HostelStaffAllotmentWithUser

type HostelStaffAllotmentWithUser struct {
	ID     primitive.ObjectID `json:"_id" bson:"_id"`
	Hostel primitive.ObjectID `json:"hostel" bson:"hostel" binding:"required"`
	User   models.User        `json:"user" bson:"user" binding:"required"`
}

type MealMini

type MealMini struct {
	ID     primitive.ObjectID `json:"_id"`
	Name   string             `json:"name"`
	Status string             `json:"status"`
}

type PopulatedRoom

type PopulatedRoom struct {
	models.Room
	Allotments int `json:"allotments" bson:"allotments"`
}

type RoomAllotmentWithUser

type RoomAllotmentWithUser struct {
	ID       primitive.ObjectID `json:"_id" bson:"_id"`
	Room     primitive.ObjectID `json:"room" bson:"room" binding:"required"`
	User     models.User        `json:"user" bson:"user" binding:"required"`
	Semester primitive.ObjectID `json:"semester" bson:"semester" binding:"required"`
}

type UpdateMeal

type UpdateMeal struct {
	MessID     primitive.ObjectID   `json:"messID,omitempty"`
	MealType   primitive.ObjectID   `json:"mealTypeID,omitempty"`
	Dates      []primitive.DateTime `json:"dates,omitempty"`
	Menu       []primitive.ObjectID `json:"menu,omitempty"`
	AppendOnly bool                 `json:"appendOnly,omitempty"`
}

type UserFilter

type UserFilter struct {
	StartYear  []int                  `json:"startYear" binding:"required"`
	EndYear    []int                  `json:"endYear" binding:"required"`
	RollNo     []int                  `json:"rollNo" binding:"required"`
	Department []constants.Department `json:"department" binding:"required"`
	Course     []constants.Course     `json:"course" binding:"required"`
}

type UserMealForADay

type UserMealForADay struct {
	Date  primitive.DateTime `json:"date"`
	Meals []MealMini         `json:"meals"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL