models

package
v0.0.0-...-7253f33 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package models 模型通用属性和方法

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseModel

type BaseModel struct {
	ID uint64 `gorm:"column:id;primaryKey;autoIncrement;" json:"id,omitempty"`
}

BaseModel 模型基类

func (BaseModel) GetStringID

func (a BaseModel) GetStringID() string

GetStringID 获取 ID 的字符串格式

type CommonTimestampsField

type CommonTimestampsField struct {
	CreatedAt time.Time `gorm:"column:created_at;index;" json:"created_at,omitempty"`
	UpdatedAt time.Time `gorm:"column:updated_at;index;" json:"updated_at,omitempty"`
}

CommonTimestampsField 时间戳

Directories

Path Synopsis
Package sys
Package sys

Jump to

Keyboard shortcuts

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