2023-10-19 22:47:12 +09:00
package models
2023-11-17 01:38:01 +09:00
import "time"
2023-10-19 22:47:12 +09:00
type User struct {
2023-11-17 01:38:01 +09:00
ID string ` json:"id" db:"id" example:"137c1683-2ad6-4201-b256-253828b61c49" gorm:"column:id;size:255;primary_key;" `
Username string ` json:"username" db:"username" example:"user0" gorm:"column:username;size:50;uniqueIndex;" `
Name string ` json:"name" db:"name" example:"홍길동" gorm:"column:name;size:50;" `
Score int32 ` json:"score" db:"score" example:"9999" gorm:"column:score;" `
Password string ` json:"-" db:"password" gorm:"column:password;size:255;not null;" `
2023-11-23 00:30:50 +09:00
UpdatedAt time . Time ` json:"-" gorm:"column:updated_at;type:DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP;index;->:false" `
CreatedAt time . Time ` json:"-" gorm:"column:created_at;type:DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;index;->:false;<-:create" `
2023-11-17 01:38:01 +09:00
}
type UserListResponse struct {
Data [ ] User ` json:"data" `
Total int64 ` json:"total" example:"90" `
Page int ` json:"page" example:"1" `
TotalPage int64 ` json:"totalPage" example:"9" `
PageSize int ` json:"pageSize" example:"10" `
2023-10-19 22:47:12 +09:00
}