-
Notifications
You must be signed in to change notification settings - Fork 0
/
professors.gen.go
30 lines (24 loc) · 1.01 KB
/
professors.gen.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.
package model
import (
"time"
"gorm.io/gorm"
)
const TableNameProfessor = "professors"
// Professor mapped from table <professors>
type Professor struct {
ID int32 `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
FirstName string `gorm:"column:first_name" json:"first_name"`
LastName string `gorm:"column:last_name" json:"last_name"`
Email string `gorm:"column:email" json:"email"`
CreatedAt time.Time `gorm:"column:created_at;default:CURRENT_TIMESTAMP" json:"created_at"`
UpdatedAt time.Time `gorm:"column:updated_at;default:CURRENT_TIMESTAMP" json:"updated_at"`
DeletedAt gorm.DeletedAt `gorm:"column:deleted_at" json:"deleted_at"`
Subjects []Subject `gorm:"foreignKey:professor_id" json:"subjects"`
}
// TableName Professor's table name
func (*Professor) TableName() string {
return TableNameProfessor
}