github.com/sharovik/devbot@v1.0.1-0.20240308094637-4a0387c40516/internal/dto/databasedto/QuestionsModel.go (about) 1 package databasedto 2 3 import "github.com/sharovik/orm/dto" 4 5 // QuestionsStruct struct for QuestionsModel object 6 type QuestionsStruct struct { 7 dto.BaseModel 8 } 9 10 // QuestionsModel model for questions table 11 var QuestionsModel = New( 12 "questions", 13 []interface{}{ 14 dto.ModelField{ 15 Name: "question", 16 Type: dto.VarcharColumnType, 17 Length: 255, 18 Default: "", 19 }, 20 dto.ModelField{ 21 Name: "answer", 22 Type: dto.VarcharColumnType, 23 Length: 255, 24 Default: "", 25 }, 26 dto.ModelField{ 27 Name: "scenario_id", 28 Type: dto.IntegerColumnType, 29 }, 30 dto.ModelField{ 31 Name: "regex_id", 32 Type: dto.IntegerColumnType, 33 IsNullable: true, 34 }, 35 dto.ModelField{ 36 Name: "is_variable", 37 Type: dto.BooleanColumnType, 38 IsNullable: true, 39 }, 40 }, 41 dto.ModelField{ 42 Name: "id", 43 Type: dto.IntegerColumnType, 44 AutoIncrement: true, 45 IsPrimaryKey: true, 46 }, 47 &QuestionsStruct{}, 48 )