business_rules.pb.go 54 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674
  1. // Copyright 2025 Kuban Technologies
  2. //
  3. // 业务规则库 - 针对中国业务场景的预定义验证规则
  4. // 提供开箱即用的常用业务验证
  5. // Code generated by protoc-gen-go. DO NOT EDIT.
  6. // versions:
  7. // protoc-gen-go v1.36.6-modify
  8. // protoc v6.31.1
  9. // source: kuban/api/validate/business_rules.proto
  10. package validate
  11. import (
  12. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  13. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  14. _ "google.golang.org/protobuf/types/descriptorpb"
  15. reflect "reflect"
  16. sync "sync"
  17. unsafe "unsafe"
  18. )
  19. const (
  20. // Verify that this generated code is sufficiently up-to-date.
  21. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  22. // Verify that runtime/protoimpl is sufficiently up-to-date.
  23. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  24. )
  25. // 手机运营商枚举
  26. type MobileOperator int32
  27. const (
  28. MobileOperator_MOBILE_OPERATOR_UNSPECIFIED MobileOperator = 0
  29. MobileOperator_MOBILE_OPERATOR_CHINA_MOBILE MobileOperator = 1 // 中国移动
  30. MobileOperator_MOBILE_OPERATOR_CHINA_UNICOM MobileOperator = 2 // 中国联通
  31. MobileOperator_MOBILE_OPERATOR_CHINA_TELECOM MobileOperator = 3 // 中国电信
  32. MobileOperator_MOBILE_OPERATOR_CHINA_BROADNET MobileOperator = 4 // 中国广电
  33. )
  34. // Enum value maps for MobileOperator.
  35. var (
  36. MobileOperator_name = map[int32]string{
  37. 0: "MOBILE_OPERATOR_UNSPECIFIED",
  38. 1: "MOBILE_OPERATOR_CHINA_MOBILE",
  39. 2: "MOBILE_OPERATOR_CHINA_UNICOM",
  40. 3: "MOBILE_OPERATOR_CHINA_TELECOM",
  41. 4: "MOBILE_OPERATOR_CHINA_BROADNET",
  42. }
  43. MobileOperator_value = map[string]int32{
  44. "MOBILE_OPERATOR_UNSPECIFIED": 0,
  45. "MOBILE_OPERATOR_CHINA_MOBILE": 1,
  46. "MOBILE_OPERATOR_CHINA_UNICOM": 2,
  47. "MOBILE_OPERATOR_CHINA_TELECOM": 3,
  48. "MOBILE_OPERATOR_CHINA_BROADNET": 4,
  49. }
  50. )
  51. func (x MobileOperator) Enum() *MobileOperator {
  52. p := new(MobileOperator)
  53. *p = x
  54. return p
  55. }
  56. func (x MobileOperator) String() string {
  57. return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
  58. }
  59. func (MobileOperator) Descriptor() protoreflect.EnumDescriptor {
  60. return file_kuban_api_validate_business_rules_proto_enumTypes[0].Descriptor()
  61. }
  62. func (MobileOperator) Type() protoreflect.EnumType {
  63. return &file_kuban_api_validate_business_rules_proto_enumTypes[0]
  64. }
  65. func (x MobileOperator) Number() protoreflect.EnumNumber {
  66. return protoreflect.EnumNumber(x)
  67. }
  68. // Deprecated: Use MobileOperator.Descriptor instead.
  69. func (MobileOperator) EnumDescriptor() ([]byte, []int) {
  70. return file_kuban_api_validate_business_rules_proto_rawDescGZIP(), []int{0}
  71. }
  72. // 身份证类型
  73. type IdCardType int32
  74. const (
  75. IdCardType_ID_CARD_TYPE_UNSPECIFIED IdCardType = 0
  76. IdCardType_ID_CARD_TYPE_18_DIGIT IdCardType = 1 // 18位身份证
  77. IdCardType_ID_CARD_TYPE_15_DIGIT IdCardType = 2 // 15位身份证(旧版)
  78. )
  79. // Enum value maps for IdCardType.
  80. var (
  81. IdCardType_name = map[int32]string{
  82. 0: "ID_CARD_TYPE_UNSPECIFIED",
  83. 1: "ID_CARD_TYPE_18_DIGIT",
  84. 2: "ID_CARD_TYPE_15_DIGIT",
  85. }
  86. IdCardType_value = map[string]int32{
  87. "ID_CARD_TYPE_UNSPECIFIED": 0,
  88. "ID_CARD_TYPE_18_DIGIT": 1,
  89. "ID_CARD_TYPE_15_DIGIT": 2,
  90. }
  91. )
  92. func (x IdCardType) Enum() *IdCardType {
  93. p := new(IdCardType)
  94. *p = x
  95. return p
  96. }
  97. func (x IdCardType) String() string {
  98. return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
  99. }
  100. func (IdCardType) Descriptor() protoreflect.EnumDescriptor {
  101. return file_kuban_api_validate_business_rules_proto_enumTypes[1].Descriptor()
  102. }
  103. func (IdCardType) Type() protoreflect.EnumType {
  104. return &file_kuban_api_validate_business_rules_proto_enumTypes[1]
  105. }
  106. func (x IdCardType) Number() protoreflect.EnumNumber {
  107. return protoreflect.EnumNumber(x)
  108. }
  109. // Deprecated: Use IdCardType.Descriptor instead.
  110. func (IdCardType) EnumDescriptor() ([]byte, []int) {
  111. return file_kuban_api_validate_business_rules_proto_rawDescGZIP(), []int{1}
  112. }
  113. // 性别枚举
  114. type Gender int32
  115. const (
  116. Gender_GENDER_UNSPECIFIED Gender = 0
  117. Gender_GENDER_MALE Gender = 1 // 男性
  118. Gender_GENDER_FEMALE Gender = 2 // 女性
  119. )
  120. // Enum value maps for Gender.
  121. var (
  122. Gender_name = map[int32]string{
  123. 0: "GENDER_UNSPECIFIED",
  124. 1: "GENDER_MALE",
  125. 2: "GENDER_FEMALE",
  126. }
  127. Gender_value = map[string]int32{
  128. "GENDER_UNSPECIFIED": 0,
  129. "GENDER_MALE": 1,
  130. "GENDER_FEMALE": 2,
  131. }
  132. )
  133. func (x Gender) Enum() *Gender {
  134. p := new(Gender)
  135. *p = x
  136. return p
  137. }
  138. func (x Gender) String() string {
  139. return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
  140. }
  141. func (Gender) Descriptor() protoreflect.EnumDescriptor {
  142. return file_kuban_api_validate_business_rules_proto_enumTypes[2].Descriptor()
  143. }
  144. func (Gender) Type() protoreflect.EnumType {
  145. return &file_kuban_api_validate_business_rules_proto_enumTypes[2]
  146. }
  147. func (x Gender) Number() protoreflect.EnumNumber {
  148. return protoreflect.EnumNumber(x)
  149. }
  150. // Deprecated: Use Gender.Descriptor instead.
  151. func (Gender) EnumDescriptor() ([]byte, []int) {
  152. return file_kuban_api_validate_business_rules_proto_rawDescGZIP(), []int{2}
  153. }
  154. // 机构类型
  155. type OrganizationType int32
  156. const (
  157. OrganizationType_ORGANIZATION_TYPE_UNSPECIFIED OrganizationType = 0
  158. OrganizationType_ORGANIZATION_TYPE_ENTERPRISE OrganizationType = 1 // 企业
  159. OrganizationType_ORGANIZATION_TYPE_INSTITUTION OrganizationType = 2 // 事业单位
  160. OrganizationType_ORGANIZATION_TYPE_SOCIAL_GROUP OrganizationType = 3 // 社会团体
  161. OrganizationType_ORGANIZATION_TYPE_GOVERNMENT OrganizationType = 9 // 机关
  162. )
  163. // Enum value maps for OrganizationType.
  164. var (
  165. OrganizationType_name = map[int32]string{
  166. 0: "ORGANIZATION_TYPE_UNSPECIFIED",
  167. 1: "ORGANIZATION_TYPE_ENTERPRISE",
  168. 2: "ORGANIZATION_TYPE_INSTITUTION",
  169. 3: "ORGANIZATION_TYPE_SOCIAL_GROUP",
  170. 9: "ORGANIZATION_TYPE_GOVERNMENT",
  171. }
  172. OrganizationType_value = map[string]int32{
  173. "ORGANIZATION_TYPE_UNSPECIFIED": 0,
  174. "ORGANIZATION_TYPE_ENTERPRISE": 1,
  175. "ORGANIZATION_TYPE_INSTITUTION": 2,
  176. "ORGANIZATION_TYPE_SOCIAL_GROUP": 3,
  177. "ORGANIZATION_TYPE_GOVERNMENT": 9,
  178. }
  179. )
  180. func (x OrganizationType) Enum() *OrganizationType {
  181. p := new(OrganizationType)
  182. *p = x
  183. return p
  184. }
  185. func (x OrganizationType) String() string {
  186. return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
  187. }
  188. func (OrganizationType) Descriptor() protoreflect.EnumDescriptor {
  189. return file_kuban_api_validate_business_rules_proto_enumTypes[3].Descriptor()
  190. }
  191. func (OrganizationType) Type() protoreflect.EnumType {
  192. return &file_kuban_api_validate_business_rules_proto_enumTypes[3]
  193. }
  194. func (x OrganizationType) Number() protoreflect.EnumNumber {
  195. return protoreflect.EnumNumber(x)
  196. }
  197. // Deprecated: Use OrganizationType.Descriptor instead.
  198. func (OrganizationType) EnumDescriptor() ([]byte, []int) {
  199. return file_kuban_api_validate_business_rules_proto_rawDescGZIP(), []int{3}
  200. }
  201. // 银行卡类型
  202. type BankCardType int32
  203. const (
  204. BankCardType_BANK_CARD_TYPE_UNSPECIFIED BankCardType = 0
  205. BankCardType_BANK_CARD_TYPE_DEBIT BankCardType = 1 // 借记卡
  206. BankCardType_BANK_CARD_TYPE_CREDIT BankCardType = 2 // 信用卡
  207. )
  208. // Enum value maps for BankCardType.
  209. var (
  210. BankCardType_name = map[int32]string{
  211. 0: "BANK_CARD_TYPE_UNSPECIFIED",
  212. 1: "BANK_CARD_TYPE_DEBIT",
  213. 2: "BANK_CARD_TYPE_CREDIT",
  214. }
  215. BankCardType_value = map[string]int32{
  216. "BANK_CARD_TYPE_UNSPECIFIED": 0,
  217. "BANK_CARD_TYPE_DEBIT": 1,
  218. "BANK_CARD_TYPE_CREDIT": 2,
  219. }
  220. )
  221. func (x BankCardType) Enum() *BankCardType {
  222. p := new(BankCardType)
  223. *p = x
  224. return p
  225. }
  226. func (x BankCardType) String() string {
  227. return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
  228. }
  229. func (BankCardType) Descriptor() protoreflect.EnumDescriptor {
  230. return file_kuban_api_validate_business_rules_proto_enumTypes[4].Descriptor()
  231. }
  232. func (BankCardType) Type() protoreflect.EnumType {
  233. return &file_kuban_api_validate_business_rules_proto_enumTypes[4]
  234. }
  235. func (x BankCardType) Number() protoreflect.EnumNumber {
  236. return protoreflect.EnumNumber(x)
  237. }
  238. // Deprecated: Use BankCardType.Descriptor instead.
  239. func (BankCardType) EnumDescriptor() ([]byte, []int) {
  240. return file_kuban_api_validate_business_rules_proto_rawDescGZIP(), []int{4}
  241. }
  242. // 中国手机号验证规则
  243. type ChineseMobileRules struct {
  244. state protoimpl.MessageState `protogen:"open.v1"`
  245. // 是否启用验证
  246. Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled"`
  247. // 允许的运营商
  248. AllowedOperators []MobileOperator `protobuf:"varint,2,rep,packed,name=allowed_operators,json=allowedOperators,proto3,enum=kuban.api.validate.MobileOperator" json:"allowed_operators"`
  249. // 是否允许虚拟运营商号码
  250. AllowVirtual bool `protobuf:"varint,3,opt,name=allow_virtual,json=allowVirtual,proto3" json:"allow_virtual"`
  251. // 自定义错误消息
  252. ErrorMessage string `protobuf:"bytes,4,opt,name=error_message,json=errorMessage,proto3" json:"error_message"`
  253. unknownFields protoimpl.UnknownFields
  254. sizeCache protoimpl.SizeCache
  255. }
  256. func (x *ChineseMobileRules) Reset() {
  257. *x = ChineseMobileRules{}
  258. mi := &file_kuban_api_validate_business_rules_proto_msgTypes[0]
  259. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  260. ms.StoreMessageInfo(mi)
  261. }
  262. func (x *ChineseMobileRules) String() string {
  263. return protoimpl.X.MessageStringOf(x)
  264. }
  265. func (*ChineseMobileRules) ProtoMessage() {}
  266. func (x *ChineseMobileRules) ProtoReflect() protoreflect.Message {
  267. mi := &file_kuban_api_validate_business_rules_proto_msgTypes[0]
  268. if x != nil {
  269. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  270. if ms.LoadMessageInfo() == nil {
  271. ms.StoreMessageInfo(mi)
  272. }
  273. return ms
  274. }
  275. return mi.MessageOf(x)
  276. }
  277. // Deprecated: Use ChineseMobileRules.ProtoReflect.Descriptor instead.
  278. func (*ChineseMobileRules) Descriptor() ([]byte, []int) {
  279. return file_kuban_api_validate_business_rules_proto_rawDescGZIP(), []int{0}
  280. }
  281. func (x *ChineseMobileRules) GetEnabled() bool {
  282. if x != nil {
  283. return x.Enabled
  284. }
  285. return false
  286. }
  287. func (x *ChineseMobileRules) GetAllowedOperators() []MobileOperator {
  288. if x != nil {
  289. return x.AllowedOperators
  290. }
  291. return nil
  292. }
  293. func (x *ChineseMobileRules) GetAllowVirtual() bool {
  294. if x != nil {
  295. return x.AllowVirtual
  296. }
  297. return false
  298. }
  299. func (x *ChineseMobileRules) GetErrorMessage() string {
  300. if x != nil {
  301. return x.ErrorMessage
  302. }
  303. return ""
  304. }
  305. // 中国身份证验证规则
  306. type ChineseIdCardRules struct {
  307. state protoimpl.MessageState `protogen:"open.v1"`
  308. // 是否启用验证
  309. Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled"`
  310. // 是否验证校验位
  311. VerifyChecksum bool `protobuf:"varint,2,opt,name=verify_checksum,json=verifyChecksum,proto3" json:"verify_checksum"`
  312. // 是否验证出生日期有效性
  313. VerifyBirthDate bool `protobuf:"varint,3,opt,name=verify_birth_date,json=verifyBirthDate,proto3" json:"verify_birth_date"`
  314. // 是否验证地区码有效性
  315. VerifyAreaCode bool `protobuf:"varint,4,opt,name=verify_area_code,json=verifyAreaCode,proto3" json:"verify_area_code"`
  316. // 允许的身份证类型
  317. AllowedTypes []IdCardType `protobuf:"varint,5,rep,packed,name=allowed_types,json=allowedTypes,proto3,enum=kuban.api.validate.IdCardType" json:"allowed_types"`
  318. // 年龄范围限制
  319. MinAge *int32 `protobuf:"varint,6,opt,name=min_age,json=minAge,proto3,oneof" json:"min_age"`
  320. MaxAge *int32 `protobuf:"varint,7,opt,name=max_age,json=maxAge,proto3,oneof" json:"max_age"`
  321. // 性别限制
  322. RequiredGender *Gender `protobuf:"varint,8,opt,name=required_gender,json=requiredGender,proto3,enum=kuban.api.validate.Gender,oneof" json:"required_gender"`
  323. // 自定义错误消息
  324. ErrorMessage string `protobuf:"bytes,9,opt,name=error_message,json=errorMessage,proto3" json:"error_message"`
  325. unknownFields protoimpl.UnknownFields
  326. sizeCache protoimpl.SizeCache
  327. }
  328. func (x *ChineseIdCardRules) Reset() {
  329. *x = ChineseIdCardRules{}
  330. mi := &file_kuban_api_validate_business_rules_proto_msgTypes[1]
  331. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  332. ms.StoreMessageInfo(mi)
  333. }
  334. func (x *ChineseIdCardRules) String() string {
  335. return protoimpl.X.MessageStringOf(x)
  336. }
  337. func (*ChineseIdCardRules) ProtoMessage() {}
  338. func (x *ChineseIdCardRules) ProtoReflect() protoreflect.Message {
  339. mi := &file_kuban_api_validate_business_rules_proto_msgTypes[1]
  340. if x != nil {
  341. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  342. if ms.LoadMessageInfo() == nil {
  343. ms.StoreMessageInfo(mi)
  344. }
  345. return ms
  346. }
  347. return mi.MessageOf(x)
  348. }
  349. // Deprecated: Use ChineseIdCardRules.ProtoReflect.Descriptor instead.
  350. func (*ChineseIdCardRules) Descriptor() ([]byte, []int) {
  351. return file_kuban_api_validate_business_rules_proto_rawDescGZIP(), []int{1}
  352. }
  353. func (x *ChineseIdCardRules) GetEnabled() bool {
  354. if x != nil {
  355. return x.Enabled
  356. }
  357. return false
  358. }
  359. func (x *ChineseIdCardRules) GetVerifyChecksum() bool {
  360. if x != nil {
  361. return x.VerifyChecksum
  362. }
  363. return false
  364. }
  365. func (x *ChineseIdCardRules) GetVerifyBirthDate() bool {
  366. if x != nil {
  367. return x.VerifyBirthDate
  368. }
  369. return false
  370. }
  371. func (x *ChineseIdCardRules) GetVerifyAreaCode() bool {
  372. if x != nil {
  373. return x.VerifyAreaCode
  374. }
  375. return false
  376. }
  377. func (x *ChineseIdCardRules) GetAllowedTypes() []IdCardType {
  378. if x != nil {
  379. return x.AllowedTypes
  380. }
  381. return nil
  382. }
  383. func (x *ChineseIdCardRules) GetMinAge() int32 {
  384. if x != nil && x.MinAge != nil {
  385. return *x.MinAge
  386. }
  387. return 0
  388. }
  389. func (x *ChineseIdCardRules) GetMaxAge() int32 {
  390. if x != nil && x.MaxAge != nil {
  391. return *x.MaxAge
  392. }
  393. return 0
  394. }
  395. func (x *ChineseIdCardRules) GetRequiredGender() Gender {
  396. if x != nil && x.RequiredGender != nil {
  397. return *x.RequiredGender
  398. }
  399. return Gender_GENDER_UNSPECIFIED
  400. }
  401. func (x *ChineseIdCardRules) GetErrorMessage() string {
  402. if x != nil {
  403. return x.ErrorMessage
  404. }
  405. return ""
  406. }
  407. // 统一社会信用代码验证规则
  408. type UnifiedSocialCreditCodeRules struct {
  409. state protoimpl.MessageState `protogen:"open.v1"`
  410. // 是否启用验证
  411. Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled"`
  412. // 是否验证校验位
  413. VerifyChecksum bool `protobuf:"varint,2,opt,name=verify_checksum,json=verifyChecksum,proto3" json:"verify_checksum"`
  414. // 允许的机构类型
  415. AllowedTypes []OrganizationType `protobuf:"varint,3,rep,packed,name=allowed_types,json=allowedTypes,proto3,enum=kuban.api.validate.OrganizationType" json:"allowed_types"`
  416. // 自定义错误消息
  417. ErrorMessage string `protobuf:"bytes,4,opt,name=error_message,json=errorMessage,proto3" json:"error_message"`
  418. unknownFields protoimpl.UnknownFields
  419. sizeCache protoimpl.SizeCache
  420. }
  421. func (x *UnifiedSocialCreditCodeRules) Reset() {
  422. *x = UnifiedSocialCreditCodeRules{}
  423. mi := &file_kuban_api_validate_business_rules_proto_msgTypes[2]
  424. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  425. ms.StoreMessageInfo(mi)
  426. }
  427. func (x *UnifiedSocialCreditCodeRules) String() string {
  428. return protoimpl.X.MessageStringOf(x)
  429. }
  430. func (*UnifiedSocialCreditCodeRules) ProtoMessage() {}
  431. func (x *UnifiedSocialCreditCodeRules) ProtoReflect() protoreflect.Message {
  432. mi := &file_kuban_api_validate_business_rules_proto_msgTypes[2]
  433. if x != nil {
  434. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  435. if ms.LoadMessageInfo() == nil {
  436. ms.StoreMessageInfo(mi)
  437. }
  438. return ms
  439. }
  440. return mi.MessageOf(x)
  441. }
  442. // Deprecated: Use UnifiedSocialCreditCodeRules.ProtoReflect.Descriptor instead.
  443. func (*UnifiedSocialCreditCodeRules) Descriptor() ([]byte, []int) {
  444. return file_kuban_api_validate_business_rules_proto_rawDescGZIP(), []int{2}
  445. }
  446. func (x *UnifiedSocialCreditCodeRules) GetEnabled() bool {
  447. if x != nil {
  448. return x.Enabled
  449. }
  450. return false
  451. }
  452. func (x *UnifiedSocialCreditCodeRules) GetVerifyChecksum() bool {
  453. if x != nil {
  454. return x.VerifyChecksum
  455. }
  456. return false
  457. }
  458. func (x *UnifiedSocialCreditCodeRules) GetAllowedTypes() []OrganizationType {
  459. if x != nil {
  460. return x.AllowedTypes
  461. }
  462. return nil
  463. }
  464. func (x *UnifiedSocialCreditCodeRules) GetErrorMessage() string {
  465. if x != nil {
  466. return x.ErrorMessage
  467. }
  468. return ""
  469. }
  470. // 银行卡号验证规则
  471. type BankCardRules struct {
  472. state protoimpl.MessageState `protogen:"open.v1"`
  473. // 是否启用验证
  474. Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled"`
  475. // 是否使用 Luhn 算法验证
  476. VerifyLuhn bool `protobuf:"varint,2,opt,name=verify_luhn,json=verifyLuhn,proto3" json:"verify_luhn"`
  477. // 允许的卡类型
  478. AllowedTypes []BankCardType `protobuf:"varint,3,rep,packed,name=allowed_types,json=allowedTypes,proto3,enum=kuban.api.validate.BankCardType" json:"allowed_types"`
  479. // 允许的银行
  480. AllowedBanks []string `protobuf:"bytes,4,rep,name=allowed_banks,json=allowedBanks,proto3" json:"allowed_banks"` // 银行代码列表
  481. // 自定义错误消息
  482. ErrorMessage string `protobuf:"bytes,5,opt,name=error_message,json=errorMessage,proto3" json:"error_message"`
  483. unknownFields protoimpl.UnknownFields
  484. sizeCache protoimpl.SizeCache
  485. }
  486. func (x *BankCardRules) Reset() {
  487. *x = BankCardRules{}
  488. mi := &file_kuban_api_validate_business_rules_proto_msgTypes[3]
  489. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  490. ms.StoreMessageInfo(mi)
  491. }
  492. func (x *BankCardRules) String() string {
  493. return protoimpl.X.MessageStringOf(x)
  494. }
  495. func (*BankCardRules) ProtoMessage() {}
  496. func (x *BankCardRules) ProtoReflect() protoreflect.Message {
  497. mi := &file_kuban_api_validate_business_rules_proto_msgTypes[3]
  498. if x != nil {
  499. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  500. if ms.LoadMessageInfo() == nil {
  501. ms.StoreMessageInfo(mi)
  502. }
  503. return ms
  504. }
  505. return mi.MessageOf(x)
  506. }
  507. // Deprecated: Use BankCardRules.ProtoReflect.Descriptor instead.
  508. func (*BankCardRules) Descriptor() ([]byte, []int) {
  509. return file_kuban_api_validate_business_rules_proto_rawDescGZIP(), []int{3}
  510. }
  511. func (x *BankCardRules) GetEnabled() bool {
  512. if x != nil {
  513. return x.Enabled
  514. }
  515. return false
  516. }
  517. func (x *BankCardRules) GetVerifyLuhn() bool {
  518. if x != nil {
  519. return x.VerifyLuhn
  520. }
  521. return false
  522. }
  523. func (x *BankCardRules) GetAllowedTypes() []BankCardType {
  524. if x != nil {
  525. return x.AllowedTypes
  526. }
  527. return nil
  528. }
  529. func (x *BankCardRules) GetAllowedBanks() []string {
  530. if x != nil {
  531. return x.AllowedBanks
  532. }
  533. return nil
  534. }
  535. func (x *BankCardRules) GetErrorMessage() string {
  536. if x != nil {
  537. return x.ErrorMessage
  538. }
  539. return ""
  540. }
  541. // 中文姓名验证规则
  542. type ChineseNameRules struct {
  543. state protoimpl.MessageState `protogen:"open.v1"`
  544. // 是否启用验证
  545. Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled"`
  546. // 最小长度(字符数)
  547. MinLength *uint32 `protobuf:"varint,2,opt,name=min_length,json=minLength,proto3,oneof" json:"min_length"`
  548. // 最大长度(字符数)
  549. MaxLength *uint32 `protobuf:"varint,3,opt,name=max_length,json=maxLength,proto3,oneof" json:"max_length"`
  550. // 是否允许少数民族姓名(可能包含·等特殊字符)
  551. AllowEthnicMinority bool `protobuf:"varint,4,opt,name=allow_ethnic_minority,json=allowEthnicMinority,proto3" json:"allow_ethnic_minority"`
  552. // 是否允许英文名
  553. AllowEnglish bool `protobuf:"varint,5,opt,name=allow_english,json=allowEnglish,proto3" json:"allow_english"`
  554. // 自定义错误消息
  555. ErrorMessage string `protobuf:"bytes,6,opt,name=error_message,json=errorMessage,proto3" json:"error_message"`
  556. unknownFields protoimpl.UnknownFields
  557. sizeCache protoimpl.SizeCache
  558. }
  559. func (x *ChineseNameRules) Reset() {
  560. *x = ChineseNameRules{}
  561. mi := &file_kuban_api_validate_business_rules_proto_msgTypes[4]
  562. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  563. ms.StoreMessageInfo(mi)
  564. }
  565. func (x *ChineseNameRules) String() string {
  566. return protoimpl.X.MessageStringOf(x)
  567. }
  568. func (*ChineseNameRules) ProtoMessage() {}
  569. func (x *ChineseNameRules) ProtoReflect() protoreflect.Message {
  570. mi := &file_kuban_api_validate_business_rules_proto_msgTypes[4]
  571. if x != nil {
  572. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  573. if ms.LoadMessageInfo() == nil {
  574. ms.StoreMessageInfo(mi)
  575. }
  576. return ms
  577. }
  578. return mi.MessageOf(x)
  579. }
  580. // Deprecated: Use ChineseNameRules.ProtoReflect.Descriptor instead.
  581. func (*ChineseNameRules) Descriptor() ([]byte, []int) {
  582. return file_kuban_api_validate_business_rules_proto_rawDescGZIP(), []int{4}
  583. }
  584. func (x *ChineseNameRules) GetEnabled() bool {
  585. if x != nil {
  586. return x.Enabled
  587. }
  588. return false
  589. }
  590. func (x *ChineseNameRules) GetMinLength() uint32 {
  591. if x != nil && x.MinLength != nil {
  592. return *x.MinLength
  593. }
  594. return 0
  595. }
  596. func (x *ChineseNameRules) GetMaxLength() uint32 {
  597. if x != nil && x.MaxLength != nil {
  598. return *x.MaxLength
  599. }
  600. return 0
  601. }
  602. func (x *ChineseNameRules) GetAllowEthnicMinority() bool {
  603. if x != nil {
  604. return x.AllowEthnicMinority
  605. }
  606. return false
  607. }
  608. func (x *ChineseNameRules) GetAllowEnglish() bool {
  609. if x != nil {
  610. return x.AllowEnglish
  611. }
  612. return false
  613. }
  614. func (x *ChineseNameRules) GetErrorMessage() string {
  615. if x != nil {
  616. return x.ErrorMessage
  617. }
  618. return ""
  619. }
  620. // 邮政编码验证规则
  621. type PostcodeRules struct {
  622. state protoimpl.MessageState `protogen:"open.v1"`
  623. // 是否启用验证
  624. Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled"`
  625. // 国家/地区代码(默认为中国 CN)
  626. CountryCode string `protobuf:"bytes,2,opt,name=country_code,json=countryCode,proto3" json:"country_code"`
  627. // 允许的省份代码(中国邮编前两位)
  628. AllowedProvinces []string `protobuf:"bytes,3,rep,name=allowed_provinces,json=allowedProvinces,proto3" json:"allowed_provinces"`
  629. // 自定义错误消息
  630. ErrorMessage string `protobuf:"bytes,4,opt,name=error_message,json=errorMessage,proto3" json:"error_message"`
  631. unknownFields protoimpl.UnknownFields
  632. sizeCache protoimpl.SizeCache
  633. }
  634. func (x *PostcodeRules) Reset() {
  635. *x = PostcodeRules{}
  636. mi := &file_kuban_api_validate_business_rules_proto_msgTypes[5]
  637. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  638. ms.StoreMessageInfo(mi)
  639. }
  640. func (x *PostcodeRules) String() string {
  641. return protoimpl.X.MessageStringOf(x)
  642. }
  643. func (*PostcodeRules) ProtoMessage() {}
  644. func (x *PostcodeRules) ProtoReflect() protoreflect.Message {
  645. mi := &file_kuban_api_validate_business_rules_proto_msgTypes[5]
  646. if x != nil {
  647. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  648. if ms.LoadMessageInfo() == nil {
  649. ms.StoreMessageInfo(mi)
  650. }
  651. return ms
  652. }
  653. return mi.MessageOf(x)
  654. }
  655. // Deprecated: Use PostcodeRules.ProtoReflect.Descriptor instead.
  656. func (*PostcodeRules) Descriptor() ([]byte, []int) {
  657. return file_kuban_api_validate_business_rules_proto_rawDescGZIP(), []int{5}
  658. }
  659. func (x *PostcodeRules) GetEnabled() bool {
  660. if x != nil {
  661. return x.Enabled
  662. }
  663. return false
  664. }
  665. func (x *PostcodeRules) GetCountryCode() string {
  666. if x != nil {
  667. return x.CountryCode
  668. }
  669. return ""
  670. }
  671. func (x *PostcodeRules) GetAllowedProvinces() []string {
  672. if x != nil {
  673. return x.AllowedProvinces
  674. }
  675. return nil
  676. }
  677. func (x *PostcodeRules) GetErrorMessage() string {
  678. if x != nil {
  679. return x.ErrorMessage
  680. }
  681. return ""
  682. }
  683. // 用户注册验证规则
  684. type UserRegistrationRules struct {
  685. state protoimpl.MessageState `protogen:"open.v1"`
  686. // 用户名规则
  687. Username *StringRules `protobuf:"bytes,1,opt,name=username,proto3" json:"username"`
  688. // 手机号规则
  689. Mobile *ChineseMobileRules `protobuf:"bytes,2,opt,name=mobile,proto3" json:"mobile"`
  690. // 邮箱规则
  691. Email *StringRules `protobuf:"bytes,3,opt,name=email,proto3" json:"email"`
  692. // 密码规则
  693. Password *PasswordRules `protobuf:"bytes,4,opt,name=password,proto3" json:"password"`
  694. // 真实姓名规则(可选)
  695. RealName *ChineseNameRules `protobuf:"bytes,5,opt,name=real_name,json=realName,proto3" json:"real_name"`
  696. // 身份证规则(可选)
  697. IdCard *ChineseIdCardRules `protobuf:"bytes,6,opt,name=id_card,json=idCard,proto3" json:"id_card"`
  698. unknownFields protoimpl.UnknownFields
  699. sizeCache protoimpl.SizeCache
  700. }
  701. func (x *UserRegistrationRules) Reset() {
  702. *x = UserRegistrationRules{}
  703. mi := &file_kuban_api_validate_business_rules_proto_msgTypes[6]
  704. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  705. ms.StoreMessageInfo(mi)
  706. }
  707. func (x *UserRegistrationRules) String() string {
  708. return protoimpl.X.MessageStringOf(x)
  709. }
  710. func (*UserRegistrationRules) ProtoMessage() {}
  711. func (x *UserRegistrationRules) ProtoReflect() protoreflect.Message {
  712. mi := &file_kuban_api_validate_business_rules_proto_msgTypes[6]
  713. if x != nil {
  714. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  715. if ms.LoadMessageInfo() == nil {
  716. ms.StoreMessageInfo(mi)
  717. }
  718. return ms
  719. }
  720. return mi.MessageOf(x)
  721. }
  722. // Deprecated: Use UserRegistrationRules.ProtoReflect.Descriptor instead.
  723. func (*UserRegistrationRules) Descriptor() ([]byte, []int) {
  724. return file_kuban_api_validate_business_rules_proto_rawDescGZIP(), []int{6}
  725. }
  726. func (x *UserRegistrationRules) GetUsername() *StringRules {
  727. if x != nil {
  728. return x.Username
  729. }
  730. return nil
  731. }
  732. func (x *UserRegistrationRules) GetMobile() *ChineseMobileRules {
  733. if x != nil {
  734. return x.Mobile
  735. }
  736. return nil
  737. }
  738. func (x *UserRegistrationRules) GetEmail() *StringRules {
  739. if x != nil {
  740. return x.Email
  741. }
  742. return nil
  743. }
  744. func (x *UserRegistrationRules) GetPassword() *PasswordRules {
  745. if x != nil {
  746. return x.Password
  747. }
  748. return nil
  749. }
  750. func (x *UserRegistrationRules) GetRealName() *ChineseNameRules {
  751. if x != nil {
  752. return x.RealName
  753. }
  754. return nil
  755. }
  756. func (x *UserRegistrationRules) GetIdCard() *ChineseIdCardRules {
  757. if x != nil {
  758. return x.IdCard
  759. }
  760. return nil
  761. }
  762. // 密码强度验证规则
  763. type PasswordRules struct {
  764. state protoimpl.MessageState `protogen:"open.v1"`
  765. // 最小长度
  766. MinLength uint32 `protobuf:"varint,1,opt,name=min_length,json=minLength,proto3" json:"min_length"`
  767. // 最大长度
  768. MaxLength uint32 `protobuf:"varint,2,opt,name=max_length,json=maxLength,proto3" json:"max_length"`
  769. // 是否要求包含大写字母
  770. RequireUppercase bool `protobuf:"varint,3,opt,name=require_uppercase,json=requireUppercase,proto3" json:"require_uppercase"`
  771. // 是否要求包含小写字母
  772. RequireLowercase bool `protobuf:"varint,4,opt,name=require_lowercase,json=requireLowercase,proto3" json:"require_lowercase"`
  773. // 是否要求包含数字
  774. RequireDigit bool `protobuf:"varint,5,opt,name=require_digit,json=requireDigit,proto3" json:"require_digit"`
  775. // 是否要求包含特殊字符
  776. RequireSpecial bool `protobuf:"varint,6,opt,name=require_special,json=requireSpecial,proto3" json:"require_special"`
  777. // 特殊字符集合(默认: !@#$%^&*()_+-=[]{}|;:,.<>?)
  778. SpecialChars string `protobuf:"bytes,7,opt,name=special_chars,json=specialChars,proto3" json:"special_chars"`
  779. // 是否禁止常见弱密码
  780. RejectCommonWeak bool `protobuf:"varint,8,opt,name=reject_common_weak,json=rejectCommonWeak,proto3" json:"reject_common_weak"`
  781. // 自定义错误消息
  782. ErrorMessage string `protobuf:"bytes,9,opt,name=error_message,json=errorMessage,proto3" json:"error_message"`
  783. unknownFields protoimpl.UnknownFields
  784. sizeCache protoimpl.SizeCache
  785. }
  786. func (x *PasswordRules) Reset() {
  787. *x = PasswordRules{}
  788. mi := &file_kuban_api_validate_business_rules_proto_msgTypes[7]
  789. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  790. ms.StoreMessageInfo(mi)
  791. }
  792. func (x *PasswordRules) String() string {
  793. return protoimpl.X.MessageStringOf(x)
  794. }
  795. func (*PasswordRules) ProtoMessage() {}
  796. func (x *PasswordRules) ProtoReflect() protoreflect.Message {
  797. mi := &file_kuban_api_validate_business_rules_proto_msgTypes[7]
  798. if x != nil {
  799. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  800. if ms.LoadMessageInfo() == nil {
  801. ms.StoreMessageInfo(mi)
  802. }
  803. return ms
  804. }
  805. return mi.MessageOf(x)
  806. }
  807. // Deprecated: Use PasswordRules.ProtoReflect.Descriptor instead.
  808. func (*PasswordRules) Descriptor() ([]byte, []int) {
  809. return file_kuban_api_validate_business_rules_proto_rawDescGZIP(), []int{7}
  810. }
  811. func (x *PasswordRules) GetMinLength() uint32 {
  812. if x != nil {
  813. return x.MinLength
  814. }
  815. return 0
  816. }
  817. func (x *PasswordRules) GetMaxLength() uint32 {
  818. if x != nil {
  819. return x.MaxLength
  820. }
  821. return 0
  822. }
  823. func (x *PasswordRules) GetRequireUppercase() bool {
  824. if x != nil {
  825. return x.RequireUppercase
  826. }
  827. return false
  828. }
  829. func (x *PasswordRules) GetRequireLowercase() bool {
  830. if x != nil {
  831. return x.RequireLowercase
  832. }
  833. return false
  834. }
  835. func (x *PasswordRules) GetRequireDigit() bool {
  836. if x != nil {
  837. return x.RequireDigit
  838. }
  839. return false
  840. }
  841. func (x *PasswordRules) GetRequireSpecial() bool {
  842. if x != nil {
  843. return x.RequireSpecial
  844. }
  845. return false
  846. }
  847. func (x *PasswordRules) GetSpecialChars() string {
  848. if x != nil {
  849. return x.SpecialChars
  850. }
  851. return ""
  852. }
  853. func (x *PasswordRules) GetRejectCommonWeak() bool {
  854. if x != nil {
  855. return x.RejectCommonWeak
  856. }
  857. return false
  858. }
  859. func (x *PasswordRules) GetErrorMessage() string {
  860. if x != nil {
  861. return x.ErrorMessage
  862. }
  863. return ""
  864. }
  865. // 企业信息验证规则
  866. type EnterpriseInfoRules struct {
  867. state protoimpl.MessageState `protogen:"open.v1"`
  868. // 企业名称规则
  869. CompanyName *StringRules `protobuf:"bytes,1,opt,name=company_name,json=companyName,proto3" json:"company_name"`
  870. // 统一社会信用代码规则
  871. Uscc *UnifiedSocialCreditCodeRules `protobuf:"bytes,2,opt,name=uscc,proto3" json:"uscc"`
  872. // 法人姓名规则
  873. LegalPersonName *ChineseNameRules `protobuf:"bytes,3,opt,name=legal_person_name,json=legalPersonName,proto3" json:"legal_person_name"`
  874. // 注册资本范围
  875. MinRegisteredCapital *int64 `protobuf:"varint,4,opt,name=min_registered_capital,json=minRegisteredCapital,proto3,oneof" json:"min_registered_capital"`
  876. MaxRegisteredCapital *int64 `protobuf:"varint,5,opt,name=max_registered_capital,json=maxRegisteredCapital,proto3,oneof" json:"max_registered_capital"`
  877. // 营业执照号码(旧格式)
  878. BusinessLicense *StringRules `protobuf:"bytes,6,opt,name=business_license,json=businessLicense,proto3" json:"business_license"`
  879. unknownFields protoimpl.UnknownFields
  880. sizeCache protoimpl.SizeCache
  881. }
  882. func (x *EnterpriseInfoRules) Reset() {
  883. *x = EnterpriseInfoRules{}
  884. mi := &file_kuban_api_validate_business_rules_proto_msgTypes[8]
  885. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  886. ms.StoreMessageInfo(mi)
  887. }
  888. func (x *EnterpriseInfoRules) String() string {
  889. return protoimpl.X.MessageStringOf(x)
  890. }
  891. func (*EnterpriseInfoRules) ProtoMessage() {}
  892. func (x *EnterpriseInfoRules) ProtoReflect() protoreflect.Message {
  893. mi := &file_kuban_api_validate_business_rules_proto_msgTypes[8]
  894. if x != nil {
  895. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  896. if ms.LoadMessageInfo() == nil {
  897. ms.StoreMessageInfo(mi)
  898. }
  899. return ms
  900. }
  901. return mi.MessageOf(x)
  902. }
  903. // Deprecated: Use EnterpriseInfoRules.ProtoReflect.Descriptor instead.
  904. func (*EnterpriseInfoRules) Descriptor() ([]byte, []int) {
  905. return file_kuban_api_validate_business_rules_proto_rawDescGZIP(), []int{8}
  906. }
  907. func (x *EnterpriseInfoRules) GetCompanyName() *StringRules {
  908. if x != nil {
  909. return x.CompanyName
  910. }
  911. return nil
  912. }
  913. func (x *EnterpriseInfoRules) GetUscc() *UnifiedSocialCreditCodeRules {
  914. if x != nil {
  915. return x.Uscc
  916. }
  917. return nil
  918. }
  919. func (x *EnterpriseInfoRules) GetLegalPersonName() *ChineseNameRules {
  920. if x != nil {
  921. return x.LegalPersonName
  922. }
  923. return nil
  924. }
  925. func (x *EnterpriseInfoRules) GetMinRegisteredCapital() int64 {
  926. if x != nil && x.MinRegisteredCapital != nil {
  927. return *x.MinRegisteredCapital
  928. }
  929. return 0
  930. }
  931. func (x *EnterpriseInfoRules) GetMaxRegisteredCapital() int64 {
  932. if x != nil && x.MaxRegisteredCapital != nil {
  933. return *x.MaxRegisteredCapital
  934. }
  935. return 0
  936. }
  937. func (x *EnterpriseInfoRules) GetBusinessLicense() *StringRules {
  938. if x != nil {
  939. return x.BusinessLicense
  940. }
  941. return nil
  942. }
  943. // 地址验证规则
  944. type AddressRules struct {
  945. state protoimpl.MessageState `protogen:"open.v1"`
  946. // 省份
  947. Province *StringRules `protobuf:"bytes,1,opt,name=province,proto3" json:"province"`
  948. // 城市
  949. City *StringRules `protobuf:"bytes,2,opt,name=city,proto3" json:"city"`
  950. // 区县
  951. District *StringRules `protobuf:"bytes,3,opt,name=district,proto3" json:"district"`
  952. // 详细地址
  953. Detail *StringRules `protobuf:"bytes,4,opt,name=detail,proto3" json:"detail"`
  954. // 邮政编码
  955. Postcode *PostcodeRules `protobuf:"bytes,5,opt,name=postcode,proto3" json:"postcode"`
  956. // 是否要求完整地址
  957. RequireComplete bool `protobuf:"varint,6,opt,name=require_complete,json=requireComplete,proto3" json:"require_complete"`
  958. unknownFields protoimpl.UnknownFields
  959. sizeCache protoimpl.SizeCache
  960. }
  961. func (x *AddressRules) Reset() {
  962. *x = AddressRules{}
  963. mi := &file_kuban_api_validate_business_rules_proto_msgTypes[9]
  964. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  965. ms.StoreMessageInfo(mi)
  966. }
  967. func (x *AddressRules) String() string {
  968. return protoimpl.X.MessageStringOf(x)
  969. }
  970. func (*AddressRules) ProtoMessage() {}
  971. func (x *AddressRules) ProtoReflect() protoreflect.Message {
  972. mi := &file_kuban_api_validate_business_rules_proto_msgTypes[9]
  973. if x != nil {
  974. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  975. if ms.LoadMessageInfo() == nil {
  976. ms.StoreMessageInfo(mi)
  977. }
  978. return ms
  979. }
  980. return mi.MessageOf(x)
  981. }
  982. // Deprecated: Use AddressRules.ProtoReflect.Descriptor instead.
  983. func (*AddressRules) Descriptor() ([]byte, []int) {
  984. return file_kuban_api_validate_business_rules_proto_rawDescGZIP(), []int{9}
  985. }
  986. func (x *AddressRules) GetProvince() *StringRules {
  987. if x != nil {
  988. return x.Province
  989. }
  990. return nil
  991. }
  992. func (x *AddressRules) GetCity() *StringRules {
  993. if x != nil {
  994. return x.City
  995. }
  996. return nil
  997. }
  998. func (x *AddressRules) GetDistrict() *StringRules {
  999. if x != nil {
  1000. return x.District
  1001. }
  1002. return nil
  1003. }
  1004. func (x *AddressRules) GetDetail() *StringRules {
  1005. if x != nil {
  1006. return x.Detail
  1007. }
  1008. return nil
  1009. }
  1010. func (x *AddressRules) GetPostcode() *PostcodeRules {
  1011. if x != nil {
  1012. return x.Postcode
  1013. }
  1014. return nil
  1015. }
  1016. func (x *AddressRules) GetRequireComplete() bool {
  1017. if x != nil {
  1018. return x.RequireComplete
  1019. }
  1020. return false
  1021. }
  1022. // 金融交易验证规则
  1023. type FinancialTransactionRules struct {
  1024. state protoimpl.MessageState `protogen:"open.v1"`
  1025. // 交易金额范围
  1026. MinAmount *float64 `protobuf:"fixed64,1,opt,name=min_amount,json=minAmount,proto3,oneof" json:"min_amount"`
  1027. MaxAmount *float64 `protobuf:"fixed64,2,opt,name=max_amount,json=maxAmount,proto3,oneof" json:"max_amount"`
  1028. // 银行卡号验证
  1029. BankCard *BankCardRules `protobuf:"bytes,3,opt,name=bank_card,json=bankCard,proto3" json:"bank_card"`
  1030. // 交易密码规则
  1031. TransactionPassword *PasswordRules `protobuf:"bytes,4,opt,name=transaction_password,json=transactionPassword,proto3" json:"transaction_password"`
  1032. // 是否要求二次确认
  1033. RequireConfirmation bool `protobuf:"varint,5,opt,name=require_confirmation,json=requireConfirmation,proto3" json:"require_confirmation"`
  1034. unknownFields protoimpl.UnknownFields
  1035. sizeCache protoimpl.SizeCache
  1036. }
  1037. func (x *FinancialTransactionRules) Reset() {
  1038. *x = FinancialTransactionRules{}
  1039. mi := &file_kuban_api_validate_business_rules_proto_msgTypes[10]
  1040. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  1041. ms.StoreMessageInfo(mi)
  1042. }
  1043. func (x *FinancialTransactionRules) String() string {
  1044. return protoimpl.X.MessageStringOf(x)
  1045. }
  1046. func (*FinancialTransactionRules) ProtoMessage() {}
  1047. func (x *FinancialTransactionRules) ProtoReflect() protoreflect.Message {
  1048. mi := &file_kuban_api_validate_business_rules_proto_msgTypes[10]
  1049. if x != nil {
  1050. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  1051. if ms.LoadMessageInfo() == nil {
  1052. ms.StoreMessageInfo(mi)
  1053. }
  1054. return ms
  1055. }
  1056. return mi.MessageOf(x)
  1057. }
  1058. // Deprecated: Use FinancialTransactionRules.ProtoReflect.Descriptor instead.
  1059. func (*FinancialTransactionRules) Descriptor() ([]byte, []int) {
  1060. return file_kuban_api_validate_business_rules_proto_rawDescGZIP(), []int{10}
  1061. }
  1062. func (x *FinancialTransactionRules) GetMinAmount() float64 {
  1063. if x != nil && x.MinAmount != nil {
  1064. return *x.MinAmount
  1065. }
  1066. return 0
  1067. }
  1068. func (x *FinancialTransactionRules) GetMaxAmount() float64 {
  1069. if x != nil && x.MaxAmount != nil {
  1070. return *x.MaxAmount
  1071. }
  1072. return 0
  1073. }
  1074. func (x *FinancialTransactionRules) GetBankCard() *BankCardRules {
  1075. if x != nil {
  1076. return x.BankCard
  1077. }
  1078. return nil
  1079. }
  1080. func (x *FinancialTransactionRules) GetTransactionPassword() *PasswordRules {
  1081. if x != nil {
  1082. return x.TransactionPassword
  1083. }
  1084. return nil
  1085. }
  1086. func (x *FinancialTransactionRules) GetRequireConfirmation() bool {
  1087. if x != nil {
  1088. return x.RequireConfirmation
  1089. }
  1090. return false
  1091. }
  1092. // 验证错误详情
  1093. type ValidationError struct {
  1094. state protoimpl.MessageState `protogen:"open.v1"`
  1095. // 字段路径
  1096. FieldPath string `protobuf:"bytes,1,opt,name=field_path,json=fieldPath,proto3" json:"field_path"`
  1097. // 规则 ID
  1098. RuleId string `protobuf:"bytes,2,opt,name=rule_id,json=ruleId,proto3" json:"rule_id"`
  1099. // 错误消息(中文)
  1100. Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message"`
  1101. // 错误消息(英文)
  1102. MessageEn string `protobuf:"bytes,4,opt,name=message_en,json=messageEn,proto3" json:"message_en"`
  1103. // 失败的值
  1104. Value string `protobuf:"bytes,5,opt,name=value,proto3" json:"value"`
  1105. // 附加信息
  1106. Metadata map[string]string `protobuf:"bytes,6,rep,name=metadata,proto3" json:"metadata" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
  1107. unknownFields protoimpl.UnknownFields
  1108. sizeCache protoimpl.SizeCache
  1109. }
  1110. func (x *ValidationError) Reset() {
  1111. *x = ValidationError{}
  1112. mi := &file_kuban_api_validate_business_rules_proto_msgTypes[11]
  1113. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  1114. ms.StoreMessageInfo(mi)
  1115. }
  1116. func (x *ValidationError) String() string {
  1117. return protoimpl.X.MessageStringOf(x)
  1118. }
  1119. func (*ValidationError) ProtoMessage() {}
  1120. func (x *ValidationError) ProtoReflect() protoreflect.Message {
  1121. mi := &file_kuban_api_validate_business_rules_proto_msgTypes[11]
  1122. if x != nil {
  1123. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  1124. if ms.LoadMessageInfo() == nil {
  1125. ms.StoreMessageInfo(mi)
  1126. }
  1127. return ms
  1128. }
  1129. return mi.MessageOf(x)
  1130. }
  1131. // Deprecated: Use ValidationError.ProtoReflect.Descriptor instead.
  1132. func (*ValidationError) Descriptor() ([]byte, []int) {
  1133. return file_kuban_api_validate_business_rules_proto_rawDescGZIP(), []int{11}
  1134. }
  1135. func (x *ValidationError) GetFieldPath() string {
  1136. if x != nil {
  1137. return x.FieldPath
  1138. }
  1139. return ""
  1140. }
  1141. func (x *ValidationError) GetRuleId() string {
  1142. if x != nil {
  1143. return x.RuleId
  1144. }
  1145. return ""
  1146. }
  1147. func (x *ValidationError) GetMessage() string {
  1148. if x != nil {
  1149. return x.Message
  1150. }
  1151. return ""
  1152. }
  1153. func (x *ValidationError) GetMessageEn() string {
  1154. if x != nil {
  1155. return x.MessageEn
  1156. }
  1157. return ""
  1158. }
  1159. func (x *ValidationError) GetValue() string {
  1160. if x != nil {
  1161. return x.Value
  1162. }
  1163. return ""
  1164. }
  1165. func (x *ValidationError) GetMetadata() map[string]string {
  1166. if x != nil {
  1167. return x.Metadata
  1168. }
  1169. return nil
  1170. }
  1171. // 批量验证结果
  1172. type ValidationResult struct {
  1173. state protoimpl.MessageState `protogen:"open.v1"`
  1174. // 是否验证通过
  1175. Valid bool `protobuf:"varint,1,opt,name=valid,proto3" json:"valid"`
  1176. // 错误列表
  1177. Errors []*ValidationError `protobuf:"bytes,2,rep,name=errors,proto3" json:"errors"`
  1178. // 警告列表(非阻塞性)
  1179. Warnings []*ValidationError `protobuf:"bytes,3,rep,name=warnings,proto3" json:"warnings"`
  1180. // 验证组
  1181. Group string `protobuf:"bytes,4,opt,name=group,proto3" json:"group"`
  1182. unknownFields protoimpl.UnknownFields
  1183. sizeCache protoimpl.SizeCache
  1184. }
  1185. func (x *ValidationResult) Reset() {
  1186. *x = ValidationResult{}
  1187. mi := &file_kuban_api_validate_business_rules_proto_msgTypes[12]
  1188. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  1189. ms.StoreMessageInfo(mi)
  1190. }
  1191. func (x *ValidationResult) String() string {
  1192. return protoimpl.X.MessageStringOf(x)
  1193. }
  1194. func (*ValidationResult) ProtoMessage() {}
  1195. func (x *ValidationResult) ProtoReflect() protoreflect.Message {
  1196. mi := &file_kuban_api_validate_business_rules_proto_msgTypes[12]
  1197. if x != nil {
  1198. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  1199. if ms.LoadMessageInfo() == nil {
  1200. ms.StoreMessageInfo(mi)
  1201. }
  1202. return ms
  1203. }
  1204. return mi.MessageOf(x)
  1205. }
  1206. // Deprecated: Use ValidationResult.ProtoReflect.Descriptor instead.
  1207. func (*ValidationResult) Descriptor() ([]byte, []int) {
  1208. return file_kuban_api_validate_business_rules_proto_rawDescGZIP(), []int{12}
  1209. }
  1210. func (x *ValidationResult) GetValid() bool {
  1211. if x != nil {
  1212. return x.Valid
  1213. }
  1214. return false
  1215. }
  1216. func (x *ValidationResult) GetErrors() []*ValidationError {
  1217. if x != nil {
  1218. return x.Errors
  1219. }
  1220. return nil
  1221. }
  1222. func (x *ValidationResult) GetWarnings() []*ValidationError {
  1223. if x != nil {
  1224. return x.Warnings
  1225. }
  1226. return nil
  1227. }
  1228. func (x *ValidationResult) GetGroup() string {
  1229. if x != nil {
  1230. return x.Group
  1231. }
  1232. return ""
  1233. }
  1234. var File_kuban_api_validate_business_rules_proto protoreflect.FileDescriptor
  1235. const file_kuban_api_validate_business_rules_proto_rawDesc = "" +
  1236. "\n" +
  1237. "'kuban/api/validate/business_rules.proto\x12\x12kuban.api.validate\x1a google/protobuf/descriptor.proto\x1a!kuban/api/validate/validate.proto\"\xc9\x01\n" +
  1238. "\x12ChineseMobileRules\x12\x18\n" +
  1239. "\aenabled\x18\x01 \x01(\bR\aenabled\x12O\n" +
  1240. "\x11allowed_operators\x18\x02 \x03(\x0e2\".kuban.api.validate.MobileOperatorR\x10allowedOperators\x12#\n" +
  1241. "\rallow_virtual\x18\x03 \x01(\bR\fallowVirtual\x12#\n" +
  1242. "\rerror_message\x18\x04 \x01(\tR\ferrorMessage\"\xc9\x03\n" +
  1243. "\x12ChineseIdCardRules\x12\x18\n" +
  1244. "\aenabled\x18\x01 \x01(\bR\aenabled\x12'\n" +
  1245. "\x0fverify_checksum\x18\x02 \x01(\bR\x0everifyChecksum\x12*\n" +
  1246. "\x11verify_birth_date\x18\x03 \x01(\bR\x0fverifyBirthDate\x12(\n" +
  1247. "\x10verify_area_code\x18\x04 \x01(\bR\x0everifyAreaCode\x12C\n" +
  1248. "\rallowed_types\x18\x05 \x03(\x0e2\x1e.kuban.api.validate.IdCardTypeR\fallowedTypes\x12\x1c\n" +
  1249. "\amin_age\x18\x06 \x01(\x05H\x00R\x06minAge\x88\x01\x01\x12\x1c\n" +
  1250. "\amax_age\x18\a \x01(\x05H\x01R\x06maxAge\x88\x01\x01\x12H\n" +
  1251. "\x0frequired_gender\x18\b \x01(\x0e2\x1a.kuban.api.validate.GenderH\x02R\x0erequiredGender\x88\x01\x01\x12#\n" +
  1252. "\rerror_message\x18\t \x01(\tR\ferrorMessageB\n" +
  1253. "\n" +
  1254. "\b_min_ageB\n" +
  1255. "\n" +
  1256. "\b_max_ageB\x12\n" +
  1257. "\x10_required_gender\"\xd1\x01\n" +
  1258. "\x1cUnifiedSocialCreditCodeRules\x12\x18\n" +
  1259. "\aenabled\x18\x01 \x01(\bR\aenabled\x12'\n" +
  1260. "\x0fverify_checksum\x18\x02 \x01(\bR\x0everifyChecksum\x12I\n" +
  1261. "\rallowed_types\x18\x03 \x03(\x0e2$.kuban.api.validate.OrganizationTypeR\fallowedTypes\x12#\n" +
  1262. "\rerror_message\x18\x04 \x01(\tR\ferrorMessage\"\xdb\x01\n" +
  1263. "\rBankCardRules\x12\x18\n" +
  1264. "\aenabled\x18\x01 \x01(\bR\aenabled\x12\x1f\n" +
  1265. "\vverify_luhn\x18\x02 \x01(\bR\n" +
  1266. "verifyLuhn\x12E\n" +
  1267. "\rallowed_types\x18\x03 \x03(\x0e2 .kuban.api.validate.BankCardTypeR\fallowedTypes\x12#\n" +
  1268. "\rallowed_banks\x18\x04 \x03(\tR\fallowedBanks\x12#\n" +
  1269. "\rerror_message\x18\x05 \x01(\tR\ferrorMessage\"\x90\x02\n" +
  1270. "\x10ChineseNameRules\x12\x18\n" +
  1271. "\aenabled\x18\x01 \x01(\bR\aenabled\x12\"\n" +
  1272. "\n" +
  1273. "min_length\x18\x02 \x01(\rH\x00R\tminLength\x88\x01\x01\x12\"\n" +
  1274. "\n" +
  1275. "max_length\x18\x03 \x01(\rH\x01R\tmaxLength\x88\x01\x01\x122\n" +
  1276. "\x15allow_ethnic_minority\x18\x04 \x01(\bR\x13allowEthnicMinority\x12#\n" +
  1277. "\rallow_english\x18\x05 \x01(\bR\fallowEnglish\x12#\n" +
  1278. "\rerror_message\x18\x06 \x01(\tR\ferrorMessageB\r\n" +
  1279. "\v_min_lengthB\r\n" +
  1280. "\v_max_length\"\x9e\x01\n" +
  1281. "\rPostcodeRules\x12\x18\n" +
  1282. "\aenabled\x18\x01 \x01(\bR\aenabled\x12!\n" +
  1283. "\fcountry_code\x18\x02 \x01(\tR\vcountryCode\x12+\n" +
  1284. "\x11allowed_provinces\x18\x03 \x03(\tR\x10allowedProvinces\x12#\n" +
  1285. "\rerror_message\x18\x04 \x01(\tR\ferrorMessage\"\x8e\x03\n" +
  1286. "\x15UserRegistrationRules\x12;\n" +
  1287. "\busername\x18\x01 \x01(\v2\x1f.kuban.api.validate.StringRulesR\busername\x12>\n" +
  1288. "\x06mobile\x18\x02 \x01(\v2&.kuban.api.validate.ChineseMobileRulesR\x06mobile\x125\n" +
  1289. "\x05email\x18\x03 \x01(\v2\x1f.kuban.api.validate.StringRulesR\x05email\x12=\n" +
  1290. "\bpassword\x18\x04 \x01(\v2!.kuban.api.validate.PasswordRulesR\bpassword\x12A\n" +
  1291. "\treal_name\x18\x05 \x01(\v2$.kuban.api.validate.ChineseNameRulesR\brealName\x12?\n" +
  1292. "\aid_card\x18\x06 \x01(\v2&.kuban.api.validate.ChineseIdCardRulesR\x06idCard\"\xed\x02\n" +
  1293. "\rPasswordRules\x12\x1d\n" +
  1294. "\n" +
  1295. "min_length\x18\x01 \x01(\rR\tminLength\x12\x1d\n" +
  1296. "\n" +
  1297. "max_length\x18\x02 \x01(\rR\tmaxLength\x12+\n" +
  1298. "\x11require_uppercase\x18\x03 \x01(\bR\x10requireUppercase\x12+\n" +
  1299. "\x11require_lowercase\x18\x04 \x01(\bR\x10requireLowercase\x12#\n" +
  1300. "\rrequire_digit\x18\x05 \x01(\bR\frequireDigit\x12'\n" +
  1301. "\x0frequire_special\x18\x06 \x01(\bR\x0erequireSpecial\x12#\n" +
  1302. "\rspecial_chars\x18\a \x01(\tR\fspecialChars\x12,\n" +
  1303. "\x12reject_common_weak\x18\b \x01(\bR\x10rejectCommonWeak\x12#\n" +
  1304. "\rerror_message\x18\t \x01(\tR\ferrorMessage\"\xe9\x03\n" +
  1305. "\x13EnterpriseInfoRules\x12B\n" +
  1306. "\fcompany_name\x18\x01 \x01(\v2\x1f.kuban.api.validate.StringRulesR\vcompanyName\x12D\n" +
  1307. "\x04uscc\x18\x02 \x01(\v20.kuban.api.validate.UnifiedSocialCreditCodeRulesR\x04uscc\x12P\n" +
  1308. "\x11legal_person_name\x18\x03 \x01(\v2$.kuban.api.validate.ChineseNameRulesR\x0flegalPersonName\x129\n" +
  1309. "\x16min_registered_capital\x18\x04 \x01(\x03H\x00R\x14minRegisteredCapital\x88\x01\x01\x129\n" +
  1310. "\x16max_registered_capital\x18\x05 \x01(\x03H\x01R\x14maxRegisteredCapital\x88\x01\x01\x12J\n" +
  1311. "\x10business_license\x18\x06 \x01(\v2\x1f.kuban.api.validate.StringRulesR\x0fbusinessLicenseB\x19\n" +
  1312. "\x17_min_registered_capitalB\x19\n" +
  1313. "\x17_max_registered_capital\"\xe0\x02\n" +
  1314. "\fAddressRules\x12;\n" +
  1315. "\bprovince\x18\x01 \x01(\v2\x1f.kuban.api.validate.StringRulesR\bprovince\x123\n" +
  1316. "\x04city\x18\x02 \x01(\v2\x1f.kuban.api.validate.StringRulesR\x04city\x12;\n" +
  1317. "\bdistrict\x18\x03 \x01(\v2\x1f.kuban.api.validate.StringRulesR\bdistrict\x127\n" +
  1318. "\x06detail\x18\x04 \x01(\v2\x1f.kuban.api.validate.StringRulesR\x06detail\x12=\n" +
  1319. "\bpostcode\x18\x05 \x01(\v2!.kuban.api.validate.PostcodeRulesR\bpostcode\x12)\n" +
  1320. "\x10require_complete\x18\x06 \x01(\bR\x0frequireComplete\"\xca\x02\n" +
  1321. "\x19FinancialTransactionRules\x12\"\n" +
  1322. "\n" +
  1323. "min_amount\x18\x01 \x01(\x01H\x00R\tminAmount\x88\x01\x01\x12\"\n" +
  1324. "\n" +
  1325. "max_amount\x18\x02 \x01(\x01H\x01R\tmaxAmount\x88\x01\x01\x12>\n" +
  1326. "\tbank_card\x18\x03 \x01(\v2!.kuban.api.validate.BankCardRulesR\bbankCard\x12T\n" +
  1327. "\x14transaction_password\x18\x04 \x01(\v2!.kuban.api.validate.PasswordRulesR\x13transactionPassword\x121\n" +
  1328. "\x14require_confirmation\x18\x05 \x01(\bR\x13requireConfirmationB\r\n" +
  1329. "\v_min_amountB\r\n" +
  1330. "\v_max_amount\"\xa4\x02\n" +
  1331. "\x0fValidationError\x12\x1d\n" +
  1332. "\n" +
  1333. "field_path\x18\x01 \x01(\tR\tfieldPath\x12\x17\n" +
  1334. "\arule_id\x18\x02 \x01(\tR\x06ruleId\x12\x18\n" +
  1335. "\amessage\x18\x03 \x01(\tR\amessage\x12\x1d\n" +
  1336. "\n" +
  1337. "message_en\x18\x04 \x01(\tR\tmessageEn\x12\x14\n" +
  1338. "\x05value\x18\x05 \x01(\tR\x05value\x12M\n" +
  1339. "\bmetadata\x18\x06 \x03(\v21.kuban.api.validate.ValidationError.MetadataEntryR\bmetadata\x1a;\n" +
  1340. "\rMetadataEntry\x12\x10\n" +
  1341. "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
  1342. "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xbc\x01\n" +
  1343. "\x10ValidationResult\x12\x14\n" +
  1344. "\x05valid\x18\x01 \x01(\bR\x05valid\x12;\n" +
  1345. "\x06errors\x18\x02 \x03(\v2#.kuban.api.validate.ValidationErrorR\x06errors\x12?\n" +
  1346. "\bwarnings\x18\x03 \x03(\v2#.kuban.api.validate.ValidationErrorR\bwarnings\x12\x14\n" +
  1347. "\x05group\x18\x04 \x01(\tR\x05group*\xbc\x01\n" +
  1348. "\x0eMobileOperator\x12\x1f\n" +
  1349. "\x1bMOBILE_OPERATOR_UNSPECIFIED\x10\x00\x12 \n" +
  1350. "\x1cMOBILE_OPERATOR_CHINA_MOBILE\x10\x01\x12 \n" +
  1351. "\x1cMOBILE_OPERATOR_CHINA_UNICOM\x10\x02\x12!\n" +
  1352. "\x1dMOBILE_OPERATOR_CHINA_TELECOM\x10\x03\x12\"\n" +
  1353. "\x1eMOBILE_OPERATOR_CHINA_BROADNET\x10\x04*`\n" +
  1354. "\n" +
  1355. "IdCardType\x12\x1c\n" +
  1356. "\x18ID_CARD_TYPE_UNSPECIFIED\x10\x00\x12\x19\n" +
  1357. "\x15ID_CARD_TYPE_18_DIGIT\x10\x01\x12\x19\n" +
  1358. "\x15ID_CARD_TYPE_15_DIGIT\x10\x02*D\n" +
  1359. "\x06Gender\x12\x16\n" +
  1360. "\x12GENDER_UNSPECIFIED\x10\x00\x12\x0f\n" +
  1361. "\vGENDER_MALE\x10\x01\x12\x11\n" +
  1362. "\rGENDER_FEMALE\x10\x02*\xc0\x01\n" +
  1363. "\x10OrganizationType\x12!\n" +
  1364. "\x1dORGANIZATION_TYPE_UNSPECIFIED\x10\x00\x12 \n" +
  1365. "\x1cORGANIZATION_TYPE_ENTERPRISE\x10\x01\x12!\n" +
  1366. "\x1dORGANIZATION_TYPE_INSTITUTION\x10\x02\x12\"\n" +
  1367. "\x1eORGANIZATION_TYPE_SOCIAL_GROUP\x10\x03\x12 \n" +
  1368. "\x1cORGANIZATION_TYPE_GOVERNMENT\x10\t*c\n" +
  1369. "\fBankCardType\x12\x1e\n" +
  1370. "\x1aBANK_CARD_TYPE_UNSPECIFIED\x10\x00\x12\x18\n" +
  1371. "\x14BANK_CARD_TYPE_DEBIT\x10\x01\x12\x19\n" +
  1372. "\x15BANK_CARD_TYPE_CREDIT\x10\x02B=Z;git.ikuban.com/server/kubanapis/kuban/api/validate;validateb\x06proto3"
  1373. var (
  1374. file_kuban_api_validate_business_rules_proto_rawDescOnce sync.Once
  1375. file_kuban_api_validate_business_rules_proto_rawDescData []byte
  1376. )
  1377. func file_kuban_api_validate_business_rules_proto_rawDescGZIP() []byte {
  1378. file_kuban_api_validate_business_rules_proto_rawDescOnce.Do(func() {
  1379. file_kuban_api_validate_business_rules_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_kuban_api_validate_business_rules_proto_rawDesc), len(file_kuban_api_validate_business_rules_proto_rawDesc)))
  1380. })
  1381. return file_kuban_api_validate_business_rules_proto_rawDescData
  1382. }
  1383. var file_kuban_api_validate_business_rules_proto_enumTypes = make([]protoimpl.EnumInfo, 5)
  1384. var file_kuban_api_validate_business_rules_proto_msgTypes = make([]protoimpl.MessageInfo, 14)
  1385. var file_kuban_api_validate_business_rules_proto_goTypes = []any{
  1386. (MobileOperator)(0), // 0: kuban.api.validate.MobileOperator
  1387. (IdCardType)(0), // 1: kuban.api.validate.IdCardType
  1388. (Gender)(0), // 2: kuban.api.validate.Gender
  1389. (OrganizationType)(0), // 3: kuban.api.validate.OrganizationType
  1390. (BankCardType)(0), // 4: kuban.api.validate.BankCardType
  1391. (*ChineseMobileRules)(nil), // 5: kuban.api.validate.ChineseMobileRules
  1392. (*ChineseIdCardRules)(nil), // 6: kuban.api.validate.ChineseIdCardRules
  1393. (*UnifiedSocialCreditCodeRules)(nil), // 7: kuban.api.validate.UnifiedSocialCreditCodeRules
  1394. (*BankCardRules)(nil), // 8: kuban.api.validate.BankCardRules
  1395. (*ChineseNameRules)(nil), // 9: kuban.api.validate.ChineseNameRules
  1396. (*PostcodeRules)(nil), // 10: kuban.api.validate.PostcodeRules
  1397. (*UserRegistrationRules)(nil), // 11: kuban.api.validate.UserRegistrationRules
  1398. (*PasswordRules)(nil), // 12: kuban.api.validate.PasswordRules
  1399. (*EnterpriseInfoRules)(nil), // 13: kuban.api.validate.EnterpriseInfoRules
  1400. (*AddressRules)(nil), // 14: kuban.api.validate.AddressRules
  1401. (*FinancialTransactionRules)(nil), // 15: kuban.api.validate.FinancialTransactionRules
  1402. (*ValidationError)(nil), // 16: kuban.api.validate.ValidationError
  1403. (*ValidationResult)(nil), // 17: kuban.api.validate.ValidationResult
  1404. nil, // 18: kuban.api.validate.ValidationError.MetadataEntry
  1405. (*StringRules)(nil), // 19: kuban.api.validate.StringRules
  1406. }
  1407. var file_kuban_api_validate_business_rules_proto_depIdxs = []int32{
  1408. 0, // 0: kuban.api.validate.ChineseMobileRules.allowed_operators:type_name -> kuban.api.validate.MobileOperator
  1409. 1, // 1: kuban.api.validate.ChineseIdCardRules.allowed_types:type_name -> kuban.api.validate.IdCardType
  1410. 2, // 2: kuban.api.validate.ChineseIdCardRules.required_gender:type_name -> kuban.api.validate.Gender
  1411. 3, // 3: kuban.api.validate.UnifiedSocialCreditCodeRules.allowed_types:type_name -> kuban.api.validate.OrganizationType
  1412. 4, // 4: kuban.api.validate.BankCardRules.allowed_types:type_name -> kuban.api.validate.BankCardType
  1413. 19, // 5: kuban.api.validate.UserRegistrationRules.username:type_name -> kuban.api.validate.StringRules
  1414. 5, // 6: kuban.api.validate.UserRegistrationRules.mobile:type_name -> kuban.api.validate.ChineseMobileRules
  1415. 19, // 7: kuban.api.validate.UserRegistrationRules.email:type_name -> kuban.api.validate.StringRules
  1416. 12, // 8: kuban.api.validate.UserRegistrationRules.password:type_name -> kuban.api.validate.PasswordRules
  1417. 9, // 9: kuban.api.validate.UserRegistrationRules.real_name:type_name -> kuban.api.validate.ChineseNameRules
  1418. 6, // 10: kuban.api.validate.UserRegistrationRules.id_card:type_name -> kuban.api.validate.ChineseIdCardRules
  1419. 19, // 11: kuban.api.validate.EnterpriseInfoRules.company_name:type_name -> kuban.api.validate.StringRules
  1420. 7, // 12: kuban.api.validate.EnterpriseInfoRules.uscc:type_name -> kuban.api.validate.UnifiedSocialCreditCodeRules
  1421. 9, // 13: kuban.api.validate.EnterpriseInfoRules.legal_person_name:type_name -> kuban.api.validate.ChineseNameRules
  1422. 19, // 14: kuban.api.validate.EnterpriseInfoRules.business_license:type_name -> kuban.api.validate.StringRules
  1423. 19, // 15: kuban.api.validate.AddressRules.province:type_name -> kuban.api.validate.StringRules
  1424. 19, // 16: kuban.api.validate.AddressRules.city:type_name -> kuban.api.validate.StringRules
  1425. 19, // 17: kuban.api.validate.AddressRules.district:type_name -> kuban.api.validate.StringRules
  1426. 19, // 18: kuban.api.validate.AddressRules.detail:type_name -> kuban.api.validate.StringRules
  1427. 10, // 19: kuban.api.validate.AddressRules.postcode:type_name -> kuban.api.validate.PostcodeRules
  1428. 8, // 20: kuban.api.validate.FinancialTransactionRules.bank_card:type_name -> kuban.api.validate.BankCardRules
  1429. 12, // 21: kuban.api.validate.FinancialTransactionRules.transaction_password:type_name -> kuban.api.validate.PasswordRules
  1430. 18, // 22: kuban.api.validate.ValidationError.metadata:type_name -> kuban.api.validate.ValidationError.MetadataEntry
  1431. 16, // 23: kuban.api.validate.ValidationResult.errors:type_name -> kuban.api.validate.ValidationError
  1432. 16, // 24: kuban.api.validate.ValidationResult.warnings:type_name -> kuban.api.validate.ValidationError
  1433. 25, // [25:25] is the sub-list for method output_type
  1434. 25, // [25:25] is the sub-list for method input_type
  1435. 25, // [25:25] is the sub-list for extension type_name
  1436. 25, // [25:25] is the sub-list for extension extendee
  1437. 0, // [0:25] is the sub-list for field type_name
  1438. }
  1439. func init() { file_kuban_api_validate_business_rules_proto_init() }
  1440. func file_kuban_api_validate_business_rules_proto_init() {
  1441. if File_kuban_api_validate_business_rules_proto != nil {
  1442. return
  1443. }
  1444. file_kuban_api_validate_validate_proto_init()
  1445. file_kuban_api_validate_business_rules_proto_msgTypes[1].OneofWrappers = []any{}
  1446. file_kuban_api_validate_business_rules_proto_msgTypes[4].OneofWrappers = []any{}
  1447. file_kuban_api_validate_business_rules_proto_msgTypes[8].OneofWrappers = []any{}
  1448. file_kuban_api_validate_business_rules_proto_msgTypes[10].OneofWrappers = []any{}
  1449. type x struct{}
  1450. out := protoimpl.TypeBuilder{
  1451. File: protoimpl.DescBuilder{
  1452. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  1453. RawDescriptor: unsafe.Slice(unsafe.StringData(file_kuban_api_validate_business_rules_proto_rawDesc), len(file_kuban_api_validate_business_rules_proto_rawDesc)),
  1454. NumEnums: 5,
  1455. NumMessages: 14,
  1456. NumExtensions: 0,
  1457. NumServices: 0,
  1458. },
  1459. GoTypes: file_kuban_api_validate_business_rules_proto_goTypes,
  1460. DependencyIndexes: file_kuban_api_validate_business_rules_proto_depIdxs,
  1461. EnumInfos: file_kuban_api_validate_business_rules_proto_enumTypes,
  1462. MessageInfos: file_kuban_api_validate_business_rules_proto_msgTypes,
  1463. }.Build()
  1464. File_kuban_api_validate_business_rules_proto = out.File
  1465. file_kuban_api_validate_business_rules_proto_goTypes = nil
  1466. file_kuban_api_validate_business_rules_proto_depIdxs = nil
  1467. }