B-Open / jobbuzz

Brunei job search database and alert notification
https://jobbuzz.org
MIT License
1 stars 1 forks source link

Anonymous salary report #49

Open dsychin opened 2 years ago

dsychin commented 2 years ago

Salary reporting similar to glassdoor.

This would be a fairly big feature so the details should be discussed before development.

References:

syahnur197 commented 2 years ago

We might need to have a Salary type

type Industry struct {
    ID   uint64
    Name string
}

type Sector struct {
    ID   uint64
    Name string
}

type Salary struct {
    ID               uint64
    IndustryID       *uint64
    Industry         *Industry
    SectorID         *uint64
    Sector           *Sector
    SalaryPerMonth   int64
    SalaryPerYear    int64
    YearOfExperience int
    Type             int // 1 -> full-time, 2 -> part-time
}

We then can just seed the available industries and sectors, we also allow anyone to suggest sectors and/or industries

dsychin commented 2 years ago

Type can be a custom int type

type ContractType uint64

const (
    FullTime ContractType = iota + 1
    PartTime
    Intern
)

Probably don't need to store annual salary since that can be calculated?

func (s *Salary) GetAnnualSalary() int64 {
    return s.SalaryPerMonth * 12
}

Also need to link which account submitted the entry as well?