Exemplo n.º 1
0
 /**
  * @return Schema
  */
 protected static function defineSchema()
 {
     return new Schema('pbj:eme:solicits:command:send-submission:1-0-0', __CLASS__, [Fb::create('solicit_id', T\IdentifierType::create())->required()->className('Eme\\Schemas\\Solicits\\SolicitId')->build(), Fb::create('first_name', T\StringType::create())->build(), Fb::create('last_name', T\StringType::create())->build(), Fb::create('email', T\StringType::create())->format(Format::EMAIL())->build(), Fb::create('email_domain', T\StringType::create())->format(Format::HOSTNAME())->build(), Fb::create('address', T\MessageType::create())->className('Gdbots\\Schemas\\Geo\\Address')->build(), Fb::create('phone', T\StringType::create())->asAMap()->maxLength(20)->pattern('^\\+?[1-9]\\d{1,14}$')->build(), Fb::create('dob', T\DateType::create())->build(), Fb::create('age', T\TinyIntType::create())->max(120)->build(), Fb::create('gender', T\IntEnumType::create())->className('Gdbots\\Schemas\\Common\\Enum\\Gender')->build(), Fb::create('story', T\TextType::create())->build(), Fb::create('file_ids', T\IdentifierType::create())->asASet()->className('Gdbots\\Schemas\\Files\\FileId')->build(), Fb::create('photo_urls', T\StringType::create())->asAList()->format(Format::URL())->build(), Fb::create('video_urls', T\StringType::create())->asAList()->format(Format::URL())->build(), Fb::create('networks', T\StringType::create())->asAMap()->maxLength(50)->pattern('^[\\w\\.-]+$')->build(), Fb::create('ppid', T\StringType::create())->pattern('^[\\w\\/\\.:-]+$')->build(), Fb::create('cf', T\DynamicFieldType::create())->asAList()->build()], [AccountRefV1Mixin::create(), CommandV1Mixin::create(), CollectableV1Mixin::create(), TimePartingV1Mixin::create(), TimeSamplingV1Mixin::create(), UtmV1Mixin::create()]);
 }
Exemplo n.º 2
0
 /**
  * @return Schema
  */
 protected static function defineSchema()
 {
     return new Schema('pbj:eme:solicits:event:submission-received:1-0-0', __CLASS__, [Fb::create('solicit_id', T\IdentifierType::create())->required()->className('Eme\\Schemas\\Solicits\\SolicitId')->build(), Fb::create('first_name', T\StringType::create())->build(), Fb::create('last_name', T\StringType::create())->build(), Fb::create('email', T\StringType::create())->format(Format::EMAIL())->build(), Fb::create('email_domain', T\StringType::create())->format(Format::HOSTNAME())->build(), Fb::create('address', T\MessageType::create())->className('Gdbots\\Schemas\\Geo\\Address')->build(), Fb::create('phone', T\StringType::create())->asAMap()->maxLength(20)->pattern('^\\+?[1-9]\\d{1,14}$')->build(), Fb::create('dob', T\DateType::create())->build(), Fb::create('age', T\TinyIntType::create())->max(120)->build(), Fb::create('gender', T\IntEnumType::create())->withDefault(Gender::UNKNOWN())->className('Gdbots\\Schemas\\Common\\Enum\\Gender')->build(), Fb::create('story', T\TextType::create())->build(), Fb::create('file_ids', T\IdentifierType::create())->asASet()->className('Gdbots\\Schemas\\Files\\FileId')->build(), Fb::create('photo_urls', T\StringType::create())->asAList()->format(Format::URL())->build(), Fb::create('video_urls', T\StringType::create())->asAList()->format(Format::URL())->build(), Fb::create('networks', T\StringType::create())->asAMap()->maxLength(50)->pattern('^[\\w\\.-]+$')->build(), Fb::create('mentions', T\StringType::create())->asASet()->maxLength(50)->pattern('^[\\w\\.-]+$')->build(), Fb::create('ppid', T\StringType::create())->pattern('^[\\w\\/\\.:-]+$')->build(), Fb::create('hashtags', T\StringType::create())->asASet()->format(Format::HASHTAG())->build(), Fb::create('tags', T\StringType::create())->asAMap()->pattern('^[\\w\\/\\.:-]+$')->build(), Fb::create('is_blocked', T\BooleanType::create())->build(), Fb::create('is_read', T\BooleanType::create())->build(), Fb::create('last_read_at', T\MicrotimeType::create())->useTypeDefault(false)->build(), Fb::create('last_read_by_ref', T\MessageRefType::create())->build(), Fb::create('is_verified', T\BooleanType::create())->build(), Fb::create('verified_at', T\MicrotimeType::create())->useTypeDefault(false)->build(), Fb::create('allcaps', T\TinyIntType::create())->max(100)->build(), Fb::create('exclaims', T\TinyIntType::create())->build(), Fb::create('cf', T\DynamicFieldType::create())->asAList()->build(), Fb::create('s256', T\TinyIntType::create())->build(), Fb::create('s32', T\TinyIntType::create())->build(), Fb::create('s16', T\TinyIntType::create())->build()], [AccountRefV1Mixin::create(), EventV1Mixin::create(), IndexedV1Mixin::create(), TrackedMessageV1Mixin::create(), CollectableV1Mixin::create(), IpToGeoV1Mixin::create(), TimePartingV1Mixin::create(), TimeSamplingV1Mixin::create(), UaParserV1Mixin::create(), UtmV1Mixin::create()]);
 }