org_news.go 672 Bytes
Newer Older
haoyanbin's avatar
1  
haoyanbin committed
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 31
package models

import (
   // "gorm.io/gorm"

	"go-admin/common/models"
)

type OrgNews struct {
    models.Model
    
    NewsName string `json:"newsName" gorm:"type:varchar(20);comment:NewsName"` 
    NewsTitle string `json:"newsTitle" gorm:"type:varchar(20);comment:NewsTitle"` 
    NewsContent string `json:"newsContent" gorm:"type:text;comment:NewsContent"` 
    Status string `json:"status" gorm:"type:tinyint(1);comment:Status"` 
    models.ModelTime
    models.ControlBy
}

func (OrgNews) TableName() string {
    return "org_news"
}

func (e *OrgNews) Generate() models.ActiveRecord {
	o := *e
	return &o
}

func (e *OrgNews) GetId() interface{} {
	return e.Id
}