model

package
v0.0.0-...-0406d23 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Application

type Application struct {
	Model      `bson:",inline"`
	UID        primitive.ObjectID `json:"uid" bson:"uid"`
	Position   string             `json:"position" bson:"position"`
	Resume     string             `json:"resume" bson:"resume"`
	Interview  primitive.DateTime `json:"interview" bson:"interview"`
	Feedback   *string            `json:"feedback" bson:"feedback"`
	ReferredBy *string            `json:"referredBy" bson:"referred_by"`
	Notes      string             `json:"notes" bson:"notes"`
	Status     string             `json:"status" bson:"status"`
}

func (*Application) Collection

func (i *Application) Collection() string

func (*Application) Index

func (i *Application) Index() []mongo.IndexModel

func (*Application) MarshalBSON

func (i *Application) MarshalBSON() ([]byte, error)

type Applications

type Applications struct {
	Data  []*Application `json:"data,omitempty"`
	Count int            `json:"count"`
}

type Attendance

type Attendance struct {
	Model   `bson:",inline"`
	UID     primitive.ObjectID   `json:"uid" bson:"uid"`
	Date    primitive.DateTime   `json:"date" bson:"date"`
	TimeIn  *primitive.Timestamp `json:"time_in,omitempty" bson:"time_in,omitempty"`
	TimeOut *primitive.Timestamp `json:"time_out,omitempty" bson:"time_out,omitempty"`
	Notes   string               `json:"notes,omitempty" bson:"notes,omitempty"`
	Status  string               `json:"status" bson:"status"`
}

func (*Attendance) Collection

func (i *Attendance) Collection() string

func (*Attendance) Index

func (i *Attendance) Index() []mongo.IndexModel

func (*Attendance) MarshalBSON

func (i *Attendance) MarshalBSON() ([]byte, error)

type AttendanceStatus

type AttendanceStatus string
const (
	AttendanceStatusPresent AttendanceStatus = "PRESENT"
	AttendanceStatusAbsent  AttendanceStatus = "ABSENT"
	AttendanceStatusLate    AttendanceStatus = "LATE"
	AttendanceStatusExcused AttendanceStatus = "EXCUSED"
)

func (AttendanceStatus) IsValid

func (e AttendanceStatus) IsValid() bool

func (AttendanceStatus) MarshalGQL

func (e AttendanceStatus) MarshalGQL(w io.Writer)

func (AttendanceStatus) String

func (e AttendanceStatus) String() string

func (*AttendanceStatus) UnmarshalGQL

func (e *AttendanceStatus) UnmarshalGQL(v interface{}) error

type Attendances

type Attendances struct {
	Data  []*Attendance `json:"data,omitempty"`
	Count int           `json:"count"`
}

type Certification

type Certification struct {
	Name      string `json:"name"`
	Authority string `json:"authority"`
	Date      string `json:"date"`
}

type CertificationInput

type CertificationInput struct {
	Name      string `json:"name"`
	Authority string `json:"authority"`
	Date      string `json:"date"`
}

type Comment

type Comment struct {
	Model       `bson:",inline"`
	User        primitive.ObjectID   `json:"user,omitempty" bson:"user,omitempty"`
	Parent      primitive.ObjectID   `json:"parent,omitempty" bson:"parent,omitempty"`
	Commentable Commentable          `json:"commentable,omitempty" bson:"commentable,omitempty"`
	Locale      string               `json:"locale,omitempty" bson:"locale,omitempty"`
	Content     primitive.M          `json:"content,omitempty" bson:"content,omitempty"`
	Rating      int                  `json:"rating,omitempty" bson:"rating,omitempty"`
	Status      string               `json:"status,omitempty" bson:"status,omitempty"`
	Attachments []primitive.ObjectID `json:"attachments,omitempty" bson:"attachments,omitempty"`
}

func (*Comment) Collection

func (i *Comment) Collection() string

func (*Comment) Index

func (i *Comment) Index() []mongo.IndexModel

func (Comment) IsEntity

func (Comment) IsEntity()

func (*Comment) MarshalBSON

func (i *Comment) MarshalBSON() ([]byte, error)

type Commentable

type Commentable struct {
	ID   primitive.ObjectID `json:"id" bson:"id"`
	Type string             `json:"type" bson:"type"`
}

type Education

type Education struct {
	Degree      string  `json:"degree"`
	University  string  `json:"university"`
	StartDate   string  `json:"start_date"`
	EndDate     *string `json:"end_date,omitempty"`
	Description *string `json:"description,omitempty"`
}

type EducationInput

type EducationInput struct {
	Degree      string  `json:"degree"`
	University  string  `json:"university"`
	StartDate   string  `json:"start_date"`
	EndDate     *string `json:"end_date,omitempty"`
	Description *string `json:"description,omitempty"`
}

type Experience

type Experience struct {
	Title       string  `json:"title"`
	Company     string  `json:"company"`
	StartDate   string  `json:"start_date"`
	EndDate     *string `json:"end_date,omitempty"`
	Description *string `json:"description,omitempty"`
}

type ExperienceInput

type ExperienceInput struct {
	Title       string  `json:"title"`
	Company     string  `json:"company"`
	StartDate   string  `json:"start_date"`
	EndDate     *string `json:"end_date,omitempty"`
	Description *string `json:"description,omitempty"`
}

type Job

type Job struct {
	Model        `bson:",inline"`
	Code         string      `json:"code" bson:"code"`
	Locale       string      `json:"locale" bson:"locale"`
	Type         string      `json:"type" bson:"type"`
	Location     string      `json:"location" bson:"location"`
	Title        primitive.M `json:"title" bson:"title"`
	Description  primitive.M `json:"description,omitempty" bson:"description,omitempty"`
	Requirements primitive.M `json:"requirements,omitempty" bson:"requirements,omitempty"`
	Skills       primitive.M `json:"skills,omitempty" bson:"skills,omitempty"`
	Benefits     primitive.M `json:"benefits,omitempty" bson:"benefits,omitempty"`
	Status       string      `json:"status" bson:"status"`
}

func (*Job) Collection

func (i *Job) Collection() string

func (*Job) Index

func (i *Job) Index() []mongo.IndexModel

func (*Job) MarshalBSON

func (i *Job) MarshalBSON() ([]byte, error)

type JobStatus

type JobStatus string
const (
	JobStatusOpen   JobStatus = "OPEN"
	JobStatusClosed JobStatus = "CLOSED"
)

func (JobStatus) IsValid

func (e JobStatus) IsValid() bool

func (JobStatus) MarshalGQL

func (e JobStatus) MarshalGQL(w io.Writer)

func (JobStatus) String

func (e JobStatus) String() string

func (*JobStatus) UnmarshalGQL

func (e *JobStatus) UnmarshalGQL(v interface{}) error

type JobType

type JobType string
const (
	JobTypeFullTime   JobType = "FULL_TIME"
	JobTypePartTime   JobType = "PART_TIME"
	JobTypeContract   JobType = "CONTRACT"
	JobTypeFreelance  JobType = "FREELANCE"
	JobTypeInternship JobType = "INTERNSHIP"
)

func (JobType) IsValid

func (e JobType) IsValid() bool

func (JobType) MarshalGQL

func (e JobType) MarshalGQL(w io.Writer)

func (JobType) String

func (e JobType) String() string

func (*JobType) UnmarshalGQL

func (e *JobType) UnmarshalGQL(v interface{}) error

type Jobs

type Jobs struct {
	Data  []*Job `json:"data,omitempty"`
	Count int    `json:"count"`
}

type Language

type Language struct {
	Name        string      `json:"name"`
	Proficiency Proficiency `json:"proficiency"`
}

type LanguageInput

type LanguageInput struct {
	Name        string      `json:"name"`
	Proficiency Proficiency `json:"proficiency"`
}

type Leave

type Leave struct {
	Model  `bson:",inline"`
	UID    primitive.ObjectID `json:"uid" bson:"uid"`
	Type   string             `json:"type" bson:"type"`
	Start  primitive.DateTime `json:"start" bson:"start"`
	End    primitive.DateTime `json:"end" bson:"end"`
	Reason string             `json:"reason" bson:"reason"`
	Status string             `json:"status" bson:"status"`
}

func (*Leave) Collection

func (i *Leave) Collection() string

func (*Leave) Index

func (i *Leave) Index() []mongo.IndexModel

func (*Leave) MarshalBSON

func (i *Leave) MarshalBSON() ([]byte, error)

type LeaveStatus

type LeaveStatus string
const (
	LeaveStatusPending  LeaveStatus = "pending"
	LeaveStatusApproved LeaveStatus = "approved"
	LeaveStatusRejected LeaveStatus = "rejected"
)

func (LeaveStatus) IsValid

func (e LeaveStatus) IsValid() bool

func (LeaveStatus) MarshalGQL

func (e LeaveStatus) MarshalGQL(w io.Writer)

func (LeaveStatus) String

func (e LeaveStatus) String() string

func (*LeaveStatus) UnmarshalGQL

func (e *LeaveStatus) UnmarshalGQL(v interface{}) error

type LeaveType

type LeaveType string
const (
	LeaveTypeParental      LeaveType = "Parental"
	LeaveTypeSick          LeaveType = "Sick"
	LeaveTypeBereavement   LeaveType = "Bereavement"
	LeaveTypeSabbatical    LeaveType = "Sabbatical"
	LeaveTypeHoliday       LeaveType = "holiday"
	LeaveTypeLeave         LeaveType = "Leave"
	LeaveTypeAnnual        LeaveType = "Annual"
	LeaveTypeUnpaid        LeaveType = "Unpaid"
	LeaveTypeMilitary      LeaveType = "Military"
	LeaveTypeMarriage      LeaveType = "Marriage"
	LeaveTypeCompensatory  LeaveType = "Compensatory"
	LeaveTypeReligion      LeaveType = "Religion"
	LeaveTypeEarned        LeaveType = "Earned"
	LeaveTypeCompassionate LeaveType = "compassionate"
)

func (LeaveType) IsValid

func (e LeaveType) IsValid() bool

func (LeaveType) MarshalGQL

func (e LeaveType) MarshalGQL(w io.Writer)

func (LeaveType) String

func (e LeaveType) String() string

func (*LeaveType) UnmarshalGQL

func (e *LeaveType) UnmarshalGQL(v interface{}) error

type Leaves

type Leaves struct {
	Data  []*Leave `json:"data,omitempty"`
	Count int      `json:"count"`
}

type Model

type Model struct {
	ID        primitive.ObjectID  `json:"id,omitempty" bson:"_id,omitempty"`
	Workspace primitive.ObjectID  `json:"workspace,omitempty" bson:"workspace,omitempty"`
	Metadata  primitive.M         `json:"metadata,omitempty" bson:"metadata,omitempty"`
	Created   primitive.Timestamp `json:"created,omitempty" bson:"created,omitempty"`
	Updated   primitive.Timestamp `json:"updated,omitempty" bson:"updated,omitempty"`
	Deleted   primitive.Timestamp `json:"deleted,omitempty" bson:"deleted,omitempty"`
	Timestamp primitive.Timestamp `json:"timestamp,omitempty" bson:"timestamp,omitempty"`
}

type NewApplication

type NewApplication struct {
	Position  string                 `json:"position"`
	Resume    string                 `json:"resume"`
	Interview string                 `json:"interview"`
	Feedback  *string                `json:"feedback,omitempty"`
	Notes     *string                `json:"notes,omitempty"`
	Metadata  map[string]interface{} `json:"metadata,omitempty"`
	Status    *string                `json:"status,omitempty"`
}

type NewAttendance

type NewAttendance struct {
	TimeIn   *string                `json:"timeIn,omitempty"`
	TimeOut  *string                `json:"timeOut,omitempty"`
	Notes    *string                `json:"notes,omitempty"`
	Metadata map[string]interface{} `json:"metadata,omitempty"`
	Status   *string                `json:"status,omitempty"`
}

type NewJob

type NewJob struct {
	Locale       string                 `json:"locale"`
	Title        string                 `json:"title"`
	Description  string                 `json:"description"`
	Requirements string                 `json:"requirements"`
	Skills       *string                `json:"skills,omitempty"`
	Benefits     *string                `json:"benefits,omitempty"`
	Location     string                 `json:"location"`
	Type         string                 `json:"type"`
	Metadata     map[string]interface{} `json:"metadata,omitempty"`
	Status       string                 `json:"status"`
}

type NewLeave

type NewLeave struct {
	Type     string                 `json:"type"`
	Start    string                 `json:"start"`
	End      *string                `json:"end,omitempty"`
	Reason   string                 `json:"reason"`
	Status   *string                `json:"status,omitempty"`
	Metadata map[string]interface{} `json:"metadata,omitempty"`
}

type NewOrganization

type NewOrganization struct {
	UID         *string                `json:"uid,omitempty"`
	Parent      *string                `json:"parent,omitempty"`
	Name        string                 `json:"name"`
	Description *string                `json:"description,omitempty"`
	Type        string                 `json:"type"`
	Status      *string                `json:"status,omitempty"`
	Metadata    map[string]interface{} `json:"metadata,omitempty"`
}

type NewResume

type NewResume struct {
	Title          string                `json:"title"`
	Summary        string                `json:"summary"`
	Experience     []*ExperienceInput    `json:"experience"`
	Education      []*EducationInput     `json:"education"`
	Skills         []*SkillInput         `json:"skills"`
	Certifications []*CertificationInput `json:"certifications"`
	Languages      []*LanguageInput      `json:"languages"`
	References     []*ReferenceInput     `json:"references"`
}

type Organization

type Organization struct {
	Model       `bson:",inline"`
	UID         *primitive.ObjectID `json:"uid,omitempty" bson:"uid,omitempty"`
	Parent      *primitive.ObjectID `json:"parent,omitempty" bson:"parent,omitempty"`
	Type        string              `json:"type" bson:"type"`
	Name        string              `json:"name" bson:"name"`
	Description *string             `json:"description,omitempty" bson:"description,omitempty"`
	Status      string              `json:"status" bson:"status"`
}

func (*Organization) Collection

func (i *Organization) Collection() string

func (*Organization) Index

func (i *Organization) Index() []mongo.IndexModel

func (Organization) IsEntity

func (Organization) IsEntity()

func (*Organization) MarshalBSON

func (i *Organization) MarshalBSON() ([]byte, error)

func (*Organization) Sanitize

func (i *Organization) Sanitize(s string) string

type Organizations

type Organizations struct {
	Data  []*Organization `json:"data,omitempty"`
	Count int             `json:"count"`
}

type Proficiency

type Proficiency string
const (
	ProficiencyBasic        Proficiency = "BASIC"
	ProficiencyIntermediate Proficiency = "INTERMEDIATE"
	ProficiencyAdvanced     Proficiency = "ADVANCED"
	ProficiencyNative       Proficiency = "NATIVE"
)

func (Proficiency) IsValid

func (e Proficiency) IsValid() bool

func (Proficiency) MarshalGQL

func (e Proficiency) MarshalGQL(w io.Writer)

func (Proficiency) String

func (e Proficiency) String() string

func (*Proficiency) UnmarshalGQL

func (e *Proficiency) UnmarshalGQL(v interface{}) error

type Reference

type Reference struct {
	Name         string  `json:"name"`
	Relationship string  `json:"relationship"`
	Email        string  `json:"email"`
	Phone        *string `json:"phone,omitempty"`
}

type ReferenceInput

type ReferenceInput struct {
	Name         string  `json:"name"`
	Relationship string  `json:"relationship"`
	Email        string  `json:"email"`
	Phone        *string `json:"phone,omitempty"`
}

type Resume

type Resume struct {
	Model          `bson:",inline"`
	UID            primitive.ObjectID `json:"uid" bson:"uid"`
	Title          string             `json:"title" bson:"title"`
	Summary        string             `json:"summary" bson:"summary"`
	Experience     []Experience       `json:"experience" bson:"experience"`
	Education      []Education        `json:"education" bson:"education"`
	Skills         []Skill            `json:"skills" bson:"skills"`
	Certifications []Certification    `json:"certifications" bson:"certifications"`
	Languages      []Language         `json:"languages" bson:"languages"`
	References     []Reference        `json:"references" bson:"references"`
	Status         string             `json:"status" bson:"status"`
}

func (*Resume) Collection

func (i *Resume) Collection() string

func (*Resume) Index

func (i *Resume) Index() []mongo.IndexModel

func (*Resume) MarshalBSON

func (i *Resume) MarshalBSON() ([]byte, error)

type Resumes

type Resumes struct {
	Data  []*Resume `json:"data"`
	Count int       `json:"count"`
}

type Skill

type Skill struct {
	Name        string      `json:"name"`
	Proficiency Proficiency `json:"proficiency"`
	Description *string     `json:"description,omitempty"`
}

type SkillInput

type SkillInput struct {
	Name        string      `json:"name"`
	Proficiency Proficiency `json:"proficiency"`
	Description *string     `json:"description,omitempty"`
}

type UpdateApplication

type UpdateApplication struct {
	Position  *string                `json:"position,omitempty"`
	Resume    *string                `json:"resume,omitempty"`
	Interview *string                `json:"interview,omitempty"`
	Feedback  *string                `json:"feedback,omitempty"`
	Notes     *string                `json:"notes,omitempty"`
	Metadata  map[string]interface{} `json:"metadata,omitempty"`
	Status    *string                `json:"status,omitempty"`
}

type UpdateAttendance

type UpdateAttendance struct {
	UID      *string                `json:"uid,omitempty"`
	TimeIn   *string                `json:"timeIn,omitempty"`
	TimeOut  *string                `json:"timeOut,omitempty"`
	Notes    *string                `json:"notes,omitempty"`
	Metadata map[string]interface{} `json:"metadata,omitempty"`
	Status   *string                `json:"status,omitempty"`
}

type UpdateJob

type UpdateJob struct {
	Locale       *string                `json:"locale,omitempty"`
	Title        *string                `json:"title,omitempty"`
	Description  *string                `json:"description,omitempty"`
	Requirements *string                `json:"requirements,omitempty"`
	Skills       *string                `json:"skills,omitempty"`
	Benefits     *string                `json:"benefits,omitempty"`
	Location     *string                `json:"location,omitempty"`
	Type         *string                `json:"type,omitempty"`
	Metadata     map[string]interface{} `json:"metadata,omitempty"`
	Status       *string                `json:"status,omitempty"`
}

type UpdateLeave

type UpdateLeave struct {
	Type     *string                `json:"type,omitempty"`
	Start    *string                `json:"start,omitempty"`
	End      *string                `json:"end,omitempty"`
	Reason   *string                `json:"reason,omitempty"`
	Status   *string                `json:"status,omitempty"`
	Metadata map[string]interface{} `json:"metadata,omitempty"`
}

type UpdateOrganization

type UpdateOrganization struct {
	UID         *string                `json:"uid,omitempty"`
	Parent      *string                `json:"parent,omitempty"`
	Name        *string                `json:"name,omitempty"`
	Description *string                `json:"description,omitempty"`
	Type        *string                `json:"type,omitempty"`
	Status      *string                `json:"status,omitempty"`
	Metadata    map[string]interface{} `json:"metadata,omitempty"`
}

type UpdateResume

type UpdateResume struct {
	Title          *string               `json:"title,omitempty"`
	Summary        *string               `json:"summary,omitempty"`
	Experience     []*ExperienceInput    `json:"experience,omitempty"`
	Education      []*EducationInput     `json:"education,omitempty"`
	Skills         []*SkillInput         `json:"skills,omitempty"`
	Certifications []*CertificationInput `json:"certifications,omitempty"`
	Languages      []*LanguageInput      `json:"languages,omitempty"`
	References     []*ReferenceInput     `json:"references,omitempty"`
}

type User

type User struct {
	ID string `json:"id" bson:"_id"`
}

func (User) IsEntity

func (User) IsEntity()

Jump to

Keyboard shortcuts

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