Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdminDetailDto ¶
type AdminDetailDto struct {
*Entity
}
type AdminListDto ¶
type AdminListDto struct {
*Entity
}
type Entity ¶
type Entity struct { UUID string `json:"uuid" bson:"_id,omitempty"` CategoryID string `json:"categoryId" bson:"category_id" validate:"required"` Meta map[Locale]*Meta `json:"meta" bson:"meta" validate:"required,dive"` Order *int `json:"order" bson:"order" validate:"required,min=0,max=100"` IsActive bool `json:"isActive" bson:"is_active" validate:"required,boolean"` CreatedAt time.Time `json:"createdAt" bson:"created_at" validate:"required"` UpdatedAt time.Time `json:"updatedAt" bson:"updated_at" validate:"required"` }
func (*Entity) ToAdminDetail ¶
func (e *Entity) ToAdminDetail() AdminDetailDto
func (*Entity) ToAdminList ¶
func (e *Entity) ToAdminList() AdminListDto
type FilterEntity ¶
type Repo ¶
type Repo interface { Create(ctx context.Context, entity *Entity) (*Entity, *i18np.Error) Update(ctx context.Context, entity *Entity) *i18np.Error GetByID(ctx context.Context, id string) (*Entity, bool, *i18np.Error) GetBySlug(ctx context.Context, locale string, slug string) (*Entity, bool, *i18np.Error) Activate(ctx context.Context, id string) *i18np.Error Deactivate(ctx context.Context, id string) *i18np.Error ReOrder(ctx context.Context, id string, order int) *i18np.Error Filter(ctx context.Context, filter FilterEntity) ([]*Entity, *i18np.Error) FilterAdmin(ctx context.Context, filter FilterEntity) ([]*Entity, *i18np.Error) }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.