entity

package
v0.0.0-...-c320df0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Status

type Status struct {
	ID   uuid.UUID `bson:"_id" gorm:"type:uuid;primaryKey;default:uuid_generate_v4()"`
	Name string    `bson:"name" gorm:"type:varchar(255);not null;unique"`
}

type Transaction

type Transaction struct {
	ID        uuid.UUID      `bson:"_id" gorm:"type:uuid;default:uuid_generate_v4();primaryKey"`
	CreatedAt time.Time      `bson:"created_at"`
	UpdatedAt time.Time      `bson:"updated_at"`
	DeletedAt gorm.DeletedAt `bson:"deleted_at" gorm:"index"`
	IsDeleted bool           `bson:"is_deleted" gorm:"default:false"`
	StatusID  uuid.UUID      `bson:"-" gorm:"type:uuid"`
	Status    Status         `bson:"status" gorm:"foreignKey:StatusID;references:ID"`
	Value     float64        `bson:"value" gorm:"default:0;notnull"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳