Documentation
¶
Index ¶
Constants ¶
View Source
const ( EntityName = "entityType2Property" TableName = "entity_type2property" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EntityType2Property ¶
type EntityType2Property struct { EntityTypeID uint `gorm:"type:bigint not null REFERENCES \"entity_type\"(id);primaryKey" json:"entityTypeId"` PropertyID uint `gorm:"type:bigint not null REFERENCES \"property\"(id);primaryKey" json:"propertyId"` IsDependent bool `gorm:"type:boolean not null default false;primaryKey;" json:"isDependent"` EntityType *entity_type.EntityType `json:"entityType"` CreatedAt time.Time `json:"createdAt"` }
EntityType2Property ...
func (*EntityType2Property) TableName ¶
func (e *EntityType2Property) TableName() string
type IService ¶
type IService interface { NewEntity() *EntityType2Property Get(ctx context.Context, id uint) (*EntityType2Property, error) Query(ctx context.Context, query *selection_condition.SelectionCondition) ([]EntityType2Property, error) Count(ctx context.Context, cond *selection_condition.SelectionCondition) (int64, error) Create(ctx context.Context, entity *EntityType2Property) error Delete(ctx context.Context, entity *EntityType2Property) error }
IService encapsulates usecase logic.
func NewService ¶
func NewService(logger log.Logger, repo Repository) IService
NewService creates a new service.
type Repository ¶
type Repository interface { SetDefaultConditions(conditions *selection_condition.SelectionCondition) // Get returns the album with the specified album ID. Get(ctx context.Context, id uint) (*EntityType2Property, error) First(ctx context.Context, entity *EntityType2Property) (*EntityType2Property, error) // Query returns the list of albums with the given offset and limit. Query(ctx context.Context, cond *selection_condition.SelectionCondition) ([]EntityType2Property, error) QueryTx(ctx context.Context, tx *gorm.DB, cond *selection_condition.SelectionCondition) ([]EntityType2Property, error) QueryWithEntityType(ctx context.Context, cond *selection_condition.SelectionCondition) ([]EntityType2Property, error) Count(ctx context.Context, cond *selection_condition.SelectionCondition) (int64, error) Create(ctx context.Context, entity *EntityType2Property) error CreateTx(ctx context.Context, tx *gorm.DB, entity *EntityType2Property) error Delete(ctx context.Context, entity *EntityType2Property) error DeleteTx(ctx context.Context, tx *gorm.DB, entity *EntityType2Property) error }
Repository encapsulates the logic to access albums from the data source.
Click to show internal directories.
Click to hide internal directories.