Files
stock/internal/models/stock_basic.go
2026-01-13 15:30:55 +08:00

35 lines
1.4 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package models
import (
"git.apinb.com/bsm-sdk/core/database"
"gorm.io/gorm"
)
// StockBasic 股票基本信息表
type StockBasic struct {
gorm.Model
TsCode string `gorm:"type:varchar(50);not null;index;comment:TS代码"`
Symbol string `gorm:"type:varchar(50);not null;comment:股票代码"`
Name string `gorm:"type:varchar(50);not null;comment:股票名称"`
Area string `gorm:"type:varchar(50);not null;default:'';comment:地域"`
Industry string `gorm:"type:varchar(50);not null;default:'';comment:所属行业"`
FullName string `gorm:"type:varchar(500);comment:股票全称"`
EnName string `gorm:"type:varchar(200);comment:英文全称"`
CnSpell string `gorm:"type:varchar(50);not null;default:'';comment:拼音缩写"`
Market string `gorm:"type:varchar(50);not null;comment:市场类型(主板/创业板/科创板/CDR"`
Exchange string `gorm:"type:varchar(50);comment:交易所代码"`
ListDate string `gorm:"type:varchar(50);not null;comment:上市日期"`
IsHS string `gorm:"type:varchar(2);default:'N';comment:是否沪深港通标的N否 H沪股通 S深股通"`
ActName string `gorm:"type:varchar(500);not null;default:'';comment:实控人名称"`
ActEntType string `gorm:"type:varchar(50);not null;default:'';comment:实控人企业性质"`
}
func init() {
database.AppendMigrate(&StockBasic{})
}
// TableName 设置表名
func (StockBasic) TableName() string {
return "stock_basic"
}