QUESTION #1

Suppose that I have a Todo model struct with a foreign key of Task:

type Todo struct {
uadmin.Model
Task Task
TaskID uint
}

Fill in the blanks that corresponds to the inline based on the given structure above.

uadmin.RegisterInlines(models.___, map[string]string){
"___": "___",
}

A. models.Task,
        "Todo": "TaskID"

B. models.Todo,
        "Task": "TodoID"

C. models.Todo,
        "Todo": "TaskID"

D. models.Task,
        "Task": "TodoID"

 

QUESTION #2

Suppose that I have a Dog model struct with a foreign key of Cat:

type Dog struct {
uadmin.Model
Cat Cat
CatID uint
}

Fill in the blanks that corresponds to the inline based on the given structure above.

uadmin.RegisterInlines(models.___, map[string]string){
"___": "___",
}

A. models.Cat,
        "Cat": "DogID"

B. models.Dog,
        "Cat": "DogID"

C. models.Dog,
        "Dog": "CatID"

D. models.Cat,
        "Dog": "CatID"

 

QUESTION #3

Suppose that I have a Family model struct with a foreign key of Mother:

type Family struct {
uadmin.Model
Mother Mother
MotherID uint
}

Fill in the blanks that corresponds to the inline based on the given structure above.

uadmin.RegisterInlines(models.___, map[string]string){
"___": "___",
}

A. models.Mother,
        "Mother": "FamilyID"

B. models.Family,
        "Family": "MotherID"

C. models.Mother,
        "Family": "MotherID"

D. models.Family,
        "Mother": "FamilyID"

 

QUESTION #4

Suppose that I have a Restaurant model struct with a foreign key of Jollibee:

type Restaurant struct {
uadmin.Model
Jollibee Jollibee
JollibeeID uint
}

Fill in the blanks that corresponds to the inline based on the given structure above.

uadmin.RegisterInlines(models.___, map[string]string){
"___": "___",
}

A. models.Restaurant,
        "Jollibee": "RestaurantID"

B. models.Jollibee,
        "Jollibee": "RestaurantID"

C. models.Jollibee,
        "Restaurant": "JollibeeID"

D. models.Restaurant,
        "Restaurant": "JollibeeID"

 

QUESTION #5

Suppose that I have an A model struct with a foreign key of B:

type A struct {
uadmin.Model
B B
BID uint
}

Fill in the blanks that corresponds to the inline based on the given structure above.

uadmin.RegisterInlines(models.___, map[string]string){
"___": "___",
}

A. models.A,
        "B": "AID"

B. models.B,
        "B": "AID"

C. models.B,
        "A": "BID"

D. models.A,
        "A": "BID"

 

QUESTION #6

Given a register inline function that has a parent model of House and a Roof model inside it:

uadmin.RegisterInlines(models.House, map[string]string){
"Roof": "HouseID",
}

Fill in the blanks that corresponds to the model struct based on the given structure above.

type ___ struct {
uadmin.Model
___ ___
___ ___
}

A. type Roof struct
        House House
        HouseID uint

B. type House struct
        Roof Roof
        RoofID uint

C. type House struct
        Roof Roof
        HouseID uint

D. type Roof struct
        House House
        RoofID uint

 

QUESTION #7

Given a register inline function that has a parent model of Dog and a Cat model inside it:

uadmin.RegisterInlines(models.Dog, map[string]string){
"Cat": "DogID",
}

Fill in the blanks that corresponds to the model struct based on the given structure above.

type ___ struct {
uadmin.Model
___ ___
___ ___
}

A. type Dog struct
        Cat Cat
        CatID uint

B. type Cat struct
        Dog Dog
        DogID uint

C. type Cat struct
        Dog Dog
        CatID uint

D. type Dog struct
        Cat Cat
        DogID uint

 

QUESTION #8

Given a register inline function that has a parent model of Food and a Rice model inside it:

uadmin.RegisterInlines(models.Food, map[string]string){
"Rice": "FoodID",
}

Fill in the blanks that corresponds to the model struct based on the given structure above.

type ___ struct {
uadmin.Model
___ ___
___ ___
}

A. type Rice struct
        Food Food
        FoodID uint

B. type Food struct
        Rice Rice
        FoodID uint

C. type Food struct
        Rice Rice
        RiceID uint

D. type Rice struct
        Food Food
        RiceID uint

 

QUESTION #9

Given a register inline function that has a parent model of Bread and a Caramel model inside it:

uadmin.RegisterInlines(models.Bread, map[string]string){
"Caramel": "BreadID",
}

Fill in the blanks that corresponds to the model struct based on the given structure above.

type ___ struct {
uadmin.Model
___ ___
___ ___
}

A. type Caramel struct
        Bread Bread
        CaramelID uint

B. type Bread struct
        Caramel Caramel
        CaramelID uint

C. type Bread struct
        Caramel Caramel
        BreadID uint

D. type Caramel struct
        Bread Bread
        BreadID uint

 

QUESTION #10

Given a register inline function that has a parent model of Bread and a Caramel model inside it:

uadmin.RegisterInlines(models.NewYork, map[string]string){
"USA": "NewYorkID",
}

Fill in the blanks that corresponds to the model struct based on the given structure above.

type ___ struct {
uadmin.Model
___ ___
___ ___
}

A. type NewYork struct
        USA USA
        NewYorkID uint

B. type USA struct
        NewYork NewYork
        NewYorkID uint

C. type NewYork struct
        USA USA
        USAID uint

D. type USA struct
        NewYork NewYork
        USAID uint