co_model

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2023 License: MIT Imports: 8 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountBillRegister added in v0.1.112

type AccountBillRegister struct {
	FromUserId    int64       `` /* 126-byte string literal not displayed */
	ToUserId      int64       `json:"toUserId"       v:"required#请输入交易接收方用户id"  dc:"交易对象UserID"`
	FdAccountId   int64       `json:"fdAccountId"    v:"required#财务账号ID不能为空" dc:"财务账户ID"`
	BeforeBalance int64       `json:"beforeBalance"  v:"required#交易前余额不能为空" dc:"交易前账户余额"`
	Amount        int64       `json:"amount"         v:"required#交易金额不能为空" dc:"交易金额"`
	AfterBalance  int64       `json:"afterBalance"   v:"required#交易后账号余额不能为空" dc:"交易后账户余额"`
	UnionOrderId  int64       `json:"unionOrderId"   dc:"关联业务订单ID"`
	InOutType     int         `json:"inOutType"      v:"required|in:1,2#请输入1.收入 2.支出" dc:"收支类型:1收入,2支出"`
	TradeType     int         `` /* 249-byte string literal not displayed */
	TradeAt       *gtime.Time `json:"tradeAt"        v:"required#交易时间不能为空"   dc:"交易时间"`
	Remark        string      `json:"remark"         dc:"备注信息"`
	TradeState    int         `` /* 161-byte string literal not displayed */
}

type BankCardRegister added in v0.1.112

type BankCardRegister struct {
	BankName      string      `json:"bankName"      v:"required#请输入银行卡名称" dc:"银行名称"`
	CardType      int         `json:"cardType"      v:"required|in:1,2#请输入银行类型" dc:"银行卡类型:1借记卡,2储蓄卡"`
	CardNumber    string      `json:"cardNumber"    v:"required|bank-card#请输入银行卡号|银行卡号错误" dc:"银行卡号"`
	ExpiredAt     *gtime.Time `json:"expiredAt"     dc:"有效期"`
	HolderName    string      `json:"holderName"    v:"required#请输入银行卡开户姓名" dc:"银行卡开户名"`
	UserId        int64       `json:"userId"        dc:"银行卡所属用户id,表示属于谁"`
	BankOfAccount string      `json:"bankOfAccount" dc:"开户行"`
	State         int         `json:"state"         dc:"状态:0禁用,1正常"`
	Remark        string      `json:"remark"        dc:"备注信息"`
}

type Company

type Company struct {
	Id            int64  `json:"id"             description:"ID"`
	Name          string `` /* 126-byte string literal not displayed */
	ContactName   string `` /* 154-byte string literal not displayed */
	ContactMobile string `` /* 205-byte string literal not displayed */
	Remark        string `json:"remark"         description:"备注"`
}

type CompanyListRes

type CompanyListRes base_model.CollectRes[CompanyRes]

type CompanyRes

type CompanyRes struct {
	co_entity.Company
	AdminUser *EmployeeRes `json:"adminUser"`
}

func (*CompanyRes) Data added in v0.3.0

func (m *CompanyRes) Data() *CompanyRes

type Config

type Config struct {
	DB                             gdb.DB            `p:"-" dc:"数据库连接"`
	AllowEmptyNo                   bool              `p:"allowEmptyNo" dc:"允许员工工号为空" default:"false"`
	IsCreateDefaultEmployeeAndRole bool              `p:"isCreateDefaultEmployeeAndRole" dc:"是否创建默认员工和角色"`
	HardDeleteWaitAt               int64             `p:"hardDeleteWaitAt" dc:"硬删除等待时限,单位/小时" default:"12"`
	KeyIndex                       string            `p:"keyIndex" dc:"配置索引"`
	RoutePrefix                    string            `p:"routePrefix" dc:"路由前缀"`
	StoragePath                    string            `p:"storagePath" dc:"资源存储路径"`
	UserType                       sys_enum.UserType `p:"userType" dc:"用户类型"`
	Identifier                     Identifier        `p:"identifier" dc:"标识符"`
	TableName                      TableName         `p:"tableName" dc:"模块表名"`
}

type Employee

type Employee struct {
	Id          int64       `json:"id"           description:"ID,保持与USERID一致"`
	No          string      `json:"no"           v:"max-length:16#工号长度超出限定16字符" description:"工号"`
	Avatar      string      `json:"avatar"       description:"头像"`
	Name        string      `json:"name"         v:"required|max-length:16#名称不能为空|工号长度超出限定16字符" description:"姓名"`
	Mobile      string      `json:"mobile"       v:"phone#手机号校验失败" description:"手机号"`
	State       int         `` /* 134-byte string literal not displayed */
	UnionMainId int64       `json:"-"  description:"所属主体"`
	HiredAt     *gtime.Time `json:"hiredAt"      v:"date-format:Y-m-d#入职日期格式错误" description:"入职日期"`
}

type EmployeeListRes

type EmployeeListRes base_model.CollectRes[*EmployeeRes]

type EmployeeRes

type EmployeeRes struct {
	co_entity.CompanyEmployee
	User     EmployeeUser             `orm:"with:id" json:"user"`
	Detail   sys_entity.SysUserDetail `orm:"with:id" json:"detail"`
	TeamList []Team                   `json:"teamList"`
}

func (*EmployeeRes) Data added in v0.3.0

func (m *EmployeeRes) Data() *EmployeeRes

type EmployeeUser

type EmployeeUser struct {
	g.Meta   `orm:"table:sys_user"`
	Id       int64  `json:"id"           description:"ID,保持与USERID一致"`
	Username string `json:"username"  description:"账号"`
	State    int    `json:"state"     description:"状态:0未激活、1正常、-1封号、-2异常、-3已注销"`
	Type     int    `` /* 127-byte string literal not displayed */
}

type FdAccountBillRes added in v0.3.0

type FdAccountBillRes struct {
	co_entity.FdAccountBill
}

func (*FdAccountBillRes) Data added in v0.3.0

type FdAccountRegister added in v0.1.112

type FdAccountRegister struct {
	Name           string `json:"name" v:"required#请输入财务账号名称"    dc:"账户名称"`
	UnionLicenseId int64  `json:"unionLicenseId"  dc:"关联资质ID,大于0时必须保值与 union_user_id 关联得上"`
	UnionUserId    int64  `json:"unionUserId"     v:"required#请输入财务账号关联的用户id"    dc:"关联用户ID"`
	// 货币标识后期还有积分标识
	CurrencyCode       string `` /* 137-byte string literal not displayed */
	IsEnabled          int    `json:"isEnabled"          dc:"是否启用:1启用,0禁用"`
	LimitState         int    `json:"limitState"         dc:"限制状态:0不限制,1限制支出、2限制收入"`
	PrecisionOfBalance int    `` /* 152-byte string literal not displayed */
	Version            int    `json:"version"            description:"乐观锁所需数据版本字段"`
}

type FdAccountRes added in v0.3.0

type FdAccountRes struct {
	co_entity.FdAccount
}

func (*FdAccountRes) Data added in v0.3.0

func (m *FdAccountRes) Data() *FdAccountRes

type FdBankCardListRes added in v0.3.0

type FdBankCardListRes base_model.CollectRes[*FdBankCardRes]

type FdBankCardRes added in v0.3.0

type FdBankCardRes struct {
	co_entity.FdBankCard
}

func (*FdBankCardRes) Data added in v0.3.0

func (m *FdBankCardRes) Data() *FdBankCardRes

type FdCurrencyRes added in v0.3.0

type FdCurrencyRes struct {
	co_entity.FdCurrency
}

func (*FdCurrencyRes) Data added in v0.3.0

func (m *FdCurrencyRes) Data() *FdCurrencyRes

type FdInvoiceAuditInfo added in v0.1.112

type FdInvoiceAuditInfo struct {
	State       int    `` /* 127-byte string literal not displayed */
	AuditUserId int64  `json:"auditUserId" dc:"审核者UserId"`
	ReplyMsg    string `json:"replyMsg" dc:"审核失败时必填的原因回复"`
}

FdInvoiceAuditInfo 审核发票

type FdInvoiceDetailListRes added in v0.1.112

type FdInvoiceDetailListRes base_model.CollectRes[FdInvoiceDetailRes]

type FdInvoiceDetailRegister added in v0.1.112

type FdInvoiceDetailRegister struct {
	TaxNumber     string      `json:"taxNumber"     v:"required#请输入纳税识别号" dc:"纳税识别号"`
	TaxName       string      `json:"taxName"       v:"required#请输入纳税人名称"  dc:"纳税人名称"`
	BillIds       string      `json:"billIds"       v:"required#请输入开支账单"  dc:"账单ID组"`
	Amount        int64       `json:"amount"        v:"required#请输入开票金额"  dc:"开票金额,单位精度:分"`
	Rate          int         `json:"rate"          v:"required#请输入税率"  dc:"税率,如3% 则填入3"`
	RateMount     int64       `json:"rateMount"     v:"required#请输入税额"  dc:"税额,单位精度:分"`
	Remark        string      `json:"remark"        v:"required#请输入发票内容描述"  dc:"发票内容描述"`
	Type          int         `json:"type"          v:"required|in:1,2#请输入发票类型"  dc:"发票类型:1电子发票,2纸质发票"`
	State         int         `` /* 157-byte string literal not displayed */
	AuditUserIds  int64       `json:"auditUserIds"  dc:"审核者UserID,多个用逗号隔开"`
	MakeType      int         `json:"makeType"      dc:"出票类型:1普通发票、2增值税专用发票、3专业发票"`
	MakeUserId    int64       `json:"makeUserId"    dc:"出票人UserID,如果是系统出票则默认-1"`
	MakeAt        *gtime.Time `json:"makeAt"        dc:"出票时间"`
	CourierName   string      `json:"courierName"   dc:"快递名称"`
	CourierNumber string      `json:"courierNumber" dc:"快递编号"`
	FdInvoiceId   int64       `json:"fdInvoiceId"   dc:"发票抬头ID"`
	AuditUserId   int64       `json:"auditUserId"   dc:"审核者UserID"`
	AuditReplyMsg string      `json:"auditReplyMsg" dc:"审核回复,仅审核不通过时才有值"`
	AuditAt       *gtime.Time `json:"auditAt"       dc:"审核时间"`
	UserId        int64       `json:"userId"        dc:"申请者用户ID"`
	UnionMainId   int64       `json:"unionMainId"   dc:"主体ID:运营商ID、服务商ID、商户ID、消费者ID"`
	BelongTo      int         `` /* 128-byte string literal not displayed */
}

FdInvoiceDetailRegister 申请创建发票

type FdInvoiceDetailRes added in v0.3.0

type FdInvoiceDetailRes struct {
	co_entity.FdInvoiceDetail
}

func (*FdInvoiceDetailRes) Data added in v0.3.0

type FdInvoiceListRes added in v0.1.112

type FdInvoiceListRes base_model.CollectRes[FdInvoiceRes]

type FdInvoiceRegister added in v0.1.112

type FdInvoiceRegister struct {
	Name          string      `json:"name"           v:"required#请输入发票抬头名称" dc:"发票抬头名称"`
	TaxId         string      `json:"taxId"          v:"required#请输入纳税识别号" dc:"纳税识别号"`
	Addr          string      `json:"addr"           dc:"发票收件地址,限纸质"`
	Email         string      `json:"email"          dc:"发票收件邮箱,限电子发票"`
	UserId        int64       `json:"userId"         dc:"申请人UserID"`
	AuditUserId   int64       `json:"auditUserId"    dc:"审核人UserID"`
	AuditReplyMsg string      `json:"auditReplyMsg" description:"审核回复,仅审核不通过时才有值"`
	AuditAt       *gtime.Time `json:"auditAt"        dc:"审核时间"`
	State         int         `json:"state"          dc:"状态:0待审核、1已通过、-1不通过"`
	UnionMainId   int64       `json:"unionMainId"    dc:"主体ID:运营商ID、服务商ID、商户ID、消费者ID"`
}

type FdInvoiceRes added in v0.3.0

type FdInvoiceRes struct {
	co_entity.FdInvoice
}

func (*FdInvoiceRes) Data added in v0.3.0

func (m *FdInvoiceRes) Data() *FdInvoiceRes

type FdMakeInvoiceDetail added in v0.1.112

type FdMakeInvoiceDetail struct {
	MakeType      int    `json:"makeType" dc:"出票类型:1普通发票、2增值税专用发票、3专业发票"`
	Type          int    `json:"type"          v:"required|in:1,2#请输入发票类型"  dc:"发票类型:1电子发票,2纸质发票"`
	MakeUserId    int64  `json:"makeUserId" dc:"开票者UserID"`
	CourierName   string `json:"courierName" dc:"快递名称,限纸质发票"`
	CourierNumber string `json:"courierNumber" dc:"快递编号,限纸质发票"`
	Email         string `json:"email"         dc:"发票收件邮箱,限电子发票"`
}

FdMakeInvoiceDetail 开发票

type ICompanyRes added in v0.3.0

type ICompanyRes interface {
	Data() *CompanyRes
}

type IEmployeeRes added in v0.3.0

type IEmployeeRes interface {
	Data() *EmployeeRes
}

type IFdAccountBillRes added in v0.3.0

type IFdAccountBillRes interface {
	Data() *FdAccountBillRes
}

type IFdAccountRes added in v0.3.0

type IFdAccountRes interface {
	Data() *FdAccountRes
}

type IFdBankCardRes added in v0.3.0

type IFdBankCardRes interface {
	Data() *FdBankCardRes
}

type IFdCurrencyRes added in v0.3.0

type IFdCurrencyRes interface {
	Data() *FdCurrencyRes
}

type IFdInvoiceDetailRes added in v0.3.0

type IFdInvoiceDetailRes interface {
	Data() *FdInvoiceDetailRes
}

type IFdInvoiceRes added in v0.3.0

type IFdInvoiceRes interface {
	Data() *FdInvoiceRes
}

type ITeamRes added in v0.3.0

type ITeamRes interface {
	Data() *TeamRes
}

type Identifier

type Identifier struct {
	Company         string `p:"company" dc:"公司标识符"`
	Employee        string `p:"employee" dc:"员工标识符"`
	Team            string `p:"team" dc:"团队标识符"`
	TeamMember      string `p:"teamMember" dc:"团队成员标识符"`
	FdAccount       string `p:"fdAccount" dc:"财务账户标识符"`
	FdAccountBill   string `p:"fdAccountBill" dc:"财务账单标识符"`
	FdBankCard      string `p:"fdBankCard" dc:"财务银行卡标识符"`
	FdCurrency      string `p:"fdCurrency" dc:"财务结算货币单位标识符"`
	FdInvoice       string `p:"fdInvoice" dc:"财务发票抬头标识符"`
	FdInvoiceDetail string `p:"fdInvoiceDetail" dc:"财务发票明细标识符"`
}

type MyCompanyRes

type MyCompanyRes co_entity.Company

type MyProfileRes

type MyProfileRes struct {
	User     *sys_model.SysUser `json:"user" description:"员工信息"`
	Employee *EmployeeRes       `json:"employee" description:"员工信息"`
}

type MyTeamListRes

type MyTeamListRes []MyTeamRes

type MyTeamRes

type MyTeamRes struct {
	TeamRes
	MemberItems []*EmployeeRes `json:"memberItems" description:"团队或小组成员"`
}

type TableName

type TableName struct {
	Company         string `p:"company" dc:"公司表名"`
	Employee        string `p:"employee" dc:"员工表名"`
	Team            string `p:"team" dc:"团队表名"`
	TeamMember      string `p:"teamMember" dc:"团队成员表名"`
	FdAccount       string `p:"fdAccount" dc:"财务账户表名"`
	FdAccountBill   string `p:"fdAccountBill" dc:"财务账单表名"`
	FdBankCard      string `p:"fdBankCard" dc:"财务银行卡表名"`
	FdCurrency      string `p:"fdCurrency" dc:"财务结算货币单位表名"`
	FdInvoice       string `p:"fdInvoice" dc:"财务发票抬头表名"`
	FdInvoiceDetail string `p:"fdInvoiceDetail" dc:"财务发票明细表名"`
}

type Team

type Team struct {
	Id                int64  `json:"id"                description:"ID"`
	Name              string `` /* 162-byte string literal not displayed */
	OwnerEmployeeId   int64  `json:"ownerEmployeeId"   description:"团队所有者/业务总监/业务经理/团队队长"`
	CaptainEmployeeId int64  `json:"captainEmployeeId" description:"团队队长编号/小组组长"`
	ParentId          int64  `json:"parentId" description:"团队或小组父级ID"`
	Remark            string `json:"remark"            description:"备注"`
}

type TeamMemberRes added in v0.1.99

type TeamMemberRes struct {
	co_entity.CompanyTeamMember
	Employee   *EmployeeRes `json:"employee"   description:"成员"`
	InviteUser *EmployeeRes `json:"inviteUser" description:"邀约人"`
	UnionMain  *CompanyRes  `json:"unionMain"  description:"关联主体"`
}

type TeamRes

type TeamRes struct {
	co_entity.CompanyTeam
	Owner     *EmployeeRes `json:"owner" dc:"团队所有者/业务总监/业务经理/团队队长"`
	Captain   *EmployeeRes `json:"captain" dc:"团队队长编号/小组组长"`
	UnionMain *CompanyRes  `json:"unionMain" dc:"关联主体"`
	Parent    *TeamRes     `json:"parent" dc:"团队或小组父级ID"`
}

func (*TeamRes) Data added in v0.3.0

func (m *TeamRes) Data() *TeamRes

Jump to

Keyboard shortcuts

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