github.com/miguelgrubin/gin-boilerplate@v0.0.0-20231208120009-f8f00c6d4138/pkg/petshop/infrastructure/storage/pet_entity.go (about)

     1  // Package storage provides specific way to store petshop data into databases.
     2  package storage
     3  
     4  import "time"
     5  
     6  type PetEntity struct {
     7  	ID        string     `gorm:"primary_key;"`
     8  	Name      string     `gorm:"size:100;not null;"`
     9  	Status    string     `gorm:"size:100;not null;"`
    10  	CreatedAt time.Time  `gorm:"not null;"`
    11  	UpdatedAt time.Time  `gorm:"not null;"`
    12  	DeletedAt *time.Time ``
    13  }
    14  
    15  func (pe *PetEntity) TableName() string {
    16  	return "pets"
    17  }