common

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package common contains common fields across all models.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Common

type Common struct {
	// CreatedAt is the time the record was created.
	CreatedAt time.Time `json:"createdAt,omitempty" form:"createdAt" query:"createdAt" validate:"omitempty"`

	// CreatedBy is the user who created the record.
	CreatedBy string `json:"createdBy,omitempty" form:"createdBy" query:"createdBy" validate:"omitempty,gt=0"`

	// DeleteAt is the time the record was deleted.
	DeleteAt time.Time `json:"deleteAt,omitempty" form:"deleteAt" query:"deleteAt" validate:"omitempty"`

	// DeleteBy is the user who deleted the record.
	DeleteBy string `json:"deleteBy,omitempty" form:"deleteBy" query:"deleteBy" validate:"omitempty,gt=0"`

	// ID is the unique identifier for the record.
	//
	// NOTE: the `id:"uuid"` tag automatically sets with an UUID ONLY if the
	// field is empty.
	ID string `` /* 138-byte string literal not displayed */

	// Status is the status of the record.
	Status status.Status `json:"status" form:"status" query:"status" validate:"omitempty,gt=0" default:"active"`

	// UpdatedAt is the time the record was updated.
	UpdatedAt time.Time `json:"updatedAt,omitempty" form:"updatedAt" query:"updatedAt" validate:"omitempty"`

	// UpdatedBy is the user who updated the record.
	UpdatedBy string `json:"updatedBy,omitempty" form:"updatedBy" query:"updatedBy" validate:"omitempty,gt=0"`
}

Common contains common fields across all models.

func New

func New() (*Common, error)

New creates a new Common with initialized default values.

Jump to

Keyboard shortcuts

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