I have a need to generate C# code for my Country entity that will inherit from a base Entity class providing stong typed argument to denote the fact that my PK (@id) is of type Guid that is Id property on the base class having implictly type Guid. So I have 2 problems:
There is no Guid type in telosys.
How to define PK using Generic base class typed argument?
public class Country : Entity<Guid>
{
}
public abstract class Entity<TKey> : Entity, IEntity<TKey>
{
public virtual TKey Id { get; protected set; }
protected Entity(TKey id)
{
Id = id;
}
}
https://www.telosys.org/dsl-syntax.html
. binary
. boolean
. byte
. date
. decimal
. double
. float
. int
. long
. short
. string
. time
. timestamp
https://doc.telosys.org/dsl-model/tags
For example a special property name: metaproperty I can parse to get $entity inheritance typed argument. I need other metadata. Entity class as Id property.It can be string, int, long etc
User {
metaproperty: string {#base
@Label("typed_param:Guid;name:Id;form_sections:Info section~1|Contact sec~2;display_layout:rows(n)_cols(12)")}
FirstName : string {@Label("form_section:~1;display_layout:row(1)col(1)colspan(3)")};
LastName: string {@Label("form_section:~1;display_layout:row(1)col(2)colspan(9)")};
Phone: string {@Label("form_section:~2;display_layout:row(1)col(1)colspan(12)")};
}
I need some mechanizam to display the layout of fields in the form for each property I want in view/edit screens
I can certaily generate some .json structure and add metadata there as well. Even have a GUI with drag and drop feature to define rows, cols and row or col spans.