co_interface

package
v0.0.0-...-264dbbd Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ICompany

type ICompany[TR co_model.ICompanyRes] interface {
	GetCompanyById(ctx context.Context, id int64) (response TR, err error)
	GetCompanyByName(ctx context.Context, name string) (response TR, err error)
	HasCompanyByName(ctx context.Context, name string, excludeIds ...int64) bool
	QueryCompanyList(ctx context.Context, filter *base_model.SearchParams) (*base_model.CollectRes[TR], error)
	CreateCompany(ctx context.Context, info *co_model.Company) (response TR, err error)
	UpdateCompany(ctx context.Context, info *co_model.Company) (response TR, err error)
	GetCompanyDetail(ctx context.Context, id int64) (response TR, err error)
	SetCompanyState(ctx context.Context, companyId int64, companyState co_enum.CompanyState) (bool, error)
	FilterUnionMainId(ctx context.Context, search *base_model.SearchParams) *base_model.SearchParams
}

type IConfig

type IConfig interface {
	GetConfig() *co_model.Config
}

type IEmployee

type IEmployee[TR co_model.IEmployeeRes] interface {
	SetXDao(dao co_dao.XDao)
	GetEmployeeById(ctx context.Context, id int64) (response TR, err error)
	GetEmployeeByName(ctx context.Context, name string) (response TR, err error)
	HasEmployeeByName(ctx context.Context, name string, unionMainId int64, excludeIds ...int64) bool
	HasEmployeeByNo(ctx context.Context, no string, unionMainId int64, excludeIds ...int64) bool
	GetEmployeeBySession(ctx context.Context) (response TR, err error)
	QueryEmployeeList(ctx context.Context, search *base_model.SearchParams) (*base_model.CollectRes[TR], error)
	CreateEmployee(ctx context.Context, info *co_model.Employee) (response TR, err error)
	UpdateEmployee(ctx context.Context, info *co_model.UpdateEmployee) (response TR, err error)
	UpdateEmployeeAvatar(ctx context.Context, id int64, avatar string) bool
	DeleteEmployee(ctx context.Context, id int64) (bool, error)
	GetEmployeeDetailById(ctx context.Context, id int64) (response TR, err error)
	GetEmployeeListByRoleId(ctx context.Context, roleId int64) (*base_model.CollectRes[TR], error)
	SetEmployeeState(ctx context.Context, id int64, state int) (bool, error)
}

type IFdAccount

type IFdAccount[TR co_model.IFdAccountRes] interface {
	CreateAccount(ctx context.Context, info co_model.FdAccountRegister, userId int64) (response TR, err error)
	GetAccountById(ctx context.Context, id int64) (response TR, err error)
	UpdateAccount(ctx context.Context, accountId int64, info *co_model.UpdateAccount) (bool, error)
	UpdateAccountIsEnable(ctx context.Context, id int64, isEnabled int, userId int64) (bool, error)
	HasAccountByName(ctx context.Context, name string) (response TR, err error)
	UpdateAccountLimitState(ctx context.Context, id int64, limitState int, userId int64) (bool, error)
	QueryAccountListByUserId(ctx context.Context, userId int64) (*base_model.CollectRes[TR], error)
	UpdateAccountBalance(ctx context.Context, accountId int64, amount int64, version int, inOutType int, sysSessionUserId int64) (int64, error)
	GetAccountByUnionUserIdAndCurrencyCode(ctx context.Context, unionUserId int64, currencyCode string) (response TR, err error)
	GetAccountByUnionUserIdAndScene(ctx context.Context, unionUserId int64, accountType co_enum.AccountType, sceneType ...co_enum.SceneType) (response TR, err error)
	GetAccountDetailById(ctx context.Context, id int64) (res *co_model.FdAccountDetailRes, err error)
	Increment(ctx context.Context, id int64, amount int) (bool, error)
	Decrement(ctx context.Context, id int64, amount int) (bool, error)
	SetAccountAllowExceed(ctx context.Context, accountId int64, allowExceed int) (bool, error)
	QueryDetailByUnionUserIdAndSceneType(ctx context.Context, unionUserId int64, sceneType co_enum.SceneType) (*base_model.CollectRes[co_model.FdAccountDetailRes], error)
}

type IFdAccountBill

type IFdAccountBill[TR co_model.IFdAccountBillRes] interface {
	InstallTradeHook(hookKey co_hook.AccountBillHookFilter, hookFunc co_hook.AccountBillHookFunc)
	GetTradeHook() base_hook.BaseHook[co_hook.AccountBillHookFilter, co_hook.AccountBillHookFunc]
	CreateAccountBill(ctx context.Context, info co_model.AccountBillRegister) (bool, error)
	GetAccountBillByAccountId(ctx context.Context, accountId int64, pagination *base_model.SearchParams) (*base_model.CollectRes[TR], error)
}

type IFdBankCard

type IFdBankCard[TR co_model.IFdBankCardRes] interface {
	CreateBankCard(ctx context.Context, info co_model.BankCardRegister, user *sys_model.SysUser) (response TR, err error)
	GetBankCardById(ctx context.Context, id int64) (response TR, err error)
	GetBankCardByCardNumber(ctx context.Context, cardNumber string) (response TR, err error)
	UpdateBankCardState(ctx context.Context, bankCardId int64, state int) (bool, error)
	DeleteBankCardById(ctx context.Context, bankCardId int64) (bool, error)
	QueryBankCardListByUserId(ctx context.Context, userId int64) (*base_model.CollectRes[TR], error)
}

type IFdCurrency

type IFdCurrency[TR co_model.IFdCurrencyRes] interface {
	GetCurrencyByCurrencyCode(ctx context.Context, currencyCode string) (response TR, err error)
	GetCurrencyByCnName(ctx context.Context, cnName string) (response TR, err error)
}

type IFdInvoice

type IFdInvoice[TR co_model.IFdInvoiceRes] interface {
	CreateInvoice(ctx context.Context, info co_model.FdInvoiceRegister) (response TR, err error)
	GetInvoiceById(ctx context.Context, id int64) (response TR, err error)
	QueryInvoiceList(ctx context.Context, info *base_model.SearchParams, userId int64) (*base_model.CollectRes[TR], error)
	DeletesFdInvoiceById(ctx context.Context, invoiceId int64) (bool, error)
	GetFdInvoiceByTaxId(ctx context.Context, taxId string) (response TR, err error)
}

type IFdInvoiceDetail

type IFdInvoiceDetail[TR co_model.IFdInvoiceDetailRes] interface {
	CreateInvoiceDetail(ctx context.Context, info co_model.FdInvoiceDetailRegister) (response TR, err error)
	GetInvoiceDetailById(ctx context.Context, id int64) (response TR, err error)
	MakeInvoiceDetail(ctx context.Context, invoiceDetailId int64, makeInvoiceDetail co_model.FdMakeInvoiceDetail) (res bool, err error)
	AuditInvoiceDetail(ctx context.Context, invoiceDetailId int64, auditInfo co_model.FdInvoiceAuditInfo) (bool, error)
	QueryInvoiceDetailListByInvoiceId(ctx context.Context, invoiceId int64) (*base_model.CollectRes[TR], error)
	DeleteInvoiceDetail(ctx context.Context, id int64) (bool, error)
	QueryInvoiceDetail(ctx context.Context, info *base_model.SearchParams, userId int64, unionMainId int64) (*base_model.CollectRes[TR], error)
}

type IMessage

type IMessage[TR co_model.IMessageRes] interface {
	CreateMessage(ctx context.Context, title string, body string) (bool, error)
	QueryMessageList(ctx context.Context, info *base_model.SearchParams) (*base_model.CollectRes[TR], error)
}

type IModules

type IModules[
	ITMessageRes co_model.IMessageRes,
	ITSendRes co_model.ISendRes,
] interface {
	Message() IMessage[ITMessageRes]
	Send() ISend[ITSendRes]
}

type IMy

type IMy interface {
	GetProfile(ctx context.Context) (*co_model.MyProfileRes, error)
	GetCompany(ctx context.Context) (*co_model.MyCompanyRes, error)
	GetTeams(ctx context.Context) (res co_model.MyTeamListRes, err error)
	SetMyMobile(ctx context.Context, newMobile string, captcha string, password string) (bool, error)
	SetMyAvatar(ctx context.Context, imageId int64) (bool, error)
	GetAccountBills(ctx context.Context, pagination *base_model.SearchParams) (*co_model.MyAccountBillRes, error)
	GetAccounts(ctx context.Context) (*co_model.FdAccountListRes, error)
	GetBankCards(ctx context.Context) (*co_model.FdBankCardListRes, error)
	GetInvoices(ctx context.Context) (*co_model.FdInvoiceListRes, error)
	UpdateAccount(ctx context.Context, accountId int64, info *co_model.UpdateAccount) (api_v1.BoolRes, error)
}

type ISend

type ISend[TR co_model.ISendRes] interface {
	// 添加发送规则
	CreateSend(ctx context.Context, title string, messageId int, sendServerId string, receive string) (bool, error)
	// 设置发送消息
	SetSendInfoAction(ctx context.Context, sendId int, status int8) (bool, error)
	QuerySendInfoList(ctx context.Context, info *base_model.SearchParams) (*base_model.CollectRes[TR], error)
}

type ITeam

type ITeam[TR co_model.ITeamRes] interface {
	SetXDao(dao co_dao.XDao)
	GetTeamById(ctx context.Context, id int64) (TR, error)
	GetTeamByName(ctx context.Context, name string) (TR, error)
	HasTeamByName(ctx context.Context, name string, unionMainId int64, parentId int64, excludeIds ...int64) bool
	QueryTeamList(ctx context.Context, search *base_model.SearchParams) (*base_model.CollectRes[TR], error)
	QueryTeamMemberList(ctx context.Context, search *base_model.SearchParams, isExport ...bool) (*base_model.CollectRes[*co_model.TeamMemberRes], error)
	CreateTeam(ctx context.Context, info *co_model.Team) (TR, error)
	UpdateTeam(ctx context.Context, id int64, name string, remark string) (TR, error)
	QueryTeamListByEmployee(ctx context.Context, employeeId int64, unionMainId int64) (*base_model.CollectRes[TR], error)
	SetTeamMember(ctx context.Context, teamId int64, employeeIds []int64) (api_v1.BoolRes, error)
	RemoveTeamMember(ctx context.Context, teamId int64, employeeIds []int64) (api_v1.BoolRes, error)
	SetTeamOwner(ctx context.Context, teamId int64, employeeId int64) (api_v1.BoolRes, error)
	SetTeamCaptain(ctx context.Context, teamId int64, employeeId int64) (api_v1.BoolRes, error)
	DeleteTeam(ctx context.Context, teamId int64) (api_v1.BoolRes, error)
	DeleteTeamMemberByEmployee(ctx context.Context, employeeId int64) (bool, error)
	GetEmployeeListByTeamId(ctx context.Context, teamId int64) (*base_model.CollectRes[co_model.IEmployeeRes], error)
	GetTeamInviteCode(ctx context.Context, teamId, userId int64) (*co_model.TeamInviteCodeRes, error)
	JoinTeamByInviteCode(ctx context.Context, inviteCode string, userId int64) (bool, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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