Documentation ¶
Index ¶
- Constants
- func IgnoreStaffPassword(staffList []interface{}) []interface{}
- func MarshalRelatedInvoiceArray(r []RelatedInvoice) []byte
- type Analyzer
- type BasicModel
- type BookNameInfo
- type Commodity
- func (c *Commodity) AfterCreate(db *gorm.DB) error
- func (c Commodity) AfterDelete(tx *gorm.DB) error
- func (c *Commodity) AfterUpdate(tx *gorm.DB) error
- func (c Commodity) Mapping() map[string]interface{}
- func (c Commodity) TableCnName() string
- func (c Commodity) TableName() string
- func (c Commodity) ToESDoc() map[string]interface{}
- type CommodityBatch
- type CommodityHistoricalCost
- type Currency
- type Customer
- func (c *Customer) AfterCreate(tx *gorm.DB) error
- func (c *Customer) AfterDelete(tx *gorm.DB) error
- func (c *Customer) AfterUpdate(tx *gorm.DB) error
- func (c Customer) Mapping() map[string]interface{}
- func (c Customer) TableCnName() string
- func (c Customer) TableName() string
- func (c Customer) ToESDoc() map[string]interface{}
- type Department
- type Excel
- type FixedAsset
- func (p *FixedAsset) AfterCreate(tx *gorm.DB) error
- func (p *FixedAsset) AfterDelete(tx *gorm.DB) error
- func (p *FixedAsset) AfterUpdate(tx *gorm.DB) error
- func (p FixedAsset) Mapping() map[string]interface{}
- func (p FixedAsset) TableCnName() string
- func (p FixedAsset) TableName() string
- func (p FixedAsset) ToESDoc() map[string]interface{}
- type FixedAssetStatement
- type ManipulationLog
- type Material
- func (m *Material) AfterCreate(tx *gorm.DB) error
- func (m Material) AfterDelete(tx *gorm.DB) error
- func (m *Material) AfterUpdate(tx *gorm.DB) error
- func (m Material) Mapping() map[string]interface{}
- func (m Material) TableCnName() string
- func (m Material) TableName() string
- func (m Material) ToESDoc() map[string]interface{}
- type MaterialBatch
- type MaterialHistoryCost
- type Module
- type Payable
- func (p *Payable) AfterCreate(tx *gorm.DB) error
- func (p *Payable) AfterDelete(tx *gorm.DB) error
- func (p *Payable) AfterUpdate(tx *gorm.DB) error
- func (p Payable) Mapping() map[string]interface{}
- func (p Payable) TableCnName() string
- func (p Payable) TableName() string
- func (p Payable) ToESDoc() map[string]interface{}
- type PayableDetail
- type Provider
- func (p *Provider) AfterCreate(tx *gorm.DB) error
- func (p *Provider) AfterDelete(tx *gorm.DB) error
- func (p *Provider) AfterUpdate(tx *gorm.DB) error
- func (p Provider) Mapping() map[string]interface{}
- func (p Provider) TableCnName() string
- func (p Provider) TableName() string
- func (p Provider) ToESDoc() map[string]interface{}
- type QRCodeMapping
- type Receivable
- func (p *Receivable) AfterCreate(tx *gorm.DB) error
- func (p *Receivable) AfterDelete(tx *gorm.DB) error
- func (p *Receivable) AfterUpdate(tx *gorm.DB) error
- func (p Receivable) Mapping() map[string]interface{}
- func (p Receivable) TableCnName() string
- func (p Receivable) TableName() string
- func (p Receivable) ToESDoc() map[string]interface{}
- func (p *Receivable) UpdateStatus()
- type ReceivableDetail
- type RelatedInvoice
- type Role
- type RoleCapabilities
- type Staff
- type TimeOnlyModel
- type TypeTree
- type Warehouse
- type WxStaffRelationship
Constants ¶
const ( IK_SMART = "ik_smart" IK_MAX_WORD = "ik_max_word" )
const EXPIRE_TIME = time.Hour * 2
Variables ¶
This section is empty.
Functions ¶
func IgnoreStaffPassword ¶
func IgnoreStaffPassword(staffList []interface{}) []interface{}
IgnoreStaffPassword 去除密码
func MarshalRelatedInvoiceArray ¶
func MarshalRelatedInvoiceArray(r []RelatedInvoice) []byte
Types ¶
type BasicModel ¶
type BasicModel struct { RecID *int `gorm:"primaryKey;type:int;autoIncrement" json:"rec_id,omitempty" bson:"rec_id" cn:"记录ID"` CreatedAt time.Time `gorm:"type:timestamp;not null" json:"created_at" bson:"-" cn:"创建时间"` UpdatedAt *time.Time `gorm:"type:timestamp" json:"updated_at" bson:"-" cn:"更新时间"` DeletedAt gorm.DeletedAt `gorm:"index" json:"deleted_at,omitempty" bson:"-" cn:"删除时间"` }
BasicModel 基本模型
type BookNameInfo ¶
type BookNameInfo struct { BookNameID string `gorm:"-" sql:"-" json:"book_name_id" ` BookName string `gorm:"-" sql:"-" json:"book_name" ` }
BookNameInfo 给ES记录账套用的字段,并不存在mysql里,特意加上了
type Commodity ¶
type Commodity struct { BasicModel BookNameInfo CommodityName string `gorm:"type:varchar(200)" json:"commodity_name" cn:"产品名称"` CommodityTypeID int `gorm:"type:int;not null;index" json:"commodity_type_id,omitempty" form:"commodity_type_id" cn:"产品类型ID"` CommodityTypeName string `` /* 135-byte string literal not displayed */ CommodityStyle string `gorm:"type:varchar(50)" json:"commodity_style,omitempty" cn:"产品规格"` CommodityOwnerID int `gorm:"type:int" json:"commodity_owner_id" cn:"产品负责人ID"` CommodityOwnerName string `gorm:"type:varchar(50)" json:"commodity_owner_name" cn:"产品负责人"` CommodityAverageCostPrice string `gorm:"type:varchar(50)" form:"commodity_average_cost_price" json:"commodity_average_cost_price" cn:"平均成本价"` CommodityPrice string `gorm:"type:varchar(50)" form:"commodity_price" json:"commodity_price" cn:"产品定价"` CommodityPresentCount int `json:"commodity_present_count" form:"commodity_present_count" bson:"commodity_present_count" cn:"当前余量"` CommodityPicUrl *string `gorm:"type:varchar(500)" json:"commodity_pic_url,omitempty" cn:"产品展示图"` Remark *string `gorm:"type:varchar(200)" json:"remark,omitempty" cn:"产品备注"` }
Commodity 产品
func (Commodity) TableCnName ¶
type CommodityBatch ¶
type CommodityBatch struct { BasicModel CommodityID int `gorm:"type:int;not null" json:"commodity_id" cn:"产品ID"` CommodityName string `gorm:"type:varchar(50);not null" json:"commodity_name" cn:"产品名称"` StockInRecordID int `gorm:"type:int;not null" json:"stock_in_record_id" cn:"关联入库单号"` CommodityBatchOwnerID *int `gorm:"type:int;index" json:"commodity_batch_owner_id,omitempty" cn:"负责人ID"` CommodityBatchOwnerName *string `gorm:"type:varchar(50)" json:"commodity_batch_owner_name,omitempty" cn:"负责人名称"` CommodityBatchTotalPrice string `gorm:"type:varchar(50);not null" json:"commodity_batch_total_price" cn:"批次总价"` CommodityBatchNumber int `gorm:"type:int;not null" json:"commodity_batch_number" cn:"批次产品总数"` CommodityBatchSurplusNumber int `gorm:"type:int;not null" json:"commodity_batch_surplus_number" cn:"当前批次产品剩余数量"` CommodityBatchUnitPrice string `gorm:"type:varchar(50);not null" json:"commodity_batch_unit_price" cn:"单价"` WarehouseID *int `gorm:"type:int;index" json:"warehouse_id,omitempty" cn:"仓库ID"` WarehouseName *string `gorm:"type:varchar(50)" json:"warehouse_name,omitempty" cn:"仓库名称"` StockInTime *string `gorm:"type:timestamp " json:"stock_in_time" cn:"入库时间"` Remark *string `gorm:"type:varchar(200)" json:"remark,omitempty" cn:"批次备注"` }
CommodityBatch 批次
func (CommodityBatch) AfterCreate ¶
func (c CommodityBatch) AfterCreate(tx *gorm.DB) error
AfterCreate 同步创建历史成本
func (CommodityBatch) AfterDelete ¶
func (c CommodityBatch) AfterDelete(tx *gorm.DB) error
func (CommodityBatch) AfterUpdate ¶
func (c CommodityBatch) AfterUpdate(tx *gorm.DB) error
func (CommodityBatch) TableCnName ¶
func (c CommodityBatch) TableCnName() string
func (CommodityBatch) TableName ¶
func (c CommodityBatch) TableName() string
type CommodityHistoricalCost ¶
type CommodityHistoricalCost struct { BasicModel CommodityID int `gorm:"type:int;not null;index" json:"commodity_id" form:"commodity_id"` Price string `gorm:"type:varchar(20)" json:"price" form:"price"` Num int `json:"num" form:"num"` RelatedCommodityBatchID int `gorm:"type:int;not null;index" json:"related_commodity_batch_id" form:"related_commodity_batch_id"` }
CommodityHistoricalCost 历史成本表
func (CommodityHistoricalCost) TableCnName ¶
func (c CommodityHistoricalCost) TableCnName() string
func (CommodityHistoricalCost) TableName ¶
func (c CommodityHistoricalCost) TableName() string
type Currency ¶
type Currency struct { BasicModel // 货币名称 CurrencyName string `gorm:"type:varchar(50)"` // 货币符号 CurrencySymbol string `gorm:"type:varchar(50)"` // 对比人民币的汇率 CurrencyExchangeRate string `gorm:"type:varchar(20)"` }
Currency 货币
type Customer ¶
type Customer struct { BasicModel BookNameInfo CustomerName string `form:"customer_name" json:"customer_name" gorm:"type:varchar(200);not null;" cn:"客户名称" ` CustomerLegalName *string `form:"customer_legal_name" json:"customer_legal_name,omitempty" gorm:"type:varchar(50)" cn:"客户公司全称"` CustomerAlias *string `form:"customer_alias" json:"customer_alias,omitempty" gorm:"type:varchar(50)" cn:"客户简称"` CustomerLogoUrl *string `gorm:"type:varchar(500); " form:"customer_logo_url" json:"customer_logo_url,omitempty" cn:"客户头像地址"` CustomerAddress *string `form:"customer_address" json:"customer_address,omitempty" gorm:"type:varchar(500);" cn:"客户省市区地址"` CustomerDetailAddress *string `gorm:"type:varchar(500);" json:"customer_detail_address,omitempty" form:"customer_detail_address" cn:"客户详细地址"` CustomerSocialCreditCode *string `` /* 127-byte string literal not displayed */ CustomerContact *string `form:"customer_contact" json:"customer_contact,omitempty" gorm:"type:varchar(50)" cn:"客户方联系人"` CustomerContactPhone *string `form:"customer_contact_phone" json:"customer_contact_phone,omitempty" gorm:"type:varchar(20)" cn:"联系人电话"` CustomerContactWechat *string `form:"customer_contact_wechat" json:"customer_contact_wechat,omitempty" gorm:"type:varchar(50)" cn:"联系人微信"` CustomerOwnerID *int `form:"customer_owner_id" json:"customer_owner_id,omitempty" gorm:"type:varchar(50)" cn:"客户负责人ID"` CustomerOwnerName *string `form:"customer_owner_name" json:"customer_owner_name,omitempty" gorm:"type:varchar(50)" cn:"客户负责人名称"` AccumulateReceiveAmount string `gorm:"type:varchar(50);default:0" json:"accumulate_receive_amount" form:"accumulate_receive_amount" cn:"累计收款"` Remark *string `form:"remark" json:"remark,omitempty" gorm:"type:varchar(200)" cn:"备注"` }
Customer 客户
func (Customer) TableCnName ¶
type Department ¶
type Department struct { BasicModel DepartmentName string `gorm:"type:varchar(50)" json:"department_name" form:"department_name" cn:"部门名称"` DepartmentLocation *string `gorm:"type:varchar(50)" json:"department_location,omitempty" form:"department_location" cn:"部门地点"` DepartmentManagerID *int `gorm:"type:int;index" json:"department_manager_id,omitempty" form:"department_manager_id" cn:"部门主管ID"` DepartmentManagerName *string `gorm:"type:varchar(50)" json:"department_manager_name,omitempty" form:"department_manager_name" cn:"部门主管名称"` DepartmentPhone *string `gorm:"type:varchar(50)" json:"department_phone,omitempty" form:"department_phone" cn:"部门联系电话"` }
func (Department) TableCnName ¶
func (d Department) TableCnName() string
func (Department) TableName ¶
func (d Department) TableName() string
type Excel ¶
type Excel struct { BasicModel ExcelName string `gorm:"type:varchar(50);not null;" form:"excel_name,omitempty" json:"excel_name,omitempty" ` ExcelURL string `gorm:"type:varchar(500);not null;" form:"excel_url,omitempty" json:"excel_url,omitempty"` CreatorID *int `gorm:"type:int" form:"creator_id,omitempty" json:"creator_id,omitempty" ` CreatorName *string `gorm:"type:varchar(50)" form:"creator_name,omitempty" json:"creator_name,omitempty" ` ExcelExpiredTime int `gorm:"type:int" form:"excel_expired_time,omitempty" json:"excel_expired_time,omitempty" cn:"过期时间(天)"` ExcelStatus _const.ExcelStatus `gorm:"type:int" form:"excel_status" json:"excel_status" bson:"excel_status"` }
func (Excel) TableCnName ¶
type FixedAsset ¶
type FixedAsset struct { BasicModel BookNameInfo FixedAssetPicUrl *string `gorm:"type:varchar(500)" json:"fixed_asset_pic_url,omitempty" form:"fixed_asset_pic_url,omitempty" ` FixedAssetName string `gorm:"type:varchar(100);not null'" form:"fixed_asset_name" json:"fixed_asset_name"` FixedAssetTypeID *int `gorm:"type:int;index" json:"fixed_asset_type_id,omitempty" form:"fixed_asset_type_id" cn:"固定资产类型ID"` FixedAssetTypeName *string `gorm:"type:varchar(50)" json:"fixed_asset_type_name,omitempty" form:"fixed_asset_type_name" cn:"固定资产类型名称"` DepreciationPeriod int `gorm:"type:int;not null" json:"depreciation_period" form:"depreciation_period" cn:"折旧期限(月)"` TotalPrice *string `gorm:"type:varchar(20);not null" json:"total_price,omitempty" form:"total_price" cn:"原价"` CurrentPrice *string `gorm:"type:varchar(20);not null" json:"current_price,omitempty" form:"current_price" cn:"残值"` MonthlyDepreciationAmount *string `` /* 134-byte string literal not displayed */ Remark *string `gorm:"type:varchar(200)" json:"remark" form:"remark" cn:"备注"` }
FixedAsset 固定资产 固定资产类型存放于 TypeTree
func (*FixedAsset) AfterCreate ¶
func (p *FixedAsset) AfterCreate(tx *gorm.DB) error
func (*FixedAsset) AfterDelete ¶
func (p *FixedAsset) AfterDelete(tx *gorm.DB) error
func (*FixedAsset) AfterUpdate ¶
func (p *FixedAsset) AfterUpdate(tx *gorm.DB) error
AfterUpdate 同步更新
func (FixedAsset) Mapping ¶
func (p FixedAsset) Mapping() map[string]interface{}
func (FixedAsset) TableCnName ¶
func (p FixedAsset) TableCnName() string
func (FixedAsset) TableName ¶
func (p FixedAsset) TableName() string
func (FixedAsset) ToESDoc ¶
func (p FixedAsset) ToESDoc() map[string]interface{}
type FixedAssetStatement ¶
type FixedAssetStatement struct {
BasicModel
}
FixedAssetStatement 固定资产月度表
func (FixedAssetStatement) TableName ¶
func (m FixedAssetStatement) TableName() string
type ManipulationLog ¶
type ManipulationLog struct { BasicModel ManipulatorID string `gorm:"type:int"` ManipulatorName string `gorm:"type:varchar(50)"` ManipulationContent string `gorm:"type:varchar(500)"` ManipulationTime time.Time ManipulationRemark string `gorm:"type:varchar(500)"` }
ManipulationLog 操作日志
func (ManipulationLog) TableCnName ¶
func (c ManipulationLog) TableCnName() string
func (ManipulationLog) TableName ¶
func (c ManipulationLog) TableName() string
type Material ¶
type Material struct { BasicModel BookNameInfo MaterialName string `gorm:"type:varchar(50);not null" json:"material_name" form:"material_name" cn:"原材料名称"` MaterialTypeID int `gorm:"type:int;not null;index" json:"material_type_id" form:"material_type_id" cn:"原材料类型ID"` MaterialTypeName string `gorm:"type:varchar(50);not null" json:"material_type_name" form:"material_type_name" cn:"原材料类型名称"` MaterialStyle string `gorm:"type:varchar(50);not null" json:"material_style" form:"material_style" cn:"原材料规格"` MaterialOwnerID *int `gorm:"type:int" json:"material_owner_id,omitempty" form:"material_owner_id,omitempty" cn:"原材料负责人ID"` MaterialOwnerName *string `gorm:"type:varchar(50)" json:"material_owner_name,omitempty" form:"material_owner_name" cn:"原材料负责人名称"` AverageUnitPrice *string `gorm:"type:varchar(50)" json:"average_unit_price,omitempty" form:"average_unit_price,omitempty" cn:"原材料平均价格"` MaterialPresentCount int `form:"material_present_count" json:"material_present_count" cn:"当前余量"` MaterialPicUrl *string `gorm:"type:varchar(500)" json:"material_pic_url,omitempty" form:"material_pic_url,omitempty" cn:"原材料展示图"` Remark *string `gorm:"type:varchar(200)" json:"remark,omitempty" form:"remark,omitempty" cn:"原材料备注"` }
Material 原材料
func (*Material) AfterUpdate ¶
AfterUpdate 同步更新原材料
func (Material) TableCnName ¶
type MaterialBatch ¶
type MaterialBatch struct { BasicModel MaterialID int `gorm:"type:int;not null" json:"material_id" cn:"原材料ID"` MaterialName string `gorm:"type:varchar(50);not null" json:"material_name" cn:"原材料名称"` StockInRecordID int `gorm:"type:int;not null" json:"stock_in_record_id" cn:"关联入库单号"` MaterialBatchOwnerID *int `gorm:"type:int;index" json:"material_batch_owner_id,omitempty" cn:"负责人ID"` MaterialBatchOwnerName *string `gorm:"type:varchar(50)" json:"material_batch_owner_name,omitempty" cn:"负责人名称"` MaterialBatchTotalPrice string `gorm:"type:varchar(50);not null" json:"material_batch_total_price" cn:"批次总价"` MaterialBatchNumber int `gorm:"type:int;not null" json:"material_batch_number" cn:"批次原材料总数"` MaterialBatchSurplusNumber int `gorm:"type:int;not null" json:"material_batch_surplus_number" cn:"当前批次原材料剩余数量"` MaterialBatchUnitPrice string `gorm:"type:varchar(50);not null" json:"material_batch_unit_price" cn:"单价"` WarehouseID *int `gorm:"type:int;index" json:"warehouse_id,omitempty" cn:"仓库ID"` WarehouseName *string `gorm:"type:varchar(50)" json:"warehouse_name,omitempty" cn:"仓库名称"` StockInTime *string `gorm:"type:timestamp " json:"stock_in_time" cn:"入库时间"` Remark *string `gorm:"type:varchar(200)" json:"remark,omitempty" cn:"批次备注"` }
MaterialBatch 原材料批次
func (MaterialBatch) AfterCreate ¶
func (m MaterialBatch) AfterCreate(tx *gorm.DB) error
AfterCreate 同步创建历史成本 事务里不能嵌套事务,否则内层事务将会把外层事务重复执行x遍
func (MaterialBatch) AfterDelete ¶
func (m MaterialBatch) AfterDelete(tx *gorm.DB) error
func (MaterialBatch) AfterUpdate ¶
func (m MaterialBatch) AfterUpdate(tx *gorm.DB) error
func (MaterialBatch) TableCnName ¶
func (m MaterialBatch) TableCnName() string
func (MaterialBatch) TableName ¶
func (m MaterialBatch) TableName() string
type MaterialHistoryCost ¶
type MaterialHistoryCost struct { BasicModel MaterialID int `gorm:"type:int;not null;index" json:"material_id" form:"material_id"` Price string `gorm:"type:varchar(20)" json:"price" form:"price"` Num int `json:"num" form:"num"` RelatedMaterialBatchID int `gorm:"type:int;not null;index" json:"related_material_batch_id" form:"related_material_batch_id"` }
MaterialHistoryCost 原材料历史进货价
func (MaterialHistoryCost) TableCnName ¶
func (m MaterialHistoryCost) TableCnName() string
func (MaterialHistoryCost) TableName ¶
func (m MaterialHistoryCost) TableName() string
type Module ¶
type Module struct { BasicModel ModuleName string `gorm:"type:varchar(50)" json:"module_name"` ModuleRemark *string `gorm:"type:varchar(200)" json:"module_remark,omitempty"` }
Module 模块表
func GetModuleList ¶
func GetModuleList() []Module
func (Module) TableCnName ¶
type Payable ¶
type Payable struct { BasicModel BookNameInfo ProviderID *int `gorm:"type:int" json:"provider_id,omitempty" form:"provider_id,omitempty"` ProviderName *string `gorm:"type:varchar(50)" json:"provider_name,omitempty" form:"provider_name"` PayableDate *string `gorm:"type:varchar(50)" json:"payable_date,omitempty" form:"payable_date"` PayableTotalAmount *string `gorm:"type:varchar(50);" json:"payable_total_amount,omitempty" form:"payable_total_amount"` PayableActualAmount *string `gorm:"type:varchar(50)" json:"payable_actual_amount,omitempty" form:"payable_actual_amount"` PayableDiscount *string `gorm:"type:varchar(50)" json:"payable_discount,omitempty" form:"payable_discount"` PayableHedgingAmount *string `gorm:"type:varchar(50)" json:"payable_hedging_amount,omitempty" form:"payable_hedging_amount"` PayableDebtAmount *string `gorm:"type:varchar(50)" json:"payable_debt_amount,omitempty" form:"payable_debt_amount"` PayableStatus *_const.PayableStatus `gorm:"type:int" json:"payable_status,omitempty" form:"payable_status"` PurchaseID *int `gorm:"type:int" json:"purchase_id,omitempty" form:"purchase_id,omitempty" cn:"关联采购单ID"` CredentialID *int `gorm:"type:int" json:"credential_id,omitempty" form:"credential_id,omitempty"` Remark *string `gorm:"type:varchar(200)" json:"remark,omitempty" form:"remark"` }
Payable 应付
func (Payable) TableCnName ¶
type PayableDetail ¶
type PayableDetail struct { BasicModel BookNameInfo PayableID *int `gorm:"type:int" json:"payable_id,omitempty" form:"payable_id,omitempty" cn:"关联应付编号"` PayableDate *string `gorm:"type:varchar(50)" json:"payable_date,omitempty" form:"payable_date,omitempty" cn:"付款时间"` PayableContent *string `gorm:"type:varchar(200)" json:"payable_content,omitempty" form:"payable_content,omitempty" cn:"付款内容摘要"` PayableAmount *string `gorm:"type:varchar(50)" json:"payable_amount,omitempty" form:"payable_amount,omitempty" cn:"付款金额"` PayableOperatorID *int `json:"payable_operator_id,omitempty" form:"payable_operator_id,omitempty" cn:"操作人编号"` PayableOperatorName *string `gorm:"type:varchar(50)" json:"payable_operator_name,omitempty" form:"payable_operator_name,omitempty" cn:"操作人名称"` PayablePicUrlList *string `gorm:"type:mediumtext" form:"payable_pic_url_list,omitempty" json:"payable_pic_url_list,omitempty" cn:"相关单据图片"` Remark *string `gorm:"type:varchar(200)" json:"remark,omitempty" form:"remark" cn:"备注"` }
func (*PayableDetail) AfterCreate ¶
func (p *PayableDetail) AfterCreate(tx *gorm.DB) error
AfterCreate todo 修改实际付款,剩余付款,付款状态
func (*PayableDetail) AfterDelete ¶
func (p *PayableDetail) AfterDelete(tx *gorm.DB) error
func (*PayableDetail) AfterUpdate ¶
func (p *PayableDetail) AfterUpdate(tx *gorm.DB) error
func (PayableDetail) TableCnName ¶
func (p PayableDetail) TableCnName() string
func (PayableDetail) TableName ¶
func (p PayableDetail) TableName() string
type Provider ¶
type Provider struct { BasicModel BookNameInfo ProviderName string `form:"provider_name" json:"provider_name" gorm:"type:varchar(200);not null;" cn:"供应商名称"` ProviderLegalName *string `form:"provider_legal_name" json:"provider_legal_name,omitempty" gorm:"type:varchar(50)" cn:"供应商公司全称"` ProviderAlias *string `form:"provider_alias" json:"provider_alias,omitempty" gorm:"type:varchar(50)" cn:"供应商简称"` ProviderLogoUrl *string `gorm:"type:varchar(500); " form:"provider_logo_url" json:"provider_logo_url,omitempty" cn:"供应商头像地址"` ProviderAddress *string `form:"provider_address" json:"provider_address,omitempty" gorm:"type:varchar(500);" cn:"供应商省市区"` ProviderDetailAddress *string `` /* 134-byte string literal not displayed */ ProviderSocialCreditCode *string `` /* 127-byte string literal not displayed */ ProviderContact *string `form:"provider_contact" json:"provider_contact,omitempty" gorm:"type:varchar(50)" cn:"供应商方联系人"` ProviderContactPhone *string `form:"provider_contact_phone" json:"provider_contact_phone,omitempty" gorm:"type:varchar(20)" cn:"联系人电话"` ProviderContactWechat *string `form:"provider_contact_wechat" json:"provider_contact_wechat,omitempty" gorm:"type:varchar(50)" cn:"联系人微信"` ProviderOwnerID *int `form:"provider_owner_id" json:"provider_owner_id,omitempty" gorm:"type:varchar(50)" cn:"供应商负责人ID"` ProviderOwnerName *string `form:"provider_owner_name" json:"provider_owner_name,omitempty" gorm:"type:varchar(50)" cn:"供应商负责人名称"` AccumulatePayAmount string `json:"accumulate_pay_amount" gorm:"type:varchar(50);default:0" cn:"累计付款"` Remark *string `form:"remark" json:"remark,omitempty" gorm:"type:varchar(200)" cn:"备注"` }
Provider 供应商
func (Provider) TableCnName ¶
type QRCodeMapping ¶
type QRCodeMapping struct { TimeOnlyModel QRCodeMD5 string `gorm:"type:varchar(100);index" json:"qr_code_md5"` // contains filtered or unexported fields }
QRCodeMapping 二维码映射表
func (*QRCodeMapping) ExecSql ¶
func (q *QRCodeMapping) ExecSql(res map[string]interface{}) (err error)
func (*QRCodeMapping) GenerateSql ¶
func (q *QRCodeMapping) GenerateSql(table schema.Tabler) error
func (QRCodeMapping) TableName ¶
func (q QRCodeMapping) TableName() string
type Receivable ¶
type Receivable struct { BasicModel BookNameInfo CustomerID *int `gorm:"type:int" json:"customer_id,omitempty" form:"customer_id,omitempty"` CustomerName *string `gorm:"type:varchar(50)" json:"customer_name,omitempty" form:"customer_name"` ReceivableDate *string `gorm:"type:varchar(50)" json:"receivable_date,omitempty" form:"receivable_date" cn:"应收日期"` ReceivableTotalAmount *string `gorm:"type:varchar(50)" json:"receivable_total_amount,omitempty" form:"receivable_total_amount" cn:"账单总金额"` ReceivableActualAmount *string `gorm:"type:varchar(50)" json:"receivable_actual_amount,omitempty" form:"receivable_actual_amount" cn:"实际收款"` ReceivableDiscount *string `gorm:"type:varchar(50)" json:"receivable_discount,omitempty" form:"receivable_discount" cn:"零头优惠"` ReceivableHedgingAmount *string `gorm:"type:varchar(50)" json:"receivable_hedging_amount,omitempty" form:"receivable_hedging_amount" cn:"红冲金额"` ReceivableDebtAmount *string `gorm:"type:varchar(50)" json:"receivable_debt_amount,omitempty" form:"receivable_debt_amount" cn:"欠款金额"` ReceivableStatus *_const.ReceivableStatus `gorm:"type:int" json:"receivable_status,omitempty" form:"receivable_status" cn:"收款状态"` CredentialID *int `gorm:"type:int" json:"credential_id,omitempty" form:"credential_id" cn:"关联凭证ID"` TransactionID *int `gorm:"type:int" json:"transaction_id,omitempty" form:"transaction_id,omitempty" cn:"关联销售单ID"` Remark *string `gorm:"type:varchar(200)" json:"remark,omitempty" form:"remark"` }
Receivable 应收
func (*Receivable) AfterCreate ¶
func (p *Receivable) AfterCreate(tx *gorm.DB) error
func (*Receivable) AfterDelete ¶
func (p *Receivable) AfterDelete(tx *gorm.DB) error
func (*Receivable) AfterUpdate ¶
func (p *Receivable) AfterUpdate(tx *gorm.DB) error
AfterUpdate 同步更新
func (Receivable) Mapping ¶
func (p Receivable) Mapping() map[string]interface{}
func (Receivable) TableCnName ¶
func (p Receivable) TableCnName() string
func (Receivable) TableName ¶
func (p Receivable) TableName() string
func (Receivable) ToESDoc ¶
func (p Receivable) ToESDoc() map[string]interface{}
func (*Receivable) UpdateStatus ¶
func (p *Receivable) UpdateStatus()
type ReceivableDetail ¶
type ReceivableDetail struct { BasicModel BookNameInfo ReceivableID *int `gorm:"type:int" json:"receivable_id,omitempty" form:"receivable_id,omitempty" cn:"关联应收编号"` ReceivableDate *string `gorm:"type:varchar(50)" json:"receivable_date,omitempty" form:"receivable_date,omitempty" cn:"收款日期"` ReceivableContent *string `gorm:"type:varchar(200)" json:"receivable_content,omitempty" form:"receivable_content,omitempty" cn:"收款款内容摘要"` ReceivableAmount *string `gorm:"type:varchar(50)" json:"receivable_amount,omitempty" form:"receivable_amount,omitempty" cn:"收款金额"` ReceivableOperatorID *int `json:"receivable_operator_id,omitempty" form:"receivable_operator_id,omitempty" cn:"操作人编号"` ReceivableOperatorName *string `` /* 128-byte string literal not displayed */ ReceivablePicUrlList *string `` /* 128-byte string literal not displayed */ Remark *string `gorm:"type:varchar(200)" json:"remark,omitempty" form:"remark" cn:"备注"` }
ReceivableDetail 收款详情
func (*ReceivableDetail) AfterCreate ¶
func (p *ReceivableDetail) AfterCreate(tx *gorm.DB) error
func (*ReceivableDetail) AfterDelete ¶
func (p *ReceivableDetail) AfterDelete(tx *gorm.DB) error
func (*ReceivableDetail) AfterUpdate ¶
func (p *ReceivableDetail) AfterUpdate(tx *gorm.DB) error
func (ReceivableDetail) TableCnName ¶
func (p ReceivableDetail) TableCnName() string
func (ReceivableDetail) TableName ¶
func (p ReceivableDetail) TableName() string
type RelatedInvoice ¶
type RelatedInvoice struct { InvoiceType _const.InvoiceType `json:"invoice_type" form:"invoice_tye" bson:"invoice_tye" cn:"单据类型"` InvoiceID int `json:"invoice_id" form:"invoice_id" bson:"invoice_id" cn:"单据编号"` }
RelatedInvoice 关联相关单据
type Role ¶
type Role struct { BasicModel RoleName string `gorm:"type:varchar(50)" form:"role_name" json:"role_name" ` RoleRemark *string `gorm:"type:varchar(200)" form:"role_remark" json:"role_remark,omitempty"` }
Role 角色表
func (Role) TableCnName ¶
type RoleCapabilities ¶
type RoleCapabilities struct { BasicModel RoleID int `gorm:"type:int;index" form:"role_id" json:"role_id"` ModuleID int `gorm:"type:int;index" form:"module_id" json:"module_id" ` ModuleName string `gorm:"type:varchar(50)" form:"module_name" json:"module_name"` CanRead bool `form:"can_read" json:"can_read"` CanWrite bool `form:"can_write" json:"can_write"` CanDelete bool `form:"can_delete" json:"can_delete"` }
RoleCapabilities 角色对各模块的权限关系表
func RoleCapabilitiesMerge ¶
func RoleCapabilitiesMerge(rcs []RoleCapabilities) []RoleCapabilities
RoleCapabilitiesMerge 确保完整性
func (RoleCapabilities) TableCnName ¶
func (r RoleCapabilities) TableCnName() string
func (RoleCapabilities) TableName ¶
func (r RoleCapabilities) TableName() string
type Staff ¶
type Staff struct { BasicModel StaffName string `gorm:"type:varchar(50);not null;" json:"staff_name" form:"staff_name" cn:"职工名称"` StaffAlias *string `gorm:"type:varchar(50)" json:"staff_alias,omitempty" form:"staff_alias" cn:"职工别名"` // 职工别名 StaffEmail string `gorm:"type:varchar(50);not null;index;unique" json:"staff_email" form:"staff_email" cn:"职工邮箱"` StaffPhone *string `gorm:"type:varchar(50);index;" json:"staff_phone,omitempty" form:"staff_phone"` StaffPassword string `gorm:"type:varchar(20)" json:"staff_password" form:"staff_password" ` StaffPosition *string `gorm:"type:varchar(50)" json:"staff_position,omitempty" form:"staff_position"` StaffDepartmentID *int `json:"staff_department_id,omitempty" form:"staff_department_id"` StaffDepartmentName *string `gorm:"type:varchar(50)" json:"staff_department_name,omitempty" form:"staff_department_name" cn:"职工部门名称"` StaffPicUrl *string `gorm:"type:varchar(500)" json:"staff_pic_url,omitempty" form:"staff_pic_url,omitempty" cn:"员工头像"` StaffRoleID int `gorm:"type:int" json:"staff_role_id" form:"staff_role_id" ` StaffRoleName string `gorm:"type:varchar(50)" json:"staff_role_name" form:"staff_role_name" ` }
func (Staff) TableCnName ¶
type TimeOnlyModel ¶
type TimeOnlyModel struct { CreatedAt time.Time `gorm:"type:timestamp;not null" bson:"created_at" json:"created_at" cn:"创建时间"` UpdatedAt *time.Time `gorm:"type:timestamp" bson:"updated_at" json:"updated_at" cn:"更新时间"` DeletedAt gorm.DeletedAt `gorm:"index" bson:"deleted_at" json:"deleted_at" cn:"删除时间"` }
TimeOnlyModel 不含主键的基本模型
type TypeTree ¶
type TypeTree struct { BasicModel TypeName string `gorm:"type:varchar(50);not null;" json:"type_name"` ParentTypeID *int `gorm:"int;index" json:"parent_type_id,omitempty"` Remark *string `gorm:"type:varchar(200)" json:"remark,omitempty"` }
TypeTree 类型表
func (TypeTree) TableCnName ¶
type Warehouse ¶
type Warehouse struct { BasicModel WarehouseName string `gorm:"type:varchar(50);not null;" json:"warehouse_name" cn:"仓库名称"` WarehouseLocation *string `gorm:"type:varchar(200)" json:"warehouse_location,omitempty" cn:"仓库位置"` WarehouseOwnerID *int `gorm:"type:int" json:"warehouse_owner_id,omitempty" cn:"仓库管理员ID"` WarehouseOwnerName *string `gorm:"type:varchar(50)" json:"warehouse_owner_name,omitempty" cn:"仓库管理员名称"` Remark *string `gorm:"type:varchar(200)" json:"remark,omitempty" cn:"仓库备注"` }
Warehouse 仓库
func (Warehouse) TableCnName ¶
type WxStaffRelationship ¶
type WxStaffRelationship struct { BasicModel StaffID int `json:"staff_id" form:"staff_id" gorm:"type:int;index;not null"` OpenID string `json:"open_id" form:"open_id" gorm:"type:varchar(200);not null;index"` WxBindingPhone *string `json:"wx_binding_phone" form:"wx_binding_phone" gorm:"type:varchar(20)"` }
func (WxStaffRelationship) TableCnName ¶
func (w WxStaffRelationship) TableCnName() string
func (WxStaffRelationship) TableName ¶
func (w WxStaffRelationship) TableName() string