2024-03-26 02:21:35 +03:00
|
|
|
package news
|
|
|
|
|
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
|
|
|
|
"github.com/uptrace/bun"
|
|
|
|
)
|
|
|
|
|
|
|
|
type DBNews struct {
|
2024-05-03 11:57:53 +03:00
|
|
|
bun.BaseModel `bun:"select:api_news"`
|
|
|
|
ID int64 `bun:"id" json:"id"`
|
|
|
|
IsActive bool `bun:"is_active" json:"isActive"`
|
|
|
|
Sort int64 `bun:"sort" json:"sort"`
|
|
|
|
Name string `bun:"name" json:"name"`
|
|
|
|
Content string `bun:"content" json:"content"`
|
|
|
|
Code string `bun:"code" json:"code"`
|
|
|
|
Picture string `bun:"picture" json:"picture"`
|
|
|
|
Date time.Time `bun:"date" json:"date"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type DBArticle struct {
|
|
|
|
bun.BaseModel `bun:"select:api_article"`
|
|
|
|
ID int64 `bun:"id" json:"id"`
|
|
|
|
IsActive bool `bun:"is_active" json:"isActive"`
|
|
|
|
Sort int64 `bun:"sort" json:"sort"`
|
|
|
|
Name string `bun:"name" json:"name"`
|
|
|
|
Content string `bun:"content" json:"content"`
|
|
|
|
Code string `bun:"code" json:"code"`
|
|
|
|
Picture string `bun:"picture" json:"picture"`
|
|
|
|
Date time.Time `bun:"date" json:"date"`
|
2024-03-26 02:21:35 +03:00
|
|
|
}
|