po

package
v0.0.0-...-6a40476 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 7, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const TableNameLcAppFormBase = "lc_app_form_base"

Variables

View Source
var (
	TableNameTable = "lc_app_table"

	TableSimpleSelect = "id,app_id,name,column_flag,auto_schedule_flag,summery_flag"
)
View Source
var TableNameOrgColumn = "lc_app_org_column"
View Source
var TableNameTableColumn = "lc_app_table_column"

Functions

This section is empty.

Types

type Base

type Base struct {
	ID       int64     `gorm:"primarykey;autoIncrement:false" json:"id,string"`
	CreateAt time.Time `gorm:"type:datetime;column:create_at;not null;default:CURRENT_TIMESTAMP" json:"createAt,omitempty"` // 创建日期
	UpdateAt time.Time ``                                                                                                   // 更新日期
	/* 126-byte string literal not displayed */
}

type LcAppFormBase

type LcAppFormBase struct {
	ID         int64     `gorm:"column:id;primaryKey" json:"id"`                                           // 主键
	OrgID      int64     `gorm:"column:org_id;not null;default:0" json:"org_id"`                           // 组织id
	Config     string    `gorm:"column:config;not null" json:"config"`                                     // 字段配置
	Status     int32     `gorm:"column:status;not null;default:1" json:"status"`                           // 1:可用,2:不可用
	Creator    int64     `gorm:"column:creator;not null;default:0" json:"creator"`                         // 创建人
	CreateTime time.Time `gorm:"column:create_time;not null;default:CURRENT_TIMESTAMP" json:"create_time"` // 创建时间
	Updator    int64     `gorm:"column:updator;not null;default:0" json:"updator"`                         // 更新人
	UpdateTime time.Time `gorm:"column:update_time;not null;default:CURRENT_TIMESTAMP" json:"update_time"` // 更新时间
	Version    int32     `gorm:"column:version;not null;default:1" json:"version"`                         // 乐观锁
	DelFlag    int32     `gorm:"column:del_flag;not null;default:2" json:"del_flag"`                       // 是否删除,1是,2否
}

LcAppFormBase mapped from table <lc_app_form_base>

func (*LcAppFormBase) TableName

func (*LcAppFormBase) TableName() string

TableName LcAppFormBase's table name

type OrgColumn

type OrgColumn struct {
	Base
	OrgId      int64  `gorm:"uniqueIndex:idx_org_id_column_id;column:org_id;not null;default:0" json:"org_id"`              // 表id
	ColumnId   string `gorm:"uniqueIndex:idx_org_id_column_id;column:column_id;type:varchar(32);not null" json:"column_id"` // 列id
	ColumnType string `gorm:"column:column_type;type:varchar(32);not null" json:"column_type"`
	Schema     string `gorm:"column:schema;type:json;not null;comment:列配置" json:"schema"` // 列配置
	Creator    int64  `gorm:"column:creator;not null;default:0" json:"creator,omitempty"`
	Updater    int64  `gorm:"column:updater;not null;default:0" json:"updater,omitempty"`
}

OrgColumn 组织(团队)字段

func (*OrgColumn) TableName

func (*OrgColumn) TableName() string

type Row

type Row struct {
	UserIds              []int64                       `gorm:"-"`
	DeptIds              []int64                       `gorm:"-"`
	Buf                  bytes.Buffer                  `gorm:"-"`
	MaxUpdateTime        time.Time                     `gorm:"-"`
	RowCount             int                           `gorm:"-"`
	RelateIssueIds       map[int64]struct{}            `gorm:"-"` // 获取关联的id
	OriginRelateIssueIds map[string]map[string][]int64 `gorm:"-"`
	UserIdsMap           map[int64]struct{}            `gorm:"-"`
	DeptIdsMap           map[int64]struct{}            `gorm:"-"`
	// contains filtered or unexported fields
}

func NewRow

func NewRow() *Row

func (*Row) AddAuthData

func (r *Row) AddAuthData(tableId int64, appAuthData string)

func (*Row) AddColumnData

func (r *Row) AddColumnData(memberColumns []*pb.Column, relateColumnIds []string, needChangeId bool)

func (*Row) Scan

func (r *Row) Scan(values []interface{}, columns []string)

Scan 自定义扫描数据

func (*Row) SetUserDeptIds

func (r *Row) SetUserDeptIds()

func (*Row) TableName

func (r *Row) TableName() string

type Table

type Table struct {
	Base
	Name        string `gorm:"column:name; type:varchar(255);not null" json:"name"`                                     // 表名
	OrgId       int64  `gorm:"index:idx_org_id_summery_flag;column:org_id;not null;default:0" json:"orgId,omitempty"`   // 组织id
	AppId       int64  `gorm:"index:idx_app_id;column:app_id;not null;default:0" json:"appId,string"`                   // 应用id
	Config      string `gorm:"column:config;type:json;not null;comment:配置" json:"config,omitempty"`                     // 配置
	Creator     int64  `gorm:"column:creator;not null;default:0;comment:创建人" json:"creator,omitempty"`                  // 创建人
	Updater     int64  `gorm:"column:updater;not null;default:0;comment:更新人" json:"updater,omitempty"`                  // 更新人
	ColumnFlag  int32  `gorm:"column:column_flag;not null;default:1;comment:是否需要列数据,1是,2否" json:"columnFlag,omitempty"` // 如果没有列数据,查询的时候会直接忽略,不浪费查询资源
	DelFlag     int32  `gorm:"column:del_flag;not null;default:2;comment:是否删除,1是,2否" json:"delFlag,omitempty"`          // 是否删除,1是,2否
	SummeryFlag int32  ``                                                                                               //汇总表标识
	/* 168-byte string literal not displayed */
	AutoScheduleFlag int32 `gorm:"column:auto_schedule_flag;not null;default:1" json:"autoScheduleFlag,omitempty"` // 自动排期是否开启,1否,2是
}

func (*Table) TableName

func (*Table) TableName() string

type TableColumn

type TableColumn struct {
	Base
	OrgId    int64  `gorm:"index:idx_org_id_del_flag_column_id;column:org_id;not null;default:0" json:"org_id,omitempty"`
	TableId  int64  `gorm:"uniqueIndex:idx_table_id_column_id;column:table_id;not null;default:0" json:"table_id"` // 表id
	ColumnId string ``                                                                                             // 列id
	/* 137-byte string literal not displayed */
	ColumnType        string `gorm:"column:column_type;type:varchar(32);not null" json:"column_type"`
	Schema            string `gorm:"column:schema;type:json;not null;comment:列配置" json:"schema"`         // 列配置
	Description       string `gorm:"column:description;type:varchar(8000);not null;default:''" json:"-"` // 列描述
	SourceOrgColumnId string ``                                                                          /* 169-byte string literal not displayed */
	DelFlag           int32  ``                                                                          /* 134-byte string literal not displayed */
	Creator           int64  `gorm:"column:creator;not null;default:0" json:"creator,omitempty"`
	Updater           int64  `gorm:"column:updater;not null;default:0" json:"updater,omitempty"`
}

func (*TableColumn) TableName

func (*TableColumn) TableName() string

Directories

Path Synopsis
gen

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL