customer

package
v0.0.0-...-337008c Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRepository

func NewRepository(opts ...Option) customer.Repository

Types

type Config

type Config struct {
	DB *gorm.DB
}

type Customer

type Customer struct {
	ID       string `json:"id" gorm:"primaryKey;not null"`
	Name     string `json:"name" gorm:"column:name;not null"`
	AreaCode string `json:"area_code" gorm:"column:area_code;not null"`
	PhoneNum string `json:"phone_num" gorm:"column:phone_num;not null"`
}

func FromEntity

func FromEntity(customer *customer.Customer) *Customer

func (Customer) TableName

func (Customer) TableName() string

func (Customer) ToEntity

func (m Customer) ToEntity() *customer.Customer

type Option

type Option func(*Config)

func WithDB

func WithDB(db *gorm.DB) Option

Jump to

Keyboard shortcuts

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