models

package
v0.0.0-...-ad0e884 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LoginRequestDto

type LoginRequestDto struct {
	Username string `json:"username" form:"username"`
	Password string `json:"password" form:"password"`
}

type LoginUserDto

type LoginUserDto struct {
	ID       uint   `json:"id"`
	Username string `json:"username"`
}

type Message

type Message struct {
	ID        uint      `json:"id" gorm:"primaryKey" db:"id"`
	FkUser    uint      `json:"fk_user" db:"fk_user"`
	Content   string    `json:"content" db:"content"`
	Active    bool      `json:"active" db:"active"`
	CreatedAt time.Time `json:"created_at" db:"created_at"`
	UpdatedAt time.Time `json:"updated_at" db:"updated_at"`
}

type MessageCreateDto

type MessageCreateDto struct {
	Content string `json:"content"`
}

type MessageResponseDto

type MessageResponseDto struct {
	ID                    uint      `json:"id"`
	Content               string    `json:"content"`
	PostedBy              string    `json:"posted_by"`
	CreatedAt             time.Time `json:"created_at"`
	IsPostedByCurrentUser bool      `json:"is_posted_by_current_user"`
}

type PaginationDto

type PaginationDto struct {
	Page  int `json:"page" query:"page"`
	Limit int `json:"limit" query:"limit"`
}

type SuccessResponseDto

type SuccessResponseDto struct {
	Message string `json:"message"`
	Success bool   `json:"success"`
}

type User

type User struct {
	ID        uint      `json:"id" gorm:"primaryKey" db:"id"`
	Username  string    `json:"username" db:"username"`
	Password  string    `json:"password" db:"password"`
	Active    bool      `json:"active" db:"active"`
	CreatedAt time.Time `json:"created_at" db:"created_at"`
	UpdatedAt time.Time `json:"updated_at" db:"updated_at"`
}

type UserCreateDto

type UserCreateDto struct {
	Username        string `json:"username" form:"username"`
	Password        string `json:"password" form:"password"`
	ConfirmPassword string `json:"confirm_password" form:"confirm_password"`
}

Jump to

Keyboard shortcuts

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