video,user使用gorm.model

This commit is contained in:
junleea 2024-06-03 17:13:23 +08:00
parent 288feb822c
commit d002a4cb45
2 changed files with 4 additions and 2 deletions

View File

@ -2,10 +2,11 @@ package dao
import (
"fmt"
"gorm.io/gorm"
)
type User struct {
ID uint `gorm:"primarykey column:id"`
gorm.Model
Name string `gorm:"column:name"`
Age int `gorm:"column:age"`
Email string `gorm:"column:email"`

View File

@ -1,11 +1,12 @@
package dao
import (
"gorm.io/gorm"
"time"
)
type Video struct {
ID uint `gorm:"primarykey column:id"`
gorm.Model
CameraID int `gorm:"column:camera_id"`
VideoPath string `gorm:"column:video_path"`
VideoName string `gorm:"column:video_name"`