Gorm 简单应用

Gorm 简单应用
package main

import (
"fmt"
"gorm.io/driver/mysql"
"gorm.io/gorm"
"gorm.io/gorm/logger"
"gorm.io/plugin/soft_delete"
"log"
"os"
"time"
)

// odf和odfhistory共有的字段结构,单独列出来,然后不同的再在其自己的结构体中设计
type OdfModels struct {
ID int `json:"id" gorm:"column:id;primaryKey;autoIncrement;<-:false;comment:主键ID;not null"` OdfSn string `json:"sn" gorm:"column:sn;index:idx_sn_deleted_time,unique,priorit

Gorm 简单应用最先出现在Python成神之路

版权声明:
作者:congcong
链接:https://www.techfm.club/p/13247.html
来源:TechFM
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
< <上一篇
下一篇>>