models

package
v0.0.0-...-d9433bb Latest Latest
Warning

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

Go to latest
Published: Jan 25, 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 BaseModel

type BaseModel struct {
	BaseModelTimes

	ID uuid.UUID `bun:"type:uuid"`
}

type BaseModelResponse

type BaseModelResponse struct {
	BaseModelTimesResponse

	ID uuid.UUID `json:"id"`
}

type BaseModelTimes

type BaseModelTimes struct {
	CreatedAt time.Time  `bun:"type:timestampz,nullzero,notnull,default:current_timestamp"`
	UpdatedAt time.Time  `bun:"type:timestampz,nullzero,notnull,default:current_timestamp"`
	DeletedAt *time.Time `bun:"type:timestampz"`
}

type BaseModelTimesResponse

type BaseModelTimesResponse struct {
	CreatedAt time.Time  `json:"createdAt"`
	UpdatedAt time.Time  `json:"updatedAt"`
	DeletedAt *time.Time `json:"deletedAt"`
}

type Migration

type Migration struct {
	ID        uint16
	AppliedAt time.Time
}

type Migrations

type Migrations []*Migration

type User

type User struct {
	BaseModel

	FirstName string
	LastName  string
	Email     string
}

type Users

type Users []*User

Jump to

Keyboard shortcuts

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