• haoyanbin's avatar
    1 · c65e78f1
    haoyanbin authored
    c65e78f1
org_news.go 727 Bytes
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"`
	NewsImg     string `json:"newsImg" gorm:"type:varchar(255);comment:NewsImg"`
	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
}