jobs

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2024 License: MIT Imports: 12 Imported by: 0

README

jobs

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorAuth       = errors.New("auth enabled not initialised")
	ErrorPermission = errors.New("permissions enabled not initialised")
	ErrorEmpty      = errors.New("given some values is empty")
	TZONE, _        = time.LoadLocation(os.Getenv("TIME_ZONE"))
)

Functions

func AuthandPermission

func AuthandPermission(jobs *Jobs) error

func HashingPassword

func HashingPassword(pass string) string

Types

type Config

type Config struct {
	DB               *gorm.DB
	AuthEnable       bool
	PermissionEnable bool
	DataBaseType     Type
	Auth             *auth.Auth
	Permissions      *role.PermissionConfig
}

type CreateApplicantReq

type CreateApplicantReq struct {
	Id             int
	MemberId       int
	Name           string
	EmailId        string
	MobileNo       string
	JobType        string
	Location       string
	Education      string
	Graduation     int
	CompanyName    string
	Experience     int
	Skills         string
	ImagePath      string
	Image          string
	CreatedBy      int
	ModifiedBy     int
	DeletedBy      int
	CurrentSalary  int
	ExpectedSalary int
	Status         int
	Password       string
}

type CreateJobReq

type CreateJobReq struct {
	Id             int
	CategoriesId   int
	JobTitle       string
	JobSlug        string
	JobDescription string
	JobLocation    string
	JobType        string
	Education      string
	Department     string
	Experience     string
	Salary         string
	CreatedBy      int
	DeletedBy      int
	Keywords       string
	Skill          string
	MinimumYears   int
	MaximumYears   int
	PostedDate     time.Time
	ValidThrough   time.Time
	Status         int
	ModifiedBy     int
}

type Filter

type Filter struct {
	Keyword        string
	JobType        string
	Name           string
	EmailId        string
	MobileNo       string
	JobId          int
	Status         string
	JobTitle       string
	ApplicantName  string
	ApplicantEmail string
}

type Jobs

type Jobs struct {
	AuthEnable       bool
	PermissionEnable bool
	AuthFlg          bool
	PermissionFlg    bool
	DB               *gorm.DB
	Auth             *auth.Auth
	Permissions      *role.PermissionConfig
}

func JobsSetup added in v0.0.2

func JobsSetup(config Config) *Jobs

JobsSetup used initialize Jobs configruation

func (*Jobs) ApplicantsList

func (Ap *Jobs) ApplicantsList(limit, offset int, filter Filter) (applicants []TblJobsApplicants, count int64, err error)

Applicant List Function//

func (*Jobs) CreateApplicant

func (Ap *Jobs) CreateApplicant(ap CreateApplicantReq) error

func (*Jobs) CreateJob

func (Ap *Jobs) CreateJob(Jc CreateJobReq) error

func (*Jobs) DBconf

func (Ap *Jobs) DBconf() *member.Member

func (*Jobs) DeleteApplicant

func (Ap *Jobs) DeleteApplicant(memberid int, userid int, DB *gorm.DB) error

func (*Jobs) DeleteJob

func (Ap *Jobs) DeleteJob(id int, userid int) error

func (*Jobs) GetApplicantById

func (Ap *Jobs) GetApplicantById(id int) (ap TblJobsApplicants, err error)

func (*Jobs) GetApplicantJobs

func (Ap *Jobs) GetApplicantJobs(ApplicantId int, limit int, offset int) (applicantjobs []TblJobs, Totaljobs int64, err error)

func (*Jobs) GetJobApplicant

func (Ap *Jobs) GetJobApplicant(id int, limit, offset int, filter Filter) (app []TblJobs, Totalapplicants int64, err error)

func (*Jobs) GetJobById

func (Ap *Jobs) GetJobById(id int) (job TblJobs, err error)

func (*Jobs) JobsList

func (Ap *Jobs) JobsList(limit, offset int, filter Filter) (job []TblJobs, count int64, err error)

Jobs List Function

func (*Jobs) MultiSelectApplicantStatus

func (Ap *Jobs) MultiSelectApplicantStatus(memberid []int, status int, modifiedby int) (bool, error)

multiselecte member status change

func (*Jobs) MultiSelectJobsStatus

func (Ap *Jobs) MultiSelectJobsStatus(memberid []int, status int, modifiedby int) (bool, error)

multiselecte member status change

func (*Jobs) MultiSelectedApplicantDelete

func (Ap *Jobs) MultiSelectedApplicantDelete(applicantids []int, modifiedby int) (bool, error)

func (*Jobs) MultiSelectedJobDelete

func (Ap *Jobs) MultiSelectedJobDelete(jobids []int, modifiedby int) (bool, error)

func (*Jobs) UpdateApplicant

func (Ap *Jobs) UpdateApplicant(ap CreateApplicantReq, memberid int) error

func (*Jobs) UpdateJob

func (Ap *Jobs) UpdateJob(Jc CreateJobReq) error

type JobsModel

type JobsModel struct{}
var Jobsmodel JobsModel

func (JobsModel) ApplicantCreate

func (jobsmodel JobsModel) ApplicantCreate(applicant TblJobsApplicants, DB *gorm.DB) error

func (JobsModel) ApplicantDelete

func (jobmodel JobsModel) ApplicantDelete(applicant TblJobsApplicants, DB *gorm.DB) error

func (JobsModel) ApplicantUpdate

func (jobsmodel JobsModel) ApplicantUpdate(applicant *TblJobsApplicants, DB *gorm.DB) error

func (JobsModel) ApplicantsList

func (jobsmodel JobsModel) ApplicantsList(limit int, offset int, filter Filter, DB *gorm.DB) (applicant []TblJobsApplicants, Totalapplicants int64, err error)

func (JobsModel) GetApplicantById

func (jobsmodel JobsModel) GetApplicantById(id int, DB *gorm.DB) (applicant TblJobsApplicants, err error)

func (JobsModel) GetApplicantJobs

func (jobmodel JobsModel) GetApplicantJobs(applicantid int, limit int, offset int, DB *gorm.DB) (applicantjobs []TblJobs, Totaljobs int64, err error)

func (JobsModel) GetJobApplicantByJobId

func (jobsmodel JobsModel) GetJobApplicantByJobId(id int, limit int, offset int, filter Filter, DB *gorm.DB) (applicant []TblJobs, Totalapplicants int64, err error)

func (JobsModel) JobCreate

func (jobsmodel JobsModel) JobCreate(job *TblJobs, DB *gorm.DB) error

func (JobsModel) JobDelete

func (jobsmodel JobsModel) JobDelete(job *TblJobs, DB *gorm.DB) error

func (JobsModel) JobDetailsById

func (jobsmodel JobsModel) JobDetailsById(jobs *TblJobs, id int, DB *gorm.DB) error

func (JobsModel) JobUpdate

func (jobsmodel JobsModel) JobUpdate(job *TblJobs, DB *gorm.DB) error

func (JobsModel) JobsList

func (jobsmodel JobsModel) JobsList(offset int, limit int, filter Filter, DB *gorm.DB) (job []TblJobs, Totaljob int64, err error)

func (JobsModel) MultiApplicantIsActive

func (jobsmodel JobsModel) MultiApplicantIsActive(applicant *TblJobsApplicants, jobid []int, status int, DB *gorm.DB) error

func (JobsModel) MultiJobsIsActive

func (jobsmodel JobsModel) MultiJobsIsActive(job *TblJobs, jobid []int, status int, DB *gorm.DB) error

func (JobsModel) MultiSelectedApplicantDelete

func (jobsmodel JobsModel) MultiSelectedApplicantDelete(applicant *TblJobsApplicants, id []int, DB *gorm.DB) error

func (JobsModel) MultiSelectedJobDelete

func (jobsmodel JobsModel) MultiSelectedJobDelete(job *TblJobs, id []int, DB *gorm.DB) error

type TblJobs

type TblJobs struct {
	Id             int                        `gorm:"primaryKey;auto_increment;type:serial"`
	CategoriesId   int                        `gorm:"type:integer"`
	JobTitle       string                     `gorm:"type:character varying"`
	JobDescription string                     `gorm:"type:character varying"`
	JobLocation    string                     `gorm:"type:character varying"`
	JobType        string                     `gorm:"type:character varying"`
	Education      string                     `gorm:"type:character varying"`
	Department     string                     `gorm:"type:character varying"`
	Experience     string                     `gorm:"type:character varying"`
	Salary         string                     `gorm:"type:character varying"`
	CreatedOn      time.Time                  `gorm:"type:timestamp without time zone;DEFAULT:NULL"`
	CreatedBy      int                        `gorm:"type:integer"`
	CreatedDate    string                     `gorm:"-:migration;<-:false"`
	IsDeleted      int                        `gorm:"type:integer"`
	DeletedOn      time.Time                  `gorm:"DEFAULT:NULL"`
	DeletedBy      int                        `gorm:"DEFAULT:NULL"`
	ApplicantsList []TblJobsApplicants        `gorm:"foreignKey:Id;"`
	Keywords       string                     `gorm:"type:character varying"`
	Skill          string                     `gorm:"type:character varying"`
	MinimumYears   int                        `gorm:"type:integer"`
	MaximumYears   int                        `gorm:"type:integer"`
	PostedDate     time.Time                  `gorm:"type:timestamp without time zone;DEFAULT:NULL"`
	ValidThrough   time.Time                  `gorm:"type:timestamp without time zone;DEFAULT:NULL"`
	Status         int                        `gorm:"type:integer"`
	Startdate      string                     `gorm:"-:migration;<-:false"`
	Enddate        string                     `gorm:"-:migration;<-:false"`
	ModifiedOn     time.Time                  `gorm:"type:timestamp without time zone;DEFAULT:NULL"`
	ModifiedBy     int                        `gorm:"type:integer"`
	CategoryNames  []categories.TblCategories `gorm:"-"`
	JobList        []TblJobs                  `gorm:"foreignKey:Id;"`
}

type TblJobsApplicants

type TblJobsApplicants struct {
	Id             int       `gorm:"primaryKey;auto_increment;type:serial"`
	MemberId       int       `gorm:"type:integer"`
	Name           string    `gorm:"type:character varying"`
	EmailId        string    `gorm:"type:character varying"`
	MobileNo       string    `gorm:"type:character varying"`
	JobType        string    `gorm:"type:character varying"`
	Location       string    `gorm:"type:character varying"`
	Education      string    `gorm:"type:character varying"`
	Graduation     int       `gorm:"type:integer"`
	CompanyName    string    `gorm:"type:character varying"`
	Experience     int       `gorm:"type:integer"`
	Skills         string    `gorm:"type:character varying"`
	ImagePath      string    `gorm:"type:character varying"`
	Image          string    `gorm:"type:character varying"`
	CreatedOn      time.Time `gorm:"type:timestamp without time zone;DEFAULT:NULL"`
	CreatedBy      int
	ModifiedOn     time.Time `gorm:"DEFAULT:NULL"`
	ModifiedBy     int
	IsDeleted      int
	DeletedOn      time.Time `gorm:"DEFAULT:NULL"`
	DeletedBy      int
	CreatedDate    string `gorm:"-:migration;<-:false"`
	CurrentSalary  int    `gorm:"type:integer"`
	ExpectedSalary int    `gorm:"type:integer"`
	Status         int    `gorm:"type:integer"`
	NameString     string `gorm:"-:migration;<-:false"`
	Password       string
}

type TblJobsDepartment

type TblJobsDepartment struct {
	Id         int    `gorm:"primaryKey;auto_increment;type:serial"`
	Department string `gorm:"type:character varying"`
}

type TblJobsEducation

type TblJobsEducation struct {
	Id        int    `gorm:"primaryKey;auto_increment;type:serial"`
	Education string `gorm:"type:character varying"`
}

type TblJobsRegisters

type TblJobsRegisters struct {
	Id             int `gorm:"primaryKey;auto_increment;type:serial"`
	JobId          int
	ApplicantId    int
	CreatedBy      int                 `gorm:"type:integer"`
	CreatedOn      time.Time           `gorm:"type:timestamp without time zone;DEFAULT:NULL"`
	ApplicantsList []TblJobsApplicants `gorm:"foreignKey:Id;"`
	JobList        []TblJobs           `gorm:"foreignKey:Id;"`
}

type Type

type Type string
const (
	Postgres Type = "postgres"
	Mysql    Type = "mysql"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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