123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- package member_service
-
- import (
- "SCRM/models"
- )
-
- type Members struct {
- models.UserCustomer
-
- Tags []*models.UserTags `gorm:"many2many:sgj_user_tag_links;association_jointable_foreignkey:tag_id;jointable_foreignkey:user_link_id;" json:"tags"`
- UserCard *UserCard `gorm:"foreignkey:customer_id" json:"user_card"`
- Illness []*CustomerIllness `gorm:"foreignkey:customer_id" json:"illness"`
- UserTags []*models.UserTagLinks `gorm:"foreignkey:user_link_id" json:"user_tags"`
- }
-
- func (Members) TableName() string {
- return "sgj_user_customer"
- }
-
- type UserCard struct {
- models.UserCard
-
- Card *models.UserMembershipCard `gorm:"ForeignKey:CardId" json:"card"`
- }
-
- func (UserCard) TableName() string {
- return "sgj_user_user_card"
- }
-
- type CustomerIllness struct {
- models.CustomerIllness
- }
-
- func (CustomerIllness) TableName() string {
- return "sgj_user_customer_illness"
- }
-
- type Tags struct {
- models.UserTags
-
- MemberCount int64 `json:"member_count"`
- }
-
- func (Tags) TableName() string {
- return "sgj_user_tags"
- }
-
- type TagsMemberCount struct {
- MemberCount int64 `gorm:"member_count"`
- TagID int64 `gorm:"tag_id"`
- }
-
- type CardsMemberCount struct {
- MemberCount int64 `gorm:"member_count"`
- CardID int64 `gorm:"card_id"`
- }
|