maximelafarie / humand

Human resources tool for your co-workers leave demands. Self-hosting-ready.
MIT License
7 stars 0 forks source link

Data models #25

Open maximelafarie opened 4 years ago

maximelafarie commented 4 years ago

Here's a bunch of models we could use. Feel free to argue them!

User {
    id: string
    firstname: string
    lastname: string
    email: string
    role: Role
    createdAt: string
    password: string
    params: Params
}

Role {
    id|slug: string
    text: string
}

Leave {
    id: string
    date: string
    type: 'morning' | 'afternoon' | 'allday'
    accepted: boolean
    initiator: User.id
    createdAt: string
}

Params {
    id: string;
    user: User.id
    config: {
        emailNotif: boolean
        pushNotif: boolean
        darkMode: boolean
    }
}

GlobalConfig {
    country: string (use for public holidays)
}
BorbagUskada commented 4 years ago

Seems ok to me, except that I would remove 'allday' and create 2 half-day instead which will be easier to handle