models

package
v0.0.0-...-97f9063 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommentToProto

func CommentToProto(comment *Comment) *protobuffer.Comment

func CommentsToProto

func CommentsToProto(comments []*Comment) []*protobuffer.Comment

Types

type Comment

type Comment struct {
	gorm.Model
	ID     string `gorm:"type:uuid;default:uuid_generate_v4()" validate:"omitempty,uuid4"`
	ModID  string `gorm:"type:uuid;" validate:"uuid4,required"`
	UserID string `gorm:"type:varchar(50);not null;default:null" validate:"required"`
	Text   string `gorm:"type:varchar(250);not null;default:null" validate:"min=1,max=250"`
}

Jump to

Keyboard shortcuts

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