Documentation ¶
Index ¶
- Constants
- type NationalOccupationalClassification
- type NationalOccupationalClassificationElement
- type NationalOccupationalClassificationStorer
- type NationalOccupationalClassificationStorerImpl
- func (impl NationalOccupationalClassificationStorerImpl) Create(ctx context.Context, u *NationalOccupationalClassification) error
- func (impl NationalOccupationalClassificationStorerImpl) GetByCode(ctx context.Context, code uint) (*NationalOccupationalClassification, error)
- func (impl NationalOccupationalClassificationStorerImpl) GetByID(ctx context.Context, id primitive.ObjectID) (*NationalOccupationalClassification, error)
- func (impl NationalOccupationalClassificationStorerImpl) GetByPublicID(ctx context.Context, oldID uint64) (*NationalOccupationalClassification, error)
- func (impl NationalOccupationalClassificationStorerImpl) GetLatestByTenantID(ctx context.Context, tenantID primitive.ObjectID) (*NationalOccupationalClassification, error)
- func (impl NationalOccupationalClassificationStorerImpl) UpdateByID(ctx context.Context, m *NationalOccupationalClassification) error
Constants ¶
View Source
const ( StatusActive = 1 StatusArchived = 2 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NationalOccupationalClassification ¶
type NationalOccupationalClassification struct { ID primitive.ObjectID `bson:"_id" json:"id"` TenantID primitive.ObjectID `bson:"tenant_id" json:"tenant_id,omitempty"` Status int8 `bson:"status" json:"status"` PublicID uint64 `bson:"public_id" json:"public_id"` LanguageCode string `bson:"language_code" json:"language_code"` // Please use `ISO 639-1` (https://en.wikipedia.org/wiki/ISO_639-1). Version string `bson:"version" json:"version"` // Ex: "NOC 2021 V1.0" Level uint8 `bson:"level" json:"level"` // Ex: 1 Code uint `bson:"code" json:"code"` // Ex: 1 CodeStr string `bson:"code_str" json:"code_str"` // Ex: 00001 BroadCategoryCode uint `bson:"broad_category_code" json:"broad_category_code"` BroadCategoryCodeStr string `bson:"broad_category_code_str" json:"broad_category_code_str"` BroadCategoryTitle string `bson:"broad_category_title" json:"broad_category_title"` BroadCategoryDescription string `bson:"broad_category_description" json:"broad_category_description"` MajorGroupCode uint `bson:"major_group_code" json:"major_group_code"` MajorGroupCodeStr string `bson:"major_group_code_str" json:"major_group_code_str"` MajorGroupTitle string `bson:"major_group_title" json:"major_group_title"` MajorGroupDescription string `bson:"major_group_description" json:"major_group_description"` SubMinorGroupCode uint `bson:"sub_minor_group_code" json:"sub_minor_group_code"` SubMinorGroupCodeStr string `bson:"sub_minor_group_code_str" json:"sub_minor_group_code_str"` SubMinorGroupTitle string `bson:"sub_minor_group_title" json:"sub_minor_group_title"` SubMinorGroupDescription string `bson:"sub_minor_group_description" json:"sub_minor_group_description"` MinorGroupCode uint `bson:"minor_group_code" json:"minor_group_code"` MinorGroupCodeStr string `bson:"minor_group_code_str" json:"minor_group_code_str"` MinorGroupTitle string `bson:"minor_group_title" json:"minor_group_title"` MinorGroupDescription string `bson:"minor_group_description" json:"minor_group_description"` UnitGroupCode uint `bson:"unit_group_code" json:"unit_group_code"` UnitGroupCodeStr string `bson:"unit_group_code_str" json:"unit_group_code_str"` UnitGroupTitle string `bson:"unit_group_title" json:"unit_group_title"` UnitGroupDescription string `bson:"unit_group_description" json:"unit_group_description"` Elements []*NationalOccupationalClassificationElement `bson:"elements" json:"elements"` }
type NationalOccupationalClassificationStorer ¶
type NationalOccupationalClassificationStorer interface { Create(ctx context.Context, m *NationalOccupationalClassification) error GetByID(ctx context.Context, id primitive.ObjectID) (*NationalOccupationalClassification, error) GetByPublicID(ctx context.Context, oldID uint64) (*NationalOccupationalClassification, error) GetLatestByTenantID(ctx context.Context, tenantID primitive.ObjectID) (*NationalOccupationalClassification, error) GetByCode(ctx context.Context, code uint) (*NationalOccupationalClassification, error) // CheckIfExistsByEmail(ctx context.Context, email string) (bool, error) UpdateByID(ctx context.Context, m *NationalOccupationalClassification) error }
NationalOccupationalClassificationStorer Interface for user.
func NewDatastore ¶
type NationalOccupationalClassificationStorerImpl ¶
type NationalOccupationalClassificationStorerImpl struct { Logger *slog.Logger DbClient *mongo.Client Collection *mongo.Collection }
func (NationalOccupationalClassificationStorerImpl) Create ¶
func (impl NationalOccupationalClassificationStorerImpl) Create(ctx context.Context, u *NationalOccupationalClassification) error
func (NationalOccupationalClassificationStorerImpl) GetByCode ¶
func (impl NationalOccupationalClassificationStorerImpl) GetByCode(ctx context.Context, code uint) (*NationalOccupationalClassification, error)
func (NationalOccupationalClassificationStorerImpl) GetByID ¶
func (impl NationalOccupationalClassificationStorerImpl) GetByID(ctx context.Context, id primitive.ObjectID) (*NationalOccupationalClassification, error)
func (NationalOccupationalClassificationStorerImpl) GetByPublicID ¶
func (impl NationalOccupationalClassificationStorerImpl) GetByPublicID(ctx context.Context, oldID uint64) (*NationalOccupationalClassification, error)
func (NationalOccupationalClassificationStorerImpl) GetLatestByTenantID ¶
func (impl NationalOccupationalClassificationStorerImpl) GetLatestByTenantID(ctx context.Context, tenantID primitive.ObjectID) (*NationalOccupationalClassification, error)
func (NationalOccupationalClassificationStorerImpl) UpdateByID ¶
func (impl NationalOccupationalClassificationStorerImpl) UpdateByID(ctx context.Context, m *NationalOccupationalClassification) error
Click to show internal directories.
Click to hide internal directories.