model

package
v0.0.0-...-0227844 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Seat

type Seat struct {
	SeatId         uint           `gorm:"primaryKey"`
	Name           string         `gorm:"unique;not null"`
	Price          uint           `gorm:"not null"`
	Link           string         `gorm:"not null"`
	Status         string         `gorm:"not null"`
	PostSaleStatus string         `gorm:`
	Transaction    []Transaction  `gorm:"foreignKey:SeatId"json:"-"`
	CreatedAt      time.Time      `json:"-"`
	UpdatedAt      time.Time      `json:"-"`
	DeletedAt      gorm.DeletedAt `json:"-"`
}

type Transaction

type Transaction struct {
	TransactionId uint64 `gorm:"primaryKey"`
	OrderId       string `gorm:"not null"`
	UserId        uint64 `gorm:"not null"`
	SeatId        uint   `gorm:"not null"`
	User          User
	Seat          Seat
	Vendor        string
	Confirmation  string
	CreatedAt     time.Time      `json:"-"`
	UpdatedAt     time.Time      `json:"-"`
	DeletedAt     gorm.DeletedAt `json:"-"`
}

type User

type User struct {
	UserId      uint64 `gorm:"primaryKey"`
	Name        string
	Email       string `gorm:"not null"`
	Phone       string
	TotpSecret  string         `json:"-"`
	Transaction []Transaction  `gorm:"foreignKey:UserId;references:UserId"json:"-"`
	CreatedAt   time.Time      `json:"-"`
	UpdatedAt   time.Time      `json:"-"`
	DeletedAt   gorm.DeletedAt `json:"-"`
}

Jump to

Keyboard shortcuts

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