property_type2property_view_type

package
v0.0.0-...-4f702ff Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 31, 2023 License: MIT Imports: 6 Imported by: 0

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

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 New

New func is a constructor for the EntityType

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL