Beispiel #1
0
 /**
  * Returns the schema for this data object.
  *
  * @return \Rhubarb\Stem\Schema\ModelSchema
  */
 protected function createSchema()
 {
     $schema = new ModelSchema("tblCategory");
     $schema->addColumn(new AutoIncrement("CategoryID"), new String("CategoryName", 50));
     $schema->uniqueIdentifierColumnName = "CategoryID";
     return $schema;
 }
 /**
  * Returns the schema for this data object.
  *
  * @return \Rhubarb\Stem\Schema\ModelSchema
  */
 protected function createSchema()
 {
     $schema = new ModelSchema("tblCompanyCategory");
     $schema->addColumn(new AutoIncrement("CompanyCategoryID"), new Integer("CompanyID"), new Integer("CategoryID"));
     $schema->uniqueIdentifierColumnName = "CompanyCategoryID";
     return $schema;
 }
Beispiel #3
0
 /**
  * Returns the schema for this data object.
  *
  * @return \Rhubarb\Stem\Schema\ModelSchema
  */
 protected function createSchema()
 {
     $schema = new ModelSchema("tblUser");
     $schema->addColumn(new AutoIncrement("UserID"), new ForeignKey("CompanyID"), new MySqlEnum("UserType", "Staff", ["Staff", "Administrator"]), new String("Username", 40), new String("Forename", 40), new String("Surname", 40), new String("Password", 120), new Boolean("Active", false), new Decimal("Wage"));
     $schema->uniqueIdentifierColumnName = "UserID";
     $schema->labelColumnName = "FullName";
     return $schema;
 }
Beispiel #4
0
 protected function createSchema()
 {
     $schema = new ModelSchema("tblContact");
     $schema->addColumn(new Integer("ContactID", 0), new Integer("CompanyID", 0), new Date("DateOfBirth"), new DateTime("CreatedDate"), new String("Forename", 100), new String("Surname", 100), new Boolean("KeyContact"), new Time("CoffeeTime"));
     $schema->uniqueIdentifierColumnName = "ContactID";
     $schema->labelColumnName = "Forename";
     return $schema;
 }
 public function createSchema()
 {
     $schema = new ModelSchema("tblRhubarbLogEntry");
     $schema->addColumn(new AutoIncrementColumn("RhubarbLogEntryID"), new StringColumn("LogSession", "30"), new DateTimeColumn("EntryDate"), new StringColumn("Category", 50), new MySqlMediumTextColumn("Message"), new MySqlMediumTextColumn("AdditionalData"), new StringColumn("IpAddress", 15), new DecimalColumn("ExecutionTime", 12, 4), new DecimalColumn("ExecutionGapTime", 12, 4), new StringColumn("Request", 500), new StringColumn("Host", 200), new StringColumn("ScriptName", 200), new IntegerColumn("ErrorLevel"));
     $schema->labelColumnName = "Message";
     $schema->addIndex(new Index("EntryDate", Index::INDEX));
     $schema->addIndex(new Index("Category", Index::INDEX));
     return $schema;
 }
 /**
  * Returns the schema for this data object.
  *
  * @return \Rhubarb\Stem\Schema\ModelSchema
  */
 protected function createSchema()
 {
     $schema = new ModelSchema("Test");
     $schema->addColumn(new EncryptedString("SecureColumn", 100));
     return $schema;
 }
Beispiel #7
0
 protected function createSchema()
 {
     $schema = new ModelSchema('tblWinner');
     $schema->addColumn(new AutoIncrement('WinnerID'), new String('WebsiteURL', 255), new Integer('ContactID'));
 }
Beispiel #8
0
 protected function createSchema()
 {
     $schema = new ModelSchema('tblVisit');
     $schema->addColumn('IP', '');
     return $schema;
 }
Beispiel #9
0
 /**
  * Returns the schema for this data object.
  *
  * @return \Rhubarb\Stem\Schema\ModelSchema
  */
 protected function createSchema()
 {
     $schema = new ModelSchema('tblComment');
     $schema->addColumn(new AutoIncrement('CommentID'), new Integer('ImageID'), new MySqlMediumText('Comment'), new Integer('PostedBy'), new DateTime('PostedAt'), new Integer('ForComment'), new Integer('InReplyTo', 0));
     return $schema;
 }
Beispiel #10
0
 /**
  * Returns the schema for this data object.
  *
  * @return \Rhubarb\Stem\Schema\ModelSchema
  */
 protected function createSchema()
 {
     $schema = new ModelSchema('tblImage');
     $schema->addColumn(new AutoIncrement('ImageID'), new Integer('GalleryID'), new String('Source', 200), new String('Thumbnail', 200), new Integer('UploadedBy'), new DateTime('UploadedAt'), new DateTime('LastUpdatedAt'), new Integer('Order', 0));
     return $schema;
 }
Beispiel #11
0
 /**
  * Returns the schema for this data object.
  *
  * @return \Rhubarb\Stem\Schema\ModelSchema
  */
 protected function createSchema()
 {
     $schema = new ModelSchema('tblGallery');
     $schema->addColumn(new AutoIncrement('GalleryID'), new String('Title', 125), new Integer('DefaultImageID'), new DateTime('CreatedAt'), new Integer('CreatedBy'), new Boolean('Published'), new Integer('Order'));
     return $schema;
 }
Beispiel #12
0
 protected function createSchema()
 {
     $schema = new ModelSchema('tblContact');
     $schema->addColumn(new AutoIncrement('ContactID'), new String('Name', 150), new String('ContactEmail', 200), new String('CompanyName', 200), new String('Website', 200), new String('IP', 15), new DateTime('DatePosted'), new Integer('CompetitionID'));
     return $schema;
 }
 protected function createSchema()
 {
     $schema = new ModelSchema("tblCommunication");
     $schema->addColumn(new AutoIncrementColumn("CommunicationID"), new StringColumn("Title", 150), new MySqlEnumColumn("Status", self::STATUS_DRAFT, [self::STATUS_DRAFT, self::STATUS_SCHEDULED, self::STATUS_SENT, self::STATUS_FAILED]), new DateTimeColumn("DateCreated"), new DateTimeColumn("DateSent"), new DateTimeColumn("DateToSend"));
     return $schema;
 }
 protected function createSchema()
 {
     $schema = new ModelSchema("tblCommunicationItem");
     $schema->addColumn(new AutoIncrementColumn("CommunicationItemID"), new ForeignKeyColumn("CommunicationID"), new MySqlEnumColumn("Status", self::STATUS_NOT_SENT, [self::STATUS_NOT_SENT, self::STATUS_SENT, self::STATUS_DELIVERED, self::STATUS_OPENED, self::STATUS_FAILED]), new StringColumn("Type", 50), new StringColumn("SendableClassName", 150), new StringColumn("Recipient", 200), new LongStringColumn("Text"), new JsonColumn("Data", "", true), new DateTimeColumn("DateCreated"), new DateTimeColumn("DateSent"), new BooleanColumn("Sent", false));
     return $schema;
 }