entity

package
v0.0.0-...-3ddb297 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2021 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 Notification

type Notification struct {
	ID        int        `json:"id" gorm:"Column:id; Type:int; PRIMARY KEY; AutoIncrement"`
	CardID    int        `json:"cardID" gorm:"Column:card_id; Type:int"`
	Content   string     `json:"content" gorm:"Column:content; Type:text; NOT NULL"`
	UserNotis []UserNoti `json:"-" gorm:"foreignKey:NotiID"`
	Seen      bool       `json:"seen" gorm:"-"`
	CreatedAt time.Time  `json:"createdAt"`
	UpdatedAt time.Time  `json:"updatedAt"`
	DeletedAt time.Time  `json:"deletedAt"`
}

type UserNoti

type UserNoti struct {
	UserID    int       `json:"userID" gorm:"Column:user_id; Type:int; PRIMARY KEY"`
	NotiID    int       `json:"notificationID" gorm:"Column:noti_id; Type:int; PRIMARY KEY"`
	Seen      bool      `json:"seen" gorm:"Column:seen; Type:boolean; default:false"`
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
	DeletedAt time.Time `json:"deletedAt"`
}

Jump to

Keyboard shortcuts

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