36 lines
1023 B
Go
36 lines
1023 B
Go
package models
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
type Position struct {
|
|
ID uuid.UUID `db:"id" json:"id"`
|
|
Code string `db:"code" json:"code"`
|
|
CreatedAt time.Time `db:"created_at" json:"created_at"`
|
|
UpdatedAt time.Time `db:"updated_at" json:"updated_at"`
|
|
}
|
|
|
|
type PositionTranslation struct {
|
|
PositionID uuid.UUID `db:"position_id" json:"position_id"`
|
|
Locale string `db:"locale" json:"locale"`
|
|
Name string `db:"name" json:"name"`
|
|
Description *string `db:"description" json:"description,omitempty"`
|
|
}
|
|
|
|
type UserPosition struct {
|
|
ID uuid.UUID `db:"id" json:"id"`
|
|
UserID uuid.UUID `db:"user_id" json:"user_id"`
|
|
PositionID uuid.UUID `db:"position_id" json:"position_id"`
|
|
ValidFrom time.Time `db:"valid_from" json:"valid_from"`
|
|
ValidTo *time.Time `db:"valid_to" json:"valid_to,omitempty"`
|
|
}
|
|
|
|
type PositionLocalized struct {
|
|
Code string `json:"code"`
|
|
Name string `json:"name"`
|
|
Description *string `json:"description,omitempty"`
|
|
}
|