models

package
v2.0.11 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CodeLoginWeb = 1 + iota
	CodeLoginApp
	CodeLoginMini
	CodeLoginSub
)

Variables

View Source
var LoginType = map[int]string{
	CodeLoginWeb:  "web登录",
	CodeLoginApp:  "app登录",
	CodeLoginMini: "小程序登录",
	CodeLoginSub:  "公众号登录",
}
View Source
var UserCol = struct {
	Id        string
	OpenId    string
	CreatedAt string
	UpdatedAt string
}{
	Id:        "id",
	OpenId:    "open_id",
	CreatedAt: "created_at",
	UpdatedAt: "updated_at",
}

Functions

This section is empty.

Types

type User

type User struct {
	Id        uint32 `json:"id" `         // 主键
	OpenId    string `json:"open_id" `    // 微信openID
	CreatedAt uint32 `json:"created_at" ` // 创建时间
	UpdatedAt uint32 `json:"updated_at" ` // 更新时间
}

User 用户表 CREATE TABLE `user` (

`id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`open_id` varchar(32) DEFAULT NULL COMMENT '微信openID',
`created_at` int unsigned DEFAULT NULL COMMENT '创建时间',
`updated_at` int unsigned DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`),
UNIQUE KEY `user_id_uindex` (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='用户表'

func (*User) TableName

func (*User) TableName() string

Directories

Path Synopsis
Package cond @Author: asus @Description: $ @File: cond @Data: 2022/4/129:54
Package cond @Author: asus @Description: $ @File: cond @Data: 2022/4/129:54

Jump to

Keyboard shortcuts

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