Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateDTO ¶
type CreateDTO struct { ProjectID uint `schema:"project_id,required"` Name string `schema:"name,required"` Margin float64 `schema:"margin,required"` Risks float64 `schema:"risks,required"` StartDate time.Time `schema:"start_date,required"` EndDate time.Time `schema:"end_date,required"` }
func (*CreateDTO) ToEntity ¶
func (p *CreateDTO) ToEntity() *ProjectStage
type CreatedEvent ¶
type CreatedEvent struct { Sender user.User Session session.Session Data CreateDTO Result ProjectStage }
func NewCreatedEvent ¶
func NewCreatedEvent(ctx context.Context, data CreateDTO) (*CreatedEvent, error)
type DeletedEvent ¶
type DeletedEvent struct { Sender user.User Session session.Session Result ProjectStage }
func NewDeletedEvent ¶
func NewDeletedEvent(ctx context.Context) (*DeletedEvent, error)
type ProjectStage ¶
type Repository ¶
type Repository interface { Count(ctx context.Context) (uint, error) GetAll(ctx context.Context) ([]*ProjectStage, error) GetPaginated(ctx context.Context, limit, offset int, sortBy []string) ([]*ProjectStage, error) GetByID(ctx context.Context, id uint) (*ProjectStage, error) Create(ctx context.Context, data *ProjectStage) error Update(ctx context.Context, data *ProjectStage) error Delete(ctx context.Context, id uint) error }
type UpdateDTO ¶
type UpdateDTO struct { ProjectID uint `schema:"project_id"` Name string `schema:"name"` Margin float64 `schema:"margin"` Risks float64 `schema:"risks"` StartDate time.Time `schema:"start_date"` EndDate time.Time `schema:"end_date"` }
func (*UpdateDTO) ToEntity ¶
func (p *UpdateDTO) ToEntity(id uint) *ProjectStage
type UpdatedEvent ¶
type UpdatedEvent struct { Sender user.User Session session.Session Data UpdateDTO Result ProjectStage }
func NewUpdatedEvent ¶
func NewUpdatedEvent(ctx context.Context, data UpdateDTO) (*UpdatedEvent, error)
Click to show internal directories.
Click to hide internal directories.