| 1234567891011121314151617181920212223 |
- package model
- import (
- "time"
- "gorm.io/gorm"
- )
- // NewsCategory 对应 cy_news_category 表
- type NewsCategory struct {
- ID uint `gorm:"primaryKey"`
- ParentID uint `gorm:"column:parent_id;default:0;not null"`
- Name string `gorm:"column:name;size:50;not null"`
- Sort int `gorm:"column:sort;default:100;not null"`
- Status int8 `gorm:"column:status;default:1;not null"`
- CreateTime time.Time `gorm:"column:create_time"`
- UpdateTime time.Time `gorm:"column:update_time"`
- DeleteTime gorm.DeletedAt `gorm:"column:delete_time;index"`
- }
- func (NewsCategory) TableName() string {
- return "cy_news_category"
- }
|