0

Request body

{
    "standard": '',
    "section": '',
    "subject": '',
    "type" : '',
    "startTime": '',
    "allDayEvent": false,
    "startTimezone": '',
    "endTimezone": '',
    "endTime": ''  ,
    "repeat": {
        "frequency": 'Never',
        "interval": '',
        "recurrencePattern": {
            "weekly": {
            "weeklydaysOfWeek": null
        },
        "monthly": {
            "monthlydayOfMonth": 0,
            "monthlyIndex": '',
            "monthlydayOfWeek": null                       
        },
        "yearly": {
            "month": 0,
            "yearlydayOfMonth": 0,
            "yearlyIndex": '',
            "yearlydayOfWeek": null                  
        }
    },
    "until":{
        "neverFlag": false,
        "occurrence": 0,
        "endDate": null
    }
}

how many tables can i create for this and in weeklydaysofweek we will get multiple days so how can i store those week days seperatly.i have to provide details based on the enddate it is in until object.

Arun Sudhakaran
  • 2,167
  • 4
  • 27
  • 52
Teja sree
  • 1
  • 2

1 Answers1

0

Check below SQL

/* CREATE TABLE */
CREATE TABLE test(
`standard` VARCHAR(100),
`section` VARCHAR(100),
`subject` VARCHAR(100),
`type` VARCHAR(100),
`startTime` VARCHAR(100),
`allDayEvent` VARCHAR(100),
`startTimezone` VARCHAR(100),
`endTimezone` VARCHAR(100),
`endTime` VARCHAR(100),
`repeatfrequency` VARCHAR(100),
`repeatinterval` VARCHAR(100),
`repeatrecurrencePatternweeklyweeklydaysOfWeek` VARCHAR(100),
`repeatrecurrencePatternmonthlymonthlydayOfMonth` DOUBLE,
`repeatrecurrencePatternmonthlymonthlyIndex` VARCHAR(100),
`repeatrecurrencePatternmonthlymonthlydayOfWeek` VARCHAR(100),
`repeatrecurrencePatternyearlymonth` DOUBLE,
`repeatrecurrencePatternyearlyyearlydayOfMonth` DOUBLE,
`repeatrecurrencePatternyearlyyearlyIndex` VARCHAR(100),
`repeatrecurrencePatternyearlyyearlydayOfWeek` VARCHAR(100),
`repeatuntilneverFlag` VARCHAR(100),
`repeatuntiloccurrence` DOUBLE,
`repeatuntilendDate` VARCHAR(100)
);

/* INSERT QUERY NO: 1 */
INSERT INTO test(`standard`, `section`, `subject`, `type`, `startTime`, `allDayEvent`, `startTimezone`, `endTimezone`, `endTime`, `repeatfrequency`, `repeatinterval`, `repeatrecurrencePatternweeklyweeklydaysOfWeek`, `repeatrecurrencePatternmonthlymonthlydayOfMonth`, `repeatrecurrencePatternmonthlymonthlyIndex`, `repeatrecurrencePatternmonthlymonthlydayOfWeek`, `repeatrecurrencePatternyearlymonth`, `repeatrecurrencePatternyearlyyearlydayOfMonth`, `repeatrecurrencePatternyearlyyearlyIndex`, `repeatrecurrencePatternyearlyyearlydayOfWeek`, `repeatuntilneverFlag`, `repeatuntiloccurrence`, `repeatuntilendDate`)
VALUES ('', '', '', '', '', 'false', '', '', '', 'Never', '', '', 0, '', '', 0, 0, '', '', 'false', 0, '');
Infostans
  • 310
  • 2
  • 12