1234567891011121314151617181920212223242526272829303132 |
- package entity
- import (
- "time"
- )
- const TableNameFont = "fonts"
- type Font struct {
- ID int64 `gorm:"column:id;type:int;primaryKey;autoIncrement:true" json:"id"`
- Name string `gorm:"column:name;type:varchar(50);not null" json:"name"`
- Code string `gorm:"column:code;type:varchar(100);not null" json:"code"`
- Path string `gorm:"column:path;type:varchar(100);not null" json:"path"`
- FileName string `gorm:"column:file_name;type:varchar(100);not null" json:"file_name"`
- FileSize int64 `gorm:"column:file_size;type:int;not null" json:"file_size"`
- Hash string `gorm:"column:hash;type:varchar(32);not null" json:"hash"`
- FileType string `gorm:"column:file_type;type:varchar(50);not null;default:application/octet-stream" json:"file_type"`
- Status int64 `gorm:"column:status;type:tinyint;not null;default:1" json:"status"`
- CreateAt time.Time `gorm:"column:create_at;type:timestamp;not null" json:"create_at"`
- UpdateAt time.Time `gorm:"column:update_at;type:timestamp;not null;default:CURRENT_TIMESTAMP" json:"update_at"`
- }
- func (*Font) TableName() string {
- return TableNameFont
- }
|