Documentation ¶
Index ¶
Constants ¶
View Source
const ( EntityName = "propertyType2PropertyViewType" TableName = "property_type2property_view_type" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IService ¶
type IService interface { NewEntity() *PropertyType2PropertyViewType Get(ctx context.Context, id uint) (*PropertyType2PropertyViewType, error) Query(ctx context.Context, query *selection_condition.SelectionCondition) ([]PropertyType2PropertyViewType, error) Count(ctx context.Context, cond *selection_condition.SelectionCondition) (int64, error) Create(ctx context.Context, entity *PropertyType2PropertyViewType) error Update(ctx context.Context, entity *PropertyType2PropertyViewType) error Save(ctx context.Context, entity *PropertyType2PropertyViewType) error Delete(ctx context.Context, entity *PropertyType2PropertyViewType) error }
IService encapsulates usecase logic.
func NewService ¶
func NewService(logger log.Logger, repo Repository) IService
NewService creates a new service.
type PropertyType2PropertyViewType ¶
type PropertyType2PropertyViewType struct { PropertyTypeID uint `gorm:"type:bigint not null REFERENCES \"property_type\"(id);primaryKey" json:"propertyTypeID"` PropertyViewTypeID uint `gorm:"type:bigint not null REFERENCES \"property_view_type\"(id);primaryKey" json:"propertyViewTypeID"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` DeletedAt gorm.DeletedAt `gorm:"index" json:"deletedAt,omitempty"` }
PropertyType2PropertyViewType ...
func (*PropertyType2PropertyViewType) TableName ¶
func (e *PropertyType2PropertyViewType) TableName() string
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) (*PropertyType2PropertyViewType, error) First(ctx context.Context, entity *PropertyType2PropertyViewType) (*PropertyType2PropertyViewType, error) // Query returns the list of items with the given conditions. Query(ctx context.Context, cond *selection_condition.SelectionCondition) ([]PropertyType2PropertyViewType, error) Count(ctx context.Context, cond *selection_condition.SelectionCondition) (int64, error) Create(ctx context.Context, entity *PropertyType2PropertyViewType) error Update(ctx context.Context, entity *PropertyType2PropertyViewType) error Save(ctx context.Context, entity *PropertyType2PropertyViewType) error Delete(ctx context.Context, entity *PropertyType2PropertyViewType) error }
Repository encapsulates the logic to access albums from the data source.
Click to show internal directories.
Click to hide internal directories.