Browse Source

临时提交

boweniac 3 months ago
parent
commit
bb50886dba
1 changed files with 12 additions and 6 deletions
  1. 12 6
      ent/schema/label_tagging.go

+ 12 - 6
ent/schema/label_tagging.go

@@ -15,15 +15,21 @@ type LabelTagging struct {
 
 func (LabelTagging) Fields() []ent.Field {
 	return []ent.Field{
-		field.Uint64("label_id").Default(1).
-			Annotations(entsql.WithComments(true)).
-			Comment("标签 ID"),
-		field.Uint64("contact_id").Default(1).
-			Annotations(entsql.WithComments(true)).
-			Comment("联系人 ID"),
 		field.Uint64("organization_id").Optional().Default(1).
 			Comment("机构 ID").
 			Annotations(entsql.WithComments(true)),
+		field.Int("type").Default(1).
+			Annotations(entsql.WithComments(true)).
+			Comment("标签类型:1好友,2群组,3公众号,4企业微信联系人"),
+		field.JSON("conditions", []string{}).Optional().
+			Annotations(entsql.WithComments(true)).
+			Comment("关键词"),
+		field.JSON("action_label_add", []uint64{}).Optional().
+			Annotations(entsql.WithComments(true)).
+			Comment("命中后需要打的标签"),
+		field.JSON("action_label_del", []uint64{}).Optional().
+			Annotations(entsql.WithComments(true)).
+			Comment("命中后需要移除的标签"),
 	}
 }